diff --git a/sycl/source/detail/event_impl.cpp b/sycl/source/detail/event_impl.cpp index e261d67a21fc5..77856a2a4d9a1 100644 --- a/sycl/source/detail/event_impl.cpp +++ b/sycl/source/detail/event_impl.cpp @@ -117,10 +117,6 @@ void event_impl::setContextImpl(const ContextImplPtr &Context) { MIsContextInitialized = true; } -event_impl::event_impl(std::optional State) - : MIsInitialized(false), MHostEvent(State), MIsFlushed(true), - MState(State.value_or(HES_Complete)) {} - event_impl::event_impl(RT::PiEvent Event, const context &SyclContext) : MIsContextInitialized(true), MEvent(Event), MContext(detail::getSyclObjImpl(SyclContext)), MHostEvent(false), diff --git a/sycl/source/detail/event_impl.hpp b/sycl/source/detail/event_impl.hpp index e13fa267d09d7..f542f9d20a25d 100644 --- a/sycl/source/detail/event_impl.hpp +++ b/sycl/source/detail/event_impl.hpp @@ -46,7 +46,9 @@ class event_impl { /// If the constructed SYCL event is waited on it will complete immediately. /// Normally constructs a host event, use std::nullopt to instead instantiate /// a device event. - event_impl(std::optional State = HES_Complete); + event_impl(std::optional State = HES_Complete) + : MIsInitialized(false), MHostEvent(State), MIsFlushed(true), + MState(State.value_or(HES_Complete)) {} /// Constructs an event instance from a plug-in event handle. ///