Arrive
Product Support
Product |
Supported |
|---|---|
x |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function
Notifies other waiting AIVs that the current AIV has completed the tasks on which it depends.
Prototype
1 | __aicore__ inline void Arrive(uint32_t arriveIndex) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
arriveIndex |
Input |
Index of the AIV in the Arrive group. Value range: [0, arriveSize – 1]. |
Returns
None
Restrictions
This API can be used in iterations. However, the maximum number of iterations cannot exceed 1,048,575 due to the limitation of the inter-core communication efficiency.
Example
1 2 3 4 | if (id >= 0 && id < ARRIVE_NUM) { //Various Vector compute logic, which is implemented by users. barA.Arrive(id); // There are two AIVs in the Arrive group, block 0 and block 1, indicating that the two AIVs have completed tasks. } |
Parent topic: GroupBarrier