Extract
函数功能
处理Sort的结果数据,输出排序后的value和index。
函数原型
| 1 2 | template <typename T> __aicore__ inline void Extract(const LocalTensor<T> &dstValueLocal, const LocalTensor<uint32_t> &dstIndexLocal, const LocalTensor<T> &sortedLocal, const int32_t repeatTimes) | 
参数说明
| 参数名称 | 功能 | 
|---|---|
| T | 操作数的数据类型。 | 
| 参数名称 | 输入/输出 | 含义 | 
|---|---|---|
| dstValueLocal | 输出 | 目的操作数。 类型为LocalTensor,支持的TPosition为VECIN/VECCALC/VECOUT。 LocalTensor的起始地址需要32字节对齐。 | 
| dstIndexLocal | 输出 | 目的操作数。 类型为LocalTensor,支持的TPosition为VECIN/VECCALC/VECOUT。 LocalTensor的起始地址需要32字节对齐。 此源操作数固定为uint32_t数据类型。 | 
| sortedLocal | 输入 | 源操作数。 类型为LocalTensor,支持的TPosition为VECIN/VECCALC/VECOUT。 LocalTensor的起始地址需要32字节对齐。 源操作数的数据类型需要与目的操作数保持一致。 | 
| repeatTimes | 输入 | 重复迭代次数,int32_t类型。 取值范围:repeatTimes∈[0,255]。 | 
返回值
无
支持的型号
约束说明
- 操作数地址偏移对齐要求请参见通用约束。
调用示例
请参见MrgSort的调用示例。