Skip to content

Commit df00dcb

Browse files
[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.
1 parent 1603bbe commit df00dcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/sycl/sub_group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ vec<T, N> load(const multi_ptr<T, Space, DecorateAddress> src) {
8282
using VecT = sycl::detail::ConvertToOpenCLType_t<vec<BlockT, N>>;
8383
VecT Ret = __spirv_SubgroupBlockReadINTEL<VecT>(convertToBlockPtr(src));
8484

85-
return sycl::bit_cast<typename vec<T, N>::vector_t>(Ret);
85+
return sycl::bit_cast<vec<T, N>>(Ret);
8686
}
8787

8888
template <typename T, access::address_space Space,

0 commit comments

Comments
 (0)