From efd0fc5ec942a24a89334aefb61103f8e00f8895 Mon Sep 17 00:00:00 2001 From: Isaac Ault Date: Tue, 20 Feb 2024 18:56:17 +0000 Subject: [PATCH] Fix Merge * Use convertToOpenCLType helper --- sycl/include/sycl/detail/image_ocl_types.hpp | 22 ++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/sycl/include/sycl/detail/image_ocl_types.hpp b/sycl/include/sycl/detail/image_ocl_types.hpp index d0913f75365d5..ae95060493675 100644 --- a/sycl/include/sycl/detail/image_ocl_types.hpp +++ b/sycl/include/sycl/detail/image_ocl_types.hpp @@ -85,12 +85,11 @@ static RetType __invoke__ImageArrayRead(ImageT Img, CoordT Coords, // Convert from sycl types to builtin types to get correct function mangling. using TempRetT = sycl::detail::ConvertToOpenCLType_t; - using TempArgT = sycl::detail::ConvertToOpenCLType_t; + auto TmpCoords = sycl::detail::convertToOpenCLType(Coords); - TempArgT Arg = sycl::detail::convertDataToType(Coords); - TempRetT Ret = - __spirv_ImageArrayRead(Img, Arg, ArrayLayer); - return sycl::detail::convertDataToType(Ret); + return sycl::detail::convertFromOpenCLTypeFor( + __spirv_ImageArrayRead( + Img, TmpCoords, ArrayLayer)); } template @@ -98,14 +97,11 @@ static void __invoke__ImageArrayWrite(ImageT Img, CoordT Coords, int ArrayLayer, ValT Val) { // Convert from sycl types to builtin types to get correct function mangling. - using TmpValT = sycl::detail::ConvertToOpenCLType_t; - using TmpCoordT = sycl::detail::ConvertToOpenCLType_t; - - TmpCoordT TmpCoord = - sycl::detail::convertDataToType(Coords); - TmpValT TmpVal = sycl::detail::convertDataToType(Val); - __spirv_ImageArrayWrite(Img, TmpCoord, ArrayLayer, - TmpVal); + auto TmpCoords = sycl::detail::convertToOpenCLType(Coords); + auto TmpVal = sycl::detail::convertToOpenCLType(Val); + + __spirv_ImageArrayWrite( + Img, TmpCoords, ArrayLayer, TmpVal); } template