@@ -399,14 +399,14 @@ TEST(DynamicLinking, KernelBundleMutualDepBuildIndirect) {
399399}
400400
401401template <sycl::bundle_state State>
402- std::shared_ptr< sycl::detail::device_image_impl>
402+ sycl::detail::device_image_impl &
403403getImage (const sycl::kernel_bundle<State> &KernelBundle,
404404 const sycl::kernel_id &KernelID) {
405405 auto It =
406406 std::find_if (KernelBundle.begin (), KernelBundle.end (),
407407 [&](auto Image) { return Image.has_kernel (KernelID); });
408408 EXPECT_NE (It, KernelBundle.end ());
409- return sycl::detail::getSyclObjImpl (*It);
409+ return * sycl::detail::getSyclObjImpl (*It);
410410}
411411
412412template <sycl::bundle_state State>
@@ -418,16 +418,16 @@ void runSpecConstChecksUnlinked(
418418 20 );
419419 // Kernel bundles store spec constant values even if they're not part of any
420420 // images, check image spec const blobs.
421- std::shared_ptr< sycl::detail::device_image_impl> ImgA =
421+ sycl::detail::device_image_impl & ImgA =
422422 getImage (KernelBundle,
423423 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 ();
425425 int SpecConstVal1 = *reinterpret_cast <int *>(BlobA.data ());
426426 EXPECT_EQ (SpecConstVal1, 10 );
427- std::shared_ptr< sycl::detail::device_image_impl> ImgB =
427+ sycl::detail::device_image_impl & ImgB =
428428 getImage (KernelBundle,
429429 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 ();
431431 int SpecConstVal2 = *reinterpret_cast <int *>(BlobB.data ());
432432 EXPECT_EQ (SpecConstVal2, 20 );
433433}
@@ -438,16 +438,16 @@ void runSpecConstChecksLinked(
438438 EXPECT_EQ (KernelBundle.get_specialization_constant <SpecConst2>(), 20 );
439439 // Kernel bundles store spec constant values even if they're not part of any
440440 // images, check image spec const blobs.
441- std::shared_ptr< sycl::detail::device_image_impl> ImgA =
441+ sycl::detail::device_image_impl & ImgA =
442442 getImage (KernelBundle,
443443 sycl::get_kernel_id<DynamicLinkingTest::MutualDepKernelA>());
444- std::shared_ptr< sycl::detail::device_image_impl> ImgB =
444+ sycl::detail::device_image_impl & ImgB =
445445 getImage (KernelBundle,
446446 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 ();
449449 const sycl::detail::device_image_impl::SpecConstMapT &SpecConstMap =
450- ImgA-> get_spec_const_data_ref ();
450+ ImgA. get_spec_const_data_ref ();
451451
452452 auto It = SpecConstMap.find (" SC1" );
453453 ASSERT_NE (It, SpecConstMap.end ());
0 commit comments