sortVec

fun sortVec(source: Tensor, sortedResult: Tensor?, indexResult: Tensor?)

Sort a scalar array.

Parameters

source

the tensor to be sorted, must be a scalar array tensor of size N.

sortedResult

the optional result, to store the sorted tensor. It must also be a scalar array, of the same size N. Its data type must be the same as that of source.

indexResult

the optional result, to store the original indices of elements in source after being sorted. It must be a scalar array, of size N. Its data type must be one of the integral types.

Throws

If the usage is not allowed by the SpatialML run-time Framework, or if the framework encounter internal error and cannot perform the requested behavior.