Concat

Function Usage

Preprocesses the data and merges the source operand srcLocal to be sorted into the target data concatLocal. After the data is preprocessed, you can sort the data.

Prototype

1
2
template <typename T>
__aicore__ inline void Concat(LocalTensor<T> &concatLocal, const LocalTensor<T> &srcLocal, const LocalTensor<T> &tmpLocal, const int32_t repeatTimes)

Parameters

Table 1 Parameters in the template

Parameter

Function

T

Data type of the operand.

Table 2 Parameters

Parameter

Input/Output

Description

concatLocal

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.

srcLocal

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.

tmpLocal

Input

Temporary space. This parameter is used to store intermediate variables during complex internal API computation and is provided by developers. 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.

repeatTimes

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: 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.