Sort an array over a given dimension and return the original indices.
Output type is u32
.
◆ af_sort_index()
C Interface to sort an array over a given dimension and to return the original indices.
- Parameters
-
[out] | out | sorted output |
[out] | indices | indices from the input |
[in] | in | input array |
[in] | dim | dimension along which the sort occurs |
[in] | isAscending | specifies the sorting order |
- Returns
- AF_SUCCESS, if function returns successfully, else an af_err code is given
◆ sort()
C++ Interface to sort an array over a given dimension and to return the original indices.
- Parameters
-
[out] | out | sorted output |
[out] | indices | indices from the input |
[in] | in | input array |
[in] | dim | dimension along which the sort occurs, 0 denotes the first non-singleton dimension |
[in] | isAscending | specifies the sorting order |