Sort input arrays get the sorted indices. More...

Functions

AFAPI void 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. More...
 
AFAPI af_err af_sort_index (af_array *out, af_array *indices, const af_array in, const unsigned dim, const bool isAscending)
 C Interface for sorting an array and getting original indices. More...
 

Detailed Description

Sort input arrays get the sorted indices.

Sort a multi dimensional array and return sorted indices. Index array is of type u32.

Function Documentation

AFAPI af_err af_sort_index ( af_array out,
af_array indices,
const af_array  in,
const unsigned  dim,
const bool  isAscending 
)

C Interface for sorting an array and getting original indices.

Parameters
[out]outwill contain the sorted output
[out]indiceswill contain the indices in the original input
[in]inis the input array
[in]dimThe dimension along which numerical difference is performed
[in]isAscendingspecifies the sorting order
Returns
AF_SUCCESS if the execution completes properly
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]outwill contain the sorted output
[out]indiceswill contain the indices in the original input
[in]inis the input array
[in]dimThe dimension along which numerical difference is performed
[in]isAscendingspecifies the sorting order