GetSortOffset

Function

Obtains the offset (in bytes) in the sorted data based on the element position.

Prototype

1
2
template <typename T>
__aicore__ inline uint32_t GetSortOffset(const uint32_t elemOffset)

Parameters

Table 1 Template parameters

Parameter

Description

T

Data type of the operand.

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

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

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

Table 2 API parameters

Parameter

Input/Output

Description

elemOffset

Input

Element position.

Returns

Offset in the sorted data.

Restrictions

None

Example

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