Utils Module provides generic utilities to be used by all binaries in rlpack.
More...
|
template<typename DType > |
void | arg_mergesort (DType *arr, uint64_t *index, int64_t begin, int64_t end, int64_t parallelismSizeThreshold) |
|
template<typename DType > |
void | arg_mergesort_merge_ (DType *arr, uint64_t *index, int64_t left, int64_t mid, int64_t right, int64_t parallelismSizeThreshold) |
|
Utils Module provides generic utilities to be used by all binaries in rlpack.
◆ arg_mergesort()
template<typename DType >
void arg_mergesort |
( |
DType * |
arr, |
|
|
uint64_t * |
index, |
|
|
int64_t |
begin, |
|
|
int64_t |
end, |
|
|
int64_t |
parallelismSizeThreshold |
|
) |
| |
The argsort function using mergesort algorithm. This function is optimized with OpenMP parallel routines for fast sorting.
- Parameters
-
arr | : The array to be sorted. |
index | : The index array corresponding to arr which is sorted as per arr . |
begin | : The start position index |
end | : The end position index |
parallelismSizeThreshold | : The threshold size of inputContainer beyond which OpenMP parallelized routines are to be used. |
◆ arg_mergesort_merge_()
template<typename DType >
void arg_mergesort_merge_ |
( |
DType * |
arr, |
|
|
uint64_t * |
index, |
|
|
int64_t |
left, |
|
|
int64_t |
mid, |
|
|
int64_t |
right, |
|
|
int64_t |
parallelismSizeThreshold |
|
) |
| |
The merge function for arg_mergesort to merge sort and merge arr
and merge index
as per sorting of arr
. This function is optimized with OpenMP parallel routines for fast sorting.
- Parameters
-
arr | : The array to be sorted. |
index | : The index array corresponding to arr which is sorted as per arr . |
left | : The start position index, from left side of array. |
mid | : The mid point of the array |
right | : The end position index, from right side of array. |
parallelismSizeThreshold | : The threshold size of inputContainer beyond which OpenMP parallelized routines are to be used. |