FreeAllEvent
产品支持情况
产品 |
是否支持 |
---|---|
|
√ |
|
√ |
|
√ |
|
√ |
|
x |
|
√ |
|
x |
功能说明
释放队列中申请的所有同步事件。队列分配的Buffer关联着同步事件的eventID,因为同步事件的数量有限制,如果同时使用的队列Buffer数量超过限制,将无法继续申请队列,使用本接口释放队列中的事件后,可以再次申请队列。详细介绍请参考TQue Buffer限制。
函数原型
1
|
__aicore__ inline void FreeAllEvent() |
参数说明
无
返回值说明
无
调用示例
1 2 3 4 5 6 7 8 9 10 11 |
// 接口: DeQue Tensor AscendC::TPipe pipe; AscendC::TQueBind<AscendC::TPosition::VECOUT, AscendC::TPosition::GM, 4> que; int num = 4; int len = 1024; pipe.InitBuffer(que, num, len); AscendC::LocalTensor<half> tensor1 = que.AllocTensor<half>(); que.EnQue(tensor1); tensor1 = que.DeQue<half>(); // 将tensor从VECOUT的Queue中搬出 que.FreeTensor<half>(tensor1); que.FreeAllEvent(); |
父主题: TQueBind