Skip to content

Commit

Permalink
[NFCI] Avoid double bit_cast in sub_group::load (#16547)
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
aelovikov-intel authored Jan 8, 2025
1 parent 1603bbe commit df00dcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sycl/include/sycl/sub_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ vec<T, N> load(const multi_ptr<T, Space, DecorateAddress> src) {
using VecT = sycl::detail::ConvertToOpenCLType_t<vec<BlockT, N>>;
VecT Ret = __spirv_SubgroupBlockReadINTEL<VecT>(convertToBlockPtr(src));

return sycl::bit_cast<typename vec<T, N>::vector_t>(Ret);
return sycl::bit_cast<vec<T, N>>(Ret);
}

template <typename T, access::address_space Space,
Expand Down

0 comments on commit df00dcb

Please sign in to comment.