Developer Guide and Reference

  • 2021.2
  • 03/26/2021
  • Public Content
Contents

Sorting

In oneDAL sorting is an algorithm to sort the observations by each feature (column) in the ascending order.
The result of the sorting algorithm applied to the matrix LaTex Math image. is the matrix LaTex Math image. where the
j
-th column LaTex Math image.,
i = 1, …, n
, is the column LaTex Math image.,
i = 1, …, n
, sorted in the ascending order.

Batch Processing

Algorithm Input
The sorting algorithm accepts the input described below. Pass the
Input ID
as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.
Input ID
Input
data
Pointer to the LaTex Math image. numeric table that contains the input data set.
This table can be an object of any class derived from
NumericTable
except
PackedSymmetricMatrix
,
PackedTriangularMatrix
, and
CSRNumericTable
.
Algorithm Parameters
The sorting algorithm has the following parameters:
Parameter
Default Value
Description
algorithmFPType
float
The floating-point type that the algorithm uses for intermediate computations. Can be
float
or
double
.
method
defaultDense
The radix method for sorting a data set, the only method supported by the algorithm.
Algorithm Output
The sorting algorithm function calculates the result described below. Pass the
Result ID
as a parameter to the methods that access the results of your algorithm. For more details, see Algorithms.
Result ID
Result
sortedData
Pointer to the LaTex Math image. numeric table that stores the results of sorting.
If the number of feature vectors is greater than or equal to LaTex Math image., the library uses the quick sort method instead of radix sort.

Examples

C++ (CPU)
Batch Processing:
Java*
There is no support for Java on GPU.
Batch Processing:
Python*
Batch Processing:

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.