CANN/asc-devkit GlobalTensor操作符文档
📅 2026/7/15 15:03:59
👁️ 阅读次数
📝 编程学习
operator()
产品支持情况
功能说明
获取某个索引位置的元素的引用。
与LocalTensor的operator()类似。
函数原型
__aicore__ inline __inout_pipe__(S) __gm__ PrimType& operator()(const uint64_t offset) const参数说明
表 1参数说明
返回值说明
返回指定索引位置的元素的PrimType类型引用。
PrimType定义如下:
// PrimT用于从T中提取基础数据类型:T传入基础数据类型,直接返回数据类型;T传入为TensorTrait类型时萃取TensorTrait中的LiteType基础数据类型 using PrimType = PrimT<T>;约束说明
无。
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
编程学习
技术分享
实战经验