@@ -215,7 +215,7 @@ void event_impl::setQueue(queue_impl &Queue) {
215215void event_impl::setSubmittedQueue (std::weak_ptr<queue_impl> SubmittedQueue) {
216216 MSubmittedQueue = std::move (SubmittedQueue);
217217 if (MHostProfilingInfo) {
218- if (auto QueuePtr = MSubmittedQueue.lock ()) {
218+ if (std::shared_ptr<queue_impl> QueuePtr = MSubmittedQueue.lock ()) {
219219 device_impl &Device = QueuePtr->getDeviceImpl ();
220220 MHostProfilingInfo->setDevice (&Device);
221221 }
@@ -248,7 +248,7 @@ void *event_impl::instrumentationProlog(std::string &Name, int32_t StreamID,
248248 // queue is available with the wait events. We check to see if the
249249 // TraceEvent is available in the Queue object.
250250 void *TraceEvent = nullptr ;
251- if (auto Queue = MQueue.lock ()) {
251+ if (std::shared_ptr<queue_impl> Queue = MQueue.lock ()) {
252252 TraceEvent = Queue->getTraceEvent ();
253253 WaitEvent =
254254 (TraceEvent ? static_cast <xpti_td *>(TraceEvent) : GSYCLGraphEvent);
@@ -317,7 +317,7 @@ void event_impl::wait_and_throw(
317317 std::shared_ptr<sycl::detail::event_impl> Self) {
318318 wait (Self);
319319
320- if (auto SubmittedQueue = MSubmittedQueue.lock ())
320+ if (std::shared_ptr<queue_impl> SubmittedQueue = MSubmittedQueue.lock ())
321321 SubmittedQueue->throw_asynchronous ();
322322}
323323
@@ -462,7 +462,7 @@ event_impl::get_backend_info<info::platform::version>() const {
462462 " the info::platform::version info descriptor can "
463463 " only be queried with an OpenCL backend" );
464464 }
465- if (auto Queue = MQueue.lock ()) {
465+ if (std::shared_ptr<queue_impl> Queue = MQueue.lock ()) {
466466 return Queue->getDeviceImpl ()
467467 .get_platform ()
468468 .get_info <info::platform::version>();
@@ -485,7 +485,7 @@ event_impl::get_backend_info<info::device::version>() const {
485485 " the info::device::version info descriptor can only "
486486 " be queried with an OpenCL backend" );
487487 }
488- if (auto Queue = MQueue.lock ()) {
488+ if (std::shared_ptr<queue_impl> Queue = MQueue.lock ()) {
489489 return Queue->getDeviceImpl ().get_info <info::device::version>();
490490 }
491491 return " " ; // If the queue has been released, no device will be associated so
@@ -559,7 +559,7 @@ void event_impl::flushIfNeeded(queue_impl *UserQueue) {
559559 if (MIsFlushed || !Handle)
560560 return ;
561561
562- auto Queue = MQueue.lock ();
562+ std::shared_ptr<queue_impl> Queue = MQueue.lock ();
563563 // If the queue has been released, all of the commands have already been
564564 // implicitly flushed by urQueueRelease.
565565 if (!Queue) {
@@ -604,7 +604,8 @@ void event_impl::setSubmissionTime() {
604604 if (!MIsProfilingEnabled && !MProfilingTagEvent)
605605 return ;
606606
607- if (auto Queue = isHost () ? MSubmittedQueue.lock () : MQueue.lock ()) {
607+ if (std::shared_ptr<queue_impl> Queue =
608+ isHost () ? MSubmittedQueue.lock () : MQueue.lock ()) {
608609 device_impl &Device = Queue->getDeviceImpl ();
609610 MSubmitTime = getTimestamp (&Device);
610611 }
0 commit comments