If an indexed sort is requested, incd contains the increment between elements of vector id . An in-place sort overwrites the input data vector with the sorted output. An indexed sort returns a permuted index vector which can be used to access the unmodified data vector in its sorted order. The first, and most important way, is that Cray source code using the four argument call to request an in-place sort should be modified slightly. The routine determines presence or absence of the id argument by accessing its argument pointer.
Null arguments pass empty pointers.
This routine uses a radix sort algorithm, not Batcher's bitonic merge algorithm. As such, this sort is stable while the Cray version is not.