18 inline namespace _V1 {
24 : MEvent{
std::nullopt}, MPlugin{Plugin} {}
26 bool TakeOwnership =
false)
27 : MEvent(Event), MPlugin(Plugin) {
35 if (MEvent.has_value())
40 : MEvent(Other.MEvent), MPlugin(Other.MPlugin) {
41 Other.MEvent = std::nullopt;
48 operator bool() {
return MEvent.has_value(); }
56 MEvent = std::nullopt;
61 std::optional<sycl::detail::pi::PiEvent> MEvent;
std::shared_ptr< plugin > PluginPtr
pi_result piEventRelease(pi_event event)
pi_result piEventRetain(pi_event event)
C++ wrapper of extern "C" PI interfaces.
sycl::detail::pi::PiEvent TransferOwnership()
OwnedPiEvent(const PluginPtr &Plugin)
OwnedPiEvent(sycl::detail::pi::PiEvent Event, const PluginPtr &Plugin, bool TakeOwnership=false)
OwnedPiEvent(const OwnedPiEvent &Other)=delete
OwnedPiEvent(OwnedPiEvent &&Other)
sycl::detail::pi::PiEvent GetEvent()