GetSortLen

Function Usage

Obtains the size (in bytes) of the sorted data based on the number of elements.

Prototype

1
2
template <typename T>
__aicore__ inline uint32_t GetSortLen(const uint32_t elemCount)

Parameters

Table 1 Template parameters

Parameter

Description

T

Operand data type.

For the Atlas 350 Accelerator Card, the supported data types are half and float.

For the Atlas A3 training product/Atlas A3 inference product, the supported data types are half and float.

For the Atlas A2 training product/Atlas A2 inference product, the supported data types are half and float.

For the Atlas inference product AI Core, the supported data types are half and float.

Table 2 API parameters

Parameter

Input/Output

Description

elemCount

Input

Number of elements of the input data.

Returns

Size of the sorted data, in bytes.

Constraints

None

Examples

1
AscendC::GetSortLen<half>(128);