From df00dcb50e4ce07dc475dd0bf176acc323e0a240 Mon Sep 17 00:00:00 2001 From: aelovikov-intel Date: Tue, 7 Jan 2025 16:17:16 -0800 Subject: [PATCH] [NFCI] Avoid double `bit_cast` in `sub_group::load` (#16547) `sycl::vec(vector_t)` ctor is implemented as `bit_cast` itself, so having two steps has no advantage over doing all that in once. Part of the efforts to eliminate `vector_t` usage in the code base before its removal from the SYCL specification. --- sycl/include/sycl/sub_group.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/include/sycl/sub_group.hpp b/sycl/include/sycl/sub_group.hpp index 379e0cf953975..a44f42c44f307 100644 --- a/sycl/include/sycl/sub_group.hpp +++ b/sycl/include/sycl/sub_group.hpp @@ -82,7 +82,7 @@ vec load(const multi_ptr src) { using VecT = sycl::detail::ConvertToOpenCLType_t>; VecT Ret = __spirv_SubgroupBlockReadINTEL(convertToBlockPtr(src)); - return sycl::bit_cast::vector_t>(Ret); + return sycl::bit_cast>(Ret); } template