HasTensorInQue
Function Usage
Queries whether there are enqueued tensors in the queue.
Prototype
1 | __aicore__ inline bool HasTensorInQue() |
Parameters
None
Availability
Precautions
None
Returns
- true: Enqueued tensors exist in the queue.
- false: The queue is completely idle.
Example
1 2 3 4 5 6 7 | // Determine whether there are enqueued tensors in the current queue based on VacantInQue. The depth of the current queue is 4. If there is no memory enqueuing action, false is returned. AscendC::TPipe pipe; AscendC::TQue<AscendC::TPosition::VECOUT, 4> que; int num = 4; int len = 1024; pipe.InitBuffer(que, num, len); bool ret = que.HasTensorInQue(); |
Parent topic: TQue