Extract
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
x |
|
√ |
|
x |
|
x |
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> &dstValue, const LocalTensor<uint32_t> &dstIndex, const LocalTensor<T> &sorted, const int32_t repeatTime) |
Parameters
Parameter |
Description |
|---|---|
T |
Operand data type. For the Atlas 350 Accelerator Card, the supported data types are half and float. For the For the For the |
Parameter |
Input/Output |
Description |
|---|---|---|
dstValue |
Output |
Destination operand. The type is LocalTensor, and TPosition can be VECIN, VECCALC, or VECOUT. The start address of LocalTensor must be 32-byte aligned. |
dstIndex |
Output |
Destination operand. The type is LocalTensor, and TPosition can be VECIN, VECCALC, or VECOUT. The start address of LocalTensor must be 32-byte aligned. This source operand is fixed at the uint32_t data type. |
sorted |
Input |
Source operand. The type is LocalTensor, and TPosition can be VECIN, VECCALC, or VECOUT. The start address of LocalTensor must be 32-byte aligned. The source operand must have the same data type as the destination operand. |
repeatTime |
Input |
Number of iteration repeats. The value is of the int32_t type. For the Atlas 350 Accelerator Card, 64 float elements or 128 half elements are processed in each iteration. For the For the For the Value range: repeatTime ∈ [0,255] |
Returns
None
Constraints
- For details about the operand address alignment requirements, see General Address Alignment Restrictions.
Examples
For details, see the examples in MrgSort.