Applies for a TEventID of HardEvent (hardware synchronization event). This API must be used together with ReleaseEventID. After this API is called, the applied TEventID is occupied until ReleaseEventID is called.
| Parameter | Input/Output | Description |
|---|---|---|
| evt | Input | Parameter of the **HardEvent **hardware synchronization type. |
Kirin 9020 series processors
Kirin 9030 series processors
Kirin X90 series processors
The number of TEventIDs is limited. ReleaseEventID must be immediately called to release TEventID after the TEventID is used to prevent TEventID from being used up.
// Need to insert synchronization between scalar and vector, and request the corresponding HardEvent ID. AscendC::TEventID eventID = GetTPipePtr()->AllocEventID<AscendC::HardEvent::V_S>(); AscendC::SetFlag<AscendC::HardEvent::V_S>(eventID); // ... AscendC::WaitFlag<AscendC::HardEvent::V_S>(eventID); // Release the ID of the HardEvent that synchronizes scalar with vector. GetTPipePtr()->ReleaseEventID<AscendC::HardEvent::V_S>(eventID); // ...