ReleaseEventID
Applicability
Product |
Supported/Unsupported |
|---|---|
√ |
|
√ |
|
x |
|
√ |
|
x |
|
√ |
Function Usage
Releases TEventID of a hard event (hardware synchronization event). This API is usually used together with AllocEventID.
Prototype
1 2 | template <HardEvent evt> __aicore__ inline void ReleaseEventID(TEventID id) |
Parameters
Parameter |
Description |
|---|---|
evt |
HardEvent hardware synchronization type. For details about this type, see the description of synchronization types in the SetFlag/WaitFlag(ISASI). |
Parameter |
Input/Output |
Description |
|---|---|---|
id |
Input |
TEventID type, which is the TEventID assigned by the AllocEventID call. |
Restrictions
AllocEventID and ReleaseEventID must appear in pairs. The TEventID transferred by ReleaseEventID must be assigned by the AllocEventID call.
Returns
None
Example
1 2 3 4 5 6 7 8 | AscendC::TEventID eventID = GetTPipePtr()->AllocEventID<AscendC::HardEvent::V_S>(); //The scalar needs to wait for vector synchronization and the HardEvent ID is required. AscendC::SetFlag<AscendC::HardEvent::V_S>(eventID); ...... ...... ...... AscendC::WaitFlag<AscendC::HardEvent::V_S>(eventID); GetTPipePtr()->ReleaseEventID<AscendC::HardEvent::V_S>(eventID); //Release the ID of the hard event (scalar waiting for vector synchronization). ...... |