Extract
Function Usage
Processes the sorting result data and outputs the sorted values and indexes.
Prototype
1 2 | template <typename T> __aicore__ inline void Extract(const LocalTensor<T> &dstValueLocal, const LocalTensor<uint32_t> &dstIndexLocal, const LocalTensor<T> &sortedLocal, const int32_t repeatTimes) |
Parameters
Parameter |
Function |
|---|---|
T |
Data type of the operand. |
Parameter |
Input/Output |
Description |
|---|---|---|
dstValueLocal |
Output |
Destination operand. The type is LocalTensor, and the supported TPosition is VECIN, VECCALC, or VECOUT. The start address of the LocalTensor must be 32-byte aligned. |
dstIndexLocal |
Output |
Destination operand. The type is LocalTensor, and the supported TPosition is VECIN, VECCALC, or VECOUT. The start address of the LocalTensor must be 32-byte aligned. This source operand is fixed at the uint32_t data type. |
sortedLocal |
Input |
Source operand. The type is LocalTensor, and the supported TPosition is VECIN, VECCALC, or VECOUT. The start address of the LocalTensor must be 32-byte aligned. The source operand must have the same data type as the destination operand. |
repeatTimes |
Input |
Number of iteration repeats. The value is of the int32_t type. Value range: repeatTimes ∈ [0,255] |
Returns
None
Availability
Constraints
- For details about the alignment requirements of the operand address offset, see General Restrictions.
Example
For details, see the examples in MrgSort.