@@ -48,7 +48,7 @@ event_impl::~event_impl() {
4848 try {
4949 auto Handle = this ->getHandle ();
5050 if (Handle)
51- getAdapter ()-> call <UrApiKind::urEventRelease>(Handle);
51+ getAdapter (). call <UrApiKind::urEventRelease>(Handle);
5252 } catch (std::exception &e) {
5353 __SYCL_REPORT_EXCEPTION_TO_STREAM (" exception in ~event_impl" , e);
5454 }
@@ -59,7 +59,7 @@ void event_impl::waitInternal(bool *Success) {
5959 if (!MIsHostEvent && Handle) {
6060 // Wait for the native event
6161 ur_result_t Err =
62- getAdapter ()-> call_nocheck <UrApiKind::urEventWait>(1 , &Handle);
62+ getAdapter (). call_nocheck <UrApiKind::urEventWait>(1 , &Handle);
6363 // TODO drop the UR_RESULT_ERROR_UKNOWN from here (this was waiting for
6464 // https://github.com/oneapi-src/unified-runtime/issues/1459 which is now
6565 // closed).
@@ -68,7 +68,7 @@ void event_impl::waitInternal(bool *Success) {
6868 Err == UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS))
6969 *Success = false ;
7070 else {
71- getAdapter ()-> checkUrResult (Err);
71+ getAdapter (). checkUrResult (Err);
7272 if (Success != nullptr )
7373 *Success = true ;
7474 }
@@ -148,9 +148,9 @@ context_impl &event_impl::getContextImpl() {
148148 return *MContext;
149149}
150150
151- const AdapterPtr &event_impl::getAdapter () {
151+ adapter_impl &event_impl::getAdapter () {
152152 initContextIfNeeded ();
153- return MContext->getAdapter ();
153+ return * MContext->getAdapter ();
154154}
155155
156156void event_impl::setStateIncomplete () { MState = HES_NotComplete; }
@@ -166,7 +166,7 @@ event_impl::event_impl(ur_event_handle_t Event, const context &SyclContext,
166166 MIsFlushed (true ), MState(HES_Complete) {
167167
168168 ur_context_handle_t TempContext;
169- getAdapter ()-> call <UrApiKind::urEventGetInfo>(
169+ getAdapter (). call <UrApiKind::urEventGetInfo>(
170170 this ->getHandle (), UR_EVENT_INFO_CONTEXT, sizeof (ur_context_handle_t ),
171171 &TempContext, nullptr );
172172
@@ -519,19 +519,19 @@ ur_native_handle_t event_impl::getNative() {
519519 return {};
520520 initContextIfNeeded ();
521521
522- auto Adapter = getAdapter ();
522+ adapter_impl & Adapter = getAdapter ();
523523 auto Handle = getHandle ();
524524 if (MIsDefaultConstructed && !Handle) {
525525 auto TempContext = MContext.get ()->getHandleRef ();
526526 ur_event_native_properties_t NativeProperties{};
527527 ur_event_handle_t UREvent = nullptr ;
528- Adapter-> call <UrApiKind::urEventCreateWithNativeHandle>(
528+ Adapter. call <UrApiKind::urEventCreateWithNativeHandle>(
529529 0 , TempContext, &NativeProperties, &UREvent);
530530 this ->setHandle (UREvent);
531531 Handle = UREvent;
532532 }
533533 ur_native_handle_t OutHandle;
534- Adapter-> call <UrApiKind::urEventGetNativeHandle>(Handle, &OutHandle);
534+ Adapter. call <UrApiKind::urEventGetNativeHandle>(Handle, &OutHandle);
535535 if (MContext->getBackend () == backend::opencl)
536536 __SYCL_OCL_CALL (clRetainEvent, ur::cast<cl_event>(OutHandle));
537537 return OutHandle;
@@ -569,11 +569,11 @@ void event_impl::flushIfNeeded(queue_impl *UserQueue) {
569569
570570 // Check if the task for this event has already been submitted.
571571 ur_event_status_t Status = UR_EVENT_STATUS_QUEUED;
572- getAdapter ()-> call <UrApiKind::urEventGetInfo>(
572+ getAdapter (). call <UrApiKind::urEventGetInfo>(
573573 Handle, UR_EVENT_INFO_COMMAND_EXECUTION_STATUS, sizeof (ur_event_status_t ),
574574 &Status, nullptr );
575575 if (Status == UR_EVENT_STATUS_QUEUED) {
576- getAdapter ()-> call <UrApiKind::urQueueFlush>(Queue->getHandleRef ());
576+ getAdapter (). call <UrApiKind::urQueueFlush>(Queue->getHandleRef ());
577577 }
578578 MIsFlushed = true ;
579579}
0 commit comments