GetWorkspaceLen
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function Usage
Returns the size of the global memory message space occupied by the current GroupBarrier object.
Prototype
1 | __aicore__ inline uint64_t GetWorkspaceLen() |
Parameters
None
Returns
Size of the global memory message space occupied by the current GroupBarrier object.
Restrictions
None
Example
1 2 3 | // Six AIVs start the subsequent service after three AIVs arrive. The required address space is 6 x 512 bytes in total. The start address is the user-specified startAddr. AscendC::GroupBarrier<AscendC::PipeMode::MTE3_MODE> barA(startAddr, 3, 6); uint64_t offset = barA.GetWorkspaceLen(); // Return the size of space occupied by barA in the global memory. |
Result example:
Occupied global memory space (offset): 3072
Parent topic: GroupBarrier