@@ -255,15 +255,15 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
255255#endif
256256 throw_asynchronous ();
257257 auto status =
258- getAdapter ()-> call_nocheck <UrApiKind::urQueueRelease>(MQueue);
258+ getAdapter (). call_nocheck <UrApiKind::urQueueRelease>(MQueue);
259259 // If loader is already closed, it'll return a not-initialized status
260260 // which the UR should convert to SUCCESS code. But that isn't always
261261 // working on Windows. This is a temporary workaround until that is fixed.
262262 // TODO: Remove this workaround when UR is fixed, and restore
263263 // ->call<>() instead of ->call_nocheck<>() above.
264264 if (status != UR_RESULT_SUCCESS &&
265265 status != UR_RESULT_ERROR_UNINITIALIZED) {
266- __SYCL_CHECK_UR_CODE_NO_EXC (status, getAdapter ()-> getBackend ());
266+ __SYCL_CHECK_UR_CODE_NO_EXC (status, getAdapter (). getBackend ());
267267 }
268268 } catch (std::exception &e) {
269269 __SYCL_REPORT_EXCEPTION_TO_STREAM (" exception in ~queue_impl" , e);
@@ -274,8 +274,8 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
274274
275275 cl_command_queue get () {
276276 ur_native_handle_t nativeHandle = 0 ;
277- getAdapter ()-> call <UrApiKind::urQueueGetNativeHandle>(MQueue, nullptr ,
278- &nativeHandle);
277+ getAdapter (). call <UrApiKind::urQueueGetNativeHandle>(MQueue, nullptr ,
278+ &nativeHandle);
279279 __SYCL_OCL_CALL (clRetainCommandQueue, ur::cast<cl_command_queue>(nativeHandle));
280280 return ur::cast<cl_command_queue>(nativeHandle);
281281 }
@@ -285,7 +285,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
285285 return createSyclObjFromImpl<context>(MContext);
286286 }
287287
288- const AdapterPtr &getAdapter () const { return MContext->getAdapter (); }
288+ adapter_impl &getAdapter () const { return * MContext->getAdapter (); }
289289
290290#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
291291 const std::shared_ptr<context_impl> &getContextImplPtr () const {
@@ -325,7 +325,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
325325 " flush cannot be called for a queue which is "
326326 " recording to a command graph." );
327327 }
328- getAdapter ()-> call <UrApiKind::urQueueFlush>(MQueue);
328+ getAdapter (). call <UrApiKind::urQueueFlush>(MQueue);
329329 }
330330
331331 // / Submits a command group function object to the queue, in order to be
@@ -487,7 +487,6 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
487487 ur_queue_handle_t Queue{};
488488 ur_context_handle_t Context = MContext->getHandleRef ();
489489 ur_device_handle_t Device = MDevice.getHandleRef ();
490- const AdapterPtr &Adapter = getAdapter ();
491490 /*
492491 sycl::detail::pi::PiQueueProperties Properties[] = {
493492 PI_QUEUE_FLAGS, createPiQueueProperties(MPropList, Order), 0, 0, 0};
@@ -503,8 +502,8 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
503502 .get_index ();
504503 Properties.pNext = &IndexProperties;
505504 }
506- Adapter-> call <UrApiKind::urQueueCreate>(Context, Device, &Properties,
507- &Queue);
505+ getAdapter (). call <UrApiKind::urQueueCreate>(Context, Device, &Properties,
506+ &Queue);
508507
509508 return Queue;
510509 }
@@ -665,8 +664,8 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
665664 EventImplPtr insertMarkerEvent () {
666665 auto ResEvent = detail::event_impl::create_device_event (*this );
667666 ur_event_handle_t UREvent = nullptr ;
668- getAdapter ()-> call <UrApiKind::urEnqueueEventsWait>(getHandleRef (), 0 ,
669- nullptr , &UREvent);
667+ getAdapter (). call <UrApiKind::urEnqueueEventsWait>(getHandleRef (), 0 ,
668+ nullptr , &UREvent);
670669 ResEvent->setHandle (UREvent);
671670 return ResEvent;
672671 }
@@ -690,7 +689,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
690689 queue_impl &Queue = Handler.impl ->get_queue ();
691690 auto ResEvent = detail::event_impl::create_device_event (Queue);
692691 ur_event_handle_t UREvent = nullptr ;
693- getAdapter ()-> call <UrApiKind::urEnqueueEventsWaitWithBarrier>(
692+ getAdapter (). call <UrApiKind::urEnqueueEventsWaitWithBarrier>(
694693 Queue.getHandleRef (), 0 , nullptr , &UREvent);
695694 ResEvent->setHandle (UREvent);
696695 return ResEvent;
0 commit comments