Le 21/04/2020 à 11:13, Antoine Pitrou a écrit : > > This assumes that all these kernels can safely write into one of their > inputs. This should be true for trivial ones, but not if e.g. a kernel > makes two passes over its input. For example, the SortToIndices kernel > first scans the input for min and max values, and then switches on two > different sorting algorithms depending on those statistics (using a O(n) > counting sort if the values are in a small enough range).
That said, in the SortToIndices case, this wouldn't be a problem, since only the second pass writes to the output. Regards Antoine.