@@ -215,7 +215,7 @@ void event_impl::setQueue(queue_impl &Queue) {
215
215
void event_impl::setSubmittedQueue (std::weak_ptr<queue_impl> SubmittedQueue) {
216
216
MSubmittedQueue = std::move (SubmittedQueue);
217
217
if (MHostProfilingInfo) {
218
- if (auto QueuePtr = MSubmittedQueue.lock ()) {
218
+ if (std::shared_ptr<queue_impl> QueuePtr = MSubmittedQueue.lock ()) {
219
219
device_impl &Device = QueuePtr->getDeviceImpl ();
220
220
MHostProfilingInfo->setDevice (&Device);
221
221
}
@@ -248,7 +248,7 @@ void *event_impl::instrumentationProlog(std::string &Name, int32_t StreamID,
248
248
// queue is available with the wait events. We check to see if the
249
249
// TraceEvent is available in the Queue object.
250
250
void *TraceEvent = nullptr ;
251
- if (auto Queue = MQueue.lock ()) {
251
+ if (std::shared_ptr<queue_impl> Queue = MQueue.lock ()) {
252
252
TraceEvent = Queue->getTraceEvent ();
253
253
WaitEvent =
254
254
(TraceEvent ? static_cast <xpti_td *>(TraceEvent) : GSYCLGraphEvent);
@@ -317,7 +317,7 @@ void event_impl::wait_and_throw(
317
317
std::shared_ptr<sycl::detail::event_impl> Self) {
318
318
wait (Self);
319
319
320
- if (auto SubmittedQueue = MSubmittedQueue.lock ())
320
+ if (std::shared_ptr<queue_impl> SubmittedQueue = MSubmittedQueue.lock ())
321
321
SubmittedQueue->throw_asynchronous ();
322
322
}
323
323
@@ -462,7 +462,7 @@ event_impl::get_backend_info<info::platform::version>() const {
462
462
" the info::platform::version info descriptor can "
463
463
" only be queried with an OpenCL backend" );
464
464
}
465
- if (auto Queue = MQueue.lock ()) {
465
+ if (std::shared_ptr<queue_impl> Queue = MQueue.lock ()) {
466
466
return Queue->getDeviceImpl ()
467
467
.get_platform ()
468
468
.get_info <info::platform::version>();
@@ -485,7 +485,7 @@ event_impl::get_backend_info<info::device::version>() const {
485
485
" the info::device::version info descriptor can only "
486
486
" be queried with an OpenCL backend" );
487
487
}
488
- if (auto Queue = MQueue.lock ()) {
488
+ if (std::shared_ptr<queue_impl> Queue = MQueue.lock ()) {
489
489
return Queue->getDeviceImpl ().get_info <info::device::version>();
490
490
}
491
491
return " " ; // If the queue has been released, no device will be associated so
@@ -604,7 +604,8 @@ void event_impl::setSubmissionTime() {
604
604
if (!MIsProfilingEnabled && !MProfilingTagEvent)
605
605
return ;
606
606
607
- if (auto Queue = isHost () ? MSubmittedQueue.lock () : MQueue.lock ()) {
607
+ if (std::shared_ptr<queue_impl> Queue =
608
+ isHost () ? MSubmittedQueue.lock () : MQueue.lock ()) {
608
609
device_impl &Device = Queue->getDeviceImpl ();
609
610
MSubmitTime = getTimestamp (&Device);
610
611
}
0 commit comments