Concat
函数功能
对数据进行预处理,将要排序的源操作数srcLocal一一对应的合入目标数据concatLocal中,数据预处理完后,可以进行Sort。
函数原型
template <typename T> __aicore__ inline void Concat(LocalTensor<T> &concatLocal, const LocalTensor<T> &srcLocal, const LocalTensor<T> &tmpLocal, const int32_t repeatTimes)
参数说明
| 接口 | 功能 | 
|---|---|
| T | 操作数的数据类型。 | 
| 参数名称 | 输入/输出 | 含义 | 
|---|---|---|
| concatLocal | 输出 | 目的操作数。 类型为LocalTensor,支持的TPosition为VECIN/VECCALC/VECOUT。 Atlas A2训练系列产品/Atlas 800I A2推理产品,支持的数据类型为:half/float Atlas推理系列产品AI Core,支持的数据类型为:half/float | 
| srcLocal | 输入 | 源操作数。 类型为LocalTensor,支持的TPosition为VECIN/VECCALC/VECOUT。 源操作数的数据类型需要与目的操作数保持一致。 Atlas A2训练系列产品/Atlas 800I A2推理产品,支持的数据类型为:half/float Atlas推理系列产品AI Core,支持的数据类型为:half/float | 
| tmpLocal | 输入 | 临时空间。接口内部复杂计算时用于存储中间变量,由开发者提供。数据类型固定uint8_t。 类型为LocalTensor,支持的TPosition为VECIN/VECCALC/VECOUT。 Atlas A2训练系列产品/Atlas 800I A2推理产品,支持的数据类型为:half/float Atlas推理系列产品AI Core,支持的数据类型为:half/float | 
| repeatTimes | 输入 | 重复迭代次数,int32_t类型,每次迭代处理16个元素,下次迭代跳至相邻的下一组16个元素。取值范围:repeatTimes∈[0,255]。 | 
返回值
无
支持的型号
Atlas A2训练系列产品/Atlas 800I A2推理产品
Atlas推理系列产品AI Core
约束说明
- 操作数地址偏移对齐要求请参见通用约束。
调用示例
请参见MrgSort的调用示例。