Skip to content

Commit 67822b4

Browse files
[NFCI][SYCL] Don't get &Self in device_impl from MPlatform (#19614)
Looks like it was necessary when we used `std::shared_ptr<device_impl>` a lot more. No need for it now.
1 parent f119abe commit 67822b4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sycl/source/detail/device_impl.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,9 @@ uint64_t device_impl::getCurrentDeviceTime() {
375375
bool device_impl::extOneapiCanBuild(
376376
ext::oneapi::experimental::source_language Language) {
377377
try {
378-
// Get the shared_ptr to this object from the platform that owns it.
379-
device_impl &Self = MPlatform->getOrMakeDeviceImpl(MDevice);
380378
return sycl::ext::oneapi::experimental::detail::
381379
is_source_kernel_bundle_supported(Language,
382-
std::vector<device_impl *>{&Self});
380+
std::vector<device_impl *>{this});
383381

384382
} catch (sycl::exception &) {
385383
return false;
@@ -390,11 +388,10 @@ bool device_impl::extOneapiCanCompile(
390388
ext::oneapi::experimental::source_language Language) {
391389
try {
392390
// Currently only SYCL language is supported for compiling.
393-
device_impl &Self = MPlatform->getOrMakeDeviceImpl(MDevice);
394391
return Language == ext::oneapi::experimental::source_language::sycl &&
395392
sycl::ext::oneapi::experimental::detail::
396393
is_source_kernel_bundle_supported(
397-
Language, std::vector<device_impl *>{&Self});
394+
Language, std::vector<device_impl *>{this});
398395
} catch (sycl::exception &) {
399396
return false;
400397
}

0 commit comments

Comments
 (0)