@@ -399,14 +399,14 @@ TEST(DynamicLinking, KernelBundleMutualDepBuildIndirect) {
399
399
}
400
400
401
401
template <sycl::bundle_state State>
402
- std::shared_ptr< sycl::detail::device_image_impl>
402
+ sycl::detail::device_image_impl &
403
403
getImage (const sycl::kernel_bundle<State> &KernelBundle,
404
404
const sycl::kernel_id &KernelID) {
405
405
auto It =
406
406
std::find_if (KernelBundle.begin (), KernelBundle.end (),
407
407
[&](auto Image) { return Image.has_kernel (KernelID); });
408
408
EXPECT_NE (It, KernelBundle.end ());
409
- return sycl::detail::getSyclObjImpl (*It);
409
+ return * sycl::detail::getSyclObjImpl (*It);
410
410
}
411
411
412
412
template <sycl::bundle_state State>
@@ -418,16 +418,16 @@ void runSpecConstChecksUnlinked(
418
418
20 );
419
419
// Kernel bundles store spec constant values even if they're not part of any
420
420
// images, check image spec const blobs.
421
- std::shared_ptr< sycl::detail::device_image_impl> ImgA =
421
+ sycl::detail::device_image_impl & ImgA =
422
422
getImage (KernelBundle,
423
423
sycl::get_kernel_id<DynamicLinkingTest::MutualDepKernelA>());
424
- std::vector<unsigned char > &BlobA = ImgA-> get_spec_const_blob_ref ();
424
+ std::vector<unsigned char > &BlobA = ImgA. get_spec_const_blob_ref ();
425
425
int SpecConstVal1 = *reinterpret_cast <int *>(BlobA.data ());
426
426
EXPECT_EQ (SpecConstVal1, 10 );
427
- std::shared_ptr< sycl::detail::device_image_impl> ImgB =
427
+ sycl::detail::device_image_impl & ImgB =
428
428
getImage (KernelBundle,
429
429
sycl::get_kernel_id<DynamicLinkingTest::MutualDepKernelB>());
430
- std::vector<unsigned char > &BlobB = ImgB-> get_spec_const_blob_ref ();
430
+ std::vector<unsigned char > &BlobB = ImgB. get_spec_const_blob_ref ();
431
431
int SpecConstVal2 = *reinterpret_cast <int *>(BlobB.data ());
432
432
EXPECT_EQ (SpecConstVal2, 20 );
433
433
}
@@ -438,16 +438,16 @@ void runSpecConstChecksLinked(
438
438
EXPECT_EQ (KernelBundle.get_specialization_constant <SpecConst2>(), 20 );
439
439
// Kernel bundles store spec constant values even if they're not part of any
440
440
// images, check image spec const blobs.
441
- std::shared_ptr< sycl::detail::device_image_impl> ImgA =
441
+ sycl::detail::device_image_impl & ImgA =
442
442
getImage (KernelBundle,
443
443
sycl::get_kernel_id<DynamicLinkingTest::MutualDepKernelA>());
444
- std::shared_ptr< sycl::detail::device_image_impl> ImgB =
444
+ sycl::detail::device_image_impl & ImgB =
445
445
getImage (KernelBundle,
446
446
sycl::get_kernel_id<DynamicLinkingTest::MutualDepKernelB>());
447
- EXPECT_EQ (ImgA, ImgB);
448
- const std::vector<unsigned char > &Blob = ImgA-> get_spec_const_blob_ref ();
447
+ EXPECT_EQ (& ImgA, & ImgB);
448
+ const std::vector<unsigned char > &Blob = ImgA. get_spec_const_blob_ref ();
449
449
const sycl::detail::device_image_impl::SpecConstMapT &SpecConstMap =
450
- ImgA-> get_spec_const_data_ref ();
450
+ ImgA. get_spec_const_data_ref ();
451
451
452
452
auto It = SpecConstMap.find (" SC1" );
453
453
ASSERT_NE (It, SpecConstMap.end ());
0 commit comments