FreeAllEvent
Product Support
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
Function
Releases all synchronization events requested in a queue. The buffers allocated to the queue are associated with the event IDs of the synchronization events. The number of synchronization events is limited. If the number of queue buffers used at the same time exceeds the limit, no more queues can be requested. After this API is called to release the events in the queue, you can request a queue again. For details, see TQue Buffer Limit.
Prototype
1
|
__aicore__ inline void FreeAllEvent() |
Parameters
None
Restrictions
This API does not support inplace tensor operations, that is, the scenario where the depth of TQue is set to 0.
Returns
None
Example
1 2 3 4 5 6 7 8 9 10 11 |
// API: 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>(); // Move the tensor out of the VECOUT queue. que.FreeTensor<half>(tensor1); que.FreeAllEvent(); |