A high-performance general-purpose compute library

Sort input arrays. More...

Functions

AFAPI array sort (const array &in, const unsigned dim=0, const bool isAscending=true)
 C++ Interface for sorting an array.
 
AFAPI af_err af_sort (af_array *out, const af_array in, const unsigned dim, const bool isAscending)
 C Interface for sorting an array.
 

Detailed Description

Sort input arrays.

Sort an multi dimensional array

Function Documentation

◆ af_sort()

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

C Interface for sorting an array.

Parameters
[out]outwill contain the sorted output
[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

◆ sort()

AFAPI array sort ( const array in,
const unsigned  dim = 0,
const bool  isAscending = true 
)

C++ Interface for sorting an array.

Parameters
[in]inis the input array
[in]dimThe dimension along which numerical difference is performed
[in]isAscendingspecifies the sorting order
Returns
the sorted output