Concat
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
|
|
x |
|
|
x |
Function
Preprocesses data, that is, merges the source operand src to be sorted into the target data concat. After the data is preprocessed, Sort can be performed.
Prototype
1 2 |
template <typename T> __aicore__ inline void Concat(LocalTensor<T> &concat, const LocalTensor<T> &src, const LocalTensor<T> &tmp, const int32_t repeatTime) |
Parameters
|
Parameter |
Description |
|---|---|
|
T |
Data type of an operand. For the For the For the |
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
concat |
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. |
|
src |
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. |
|
tmp |
Input |
Temporary space. It is used to store intermediate variables during complex internal computation of the API. The size of the temporary space is obtained by developers. For details about how to obtain the size, see GetConcatTmpSize. The data type must be the same as that of the 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. |
|
repeatTime |
Input |
Number of iteration repeats. The type is int32_t. 16 elements are processed in each iteration, and the next 16 elements are processed in the next iteration. Value range: repeatTime ∈ [0, 255] |
Returns
None
Constraints
- For details about the operand address alignment requirements, see General Address Alignment Restrictions.