目录

ReleaseEventID

Function Description

Releases TEventID of a hard event (hardware synchronization event). This API is usually used together with AllocEventID.

Function Prototype

template <HardEvent evt> 
__aicore__ inline void ReleaseEventID(TEventID id)

Parameters

Parameter Input/Output Description
id Input TEventID type, which is the TEventID assigned by the AllocEventID call.

Supported Models

Kirin 9020 series processors

Kirin 9030 series processors

Kirin X90 series processors

Precautions

AllocEventID and ReleaseEventID must appear in pairs. The TEventID passed by ReleaseEventID must be assigned by the AllocEventID call.

Return Value

None

Calling Example

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).
// ...