DisableDmaAtomic
产品支持情况
产品 |
是否支持 |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
x |
|
√ |
功能说明
清空原子操作的状态。
函数原型
1 | __aicore__ inline void DisableDmaAtomic() |
参数说明
无
返回值说明
无
约束说明
无
调用示例
1 2 3 4 5 6 | constexpr uint32_t totalLength = 256; // 参与搬运的元素个数 AscendC::LocalTensor<float> src0Local; AscendC::GlobalTensor<float> dstGlobal; AscendC::SetAtomicAdd<float>(); // 开启原子累加,累加数据类型为float AscendC::DataCopy(dstGlobal, src0Local, totalLength * sizeof(float)); AscendC::DisableDmaAtomic(); // 清空原子操作的状态 |
父主题: 原子操作