Sort input arrays get the sorted indices
Sort a multi dimensional array and return sorted indices. Index array is of type u32.
◆ af_sort_index()
C Interface for sorting an array and getting original indices.
- Parameters
-
[out] | out | will contain the sorted output |
[out] | indices | will contain the indices in the original input |
[in] | in | is the input array |
[in] | dim | The dimension along which numerical difference is performed |
[in] | isAscending | specifies the sorting order |
- Returns
- AF_SUCCESS if the execution completes properly
◆ sort()
AFAPI void af::sort |
( |
array & |
out, |
|
|
array & |
indices, |
|
|
const array & |
in, |
|
|
const unsigned |
dim = 0 , |
|
|
const bool |
isAscending = true |
|
) |
| |
C++ Interface for sorting an array and getting original indices.
- Parameters
-
[out] | out | will contain the sorted output |
[out] | indices | will contain the indices in the original input |
[in] | in | is the input array |
[in] | dim | The dimension along which numerical difference is performed |
[in] | isAscending | specifies the sorting order |