Ascend C SIMD-API Layout函数

发布时间:2026/7/15 14:54:31
Ascend C SIMD-API Layout函数 layout产品支持情况产品是否支持Ascend 950PR/Ascend 950DTxAtlas A3 训练系列产品 / Atlas A3 推理系列产品√Atlas A2 训练系列产品 / Atlas A2 推理系列产品√Atlas 200I/500 A2 推理产品xAtlas 推理系列产品 AI CorexAtlas 推理系列产品 Vector CorexAtlas 训练系列产品x功能说明获取Layout实例化对象。函数原型__aicore__ inline constexpr decltype(auto) layout() {} __aicore__ inline constexpr decltype(auto) layout() const {}参数说明无返回值说明返回Layout实例化对象。约束说明构造Layout对象时传入的Shape和Stride结构需是Std::tuple结构类型且满足Std::tuple结构类型的使用约束。调用示例AscendC::Shapeint,int,int shape AscendC::MakeShape(10, 20, 30); AscendC::Strideint,int,int stride AscendC::MakeStride(1, 100, 200); AscendC::LayoutAscendC::Shapeint, int, int, AscendC::Strideint, int, int layoutInit(shape, stride); // 使用layout函数获取实例化对象 constexpr auto layout layoutInit.layout();创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考