Skip to content

Commit 8f3fcd9

Browse files
[NFC][SYCL] Restructure bit_not special handling in sycl::vec (#16991)
So that more code could be unified between non-preview/preview code paths.
1 parent 84d1236 commit 8f3fcd9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sycl/include/sycl/detail/vector_arith.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ BINOP(ShiftLeft , <<) \
161161
BINOP(ShiftRight , >>) \
162162
UOP(std::negate<void> , -) \
163163
UOP(std::logical_not<void> , !) \
164-
/* UOP(std::bit_not<void> , ~) */ \
164+
UOP(std::bit_not<void> , ~) \
165165
UOP(UnaryPlus , +) \
166166
OPASSIGN(std::plus<void> , +=) \
167167
OPASSIGN(std::minus<void> , -=) \
@@ -333,7 +333,10 @@ template <typename Self> struct VecOperators {
333333

334334
#define __SYCL_VEC_UOP_MIXIN(OP, OPERATOR) \
335335
template <typename Op> \
336-
struct OpMixin<Op, std::enable_if_t<std::is_same_v<Op, OP>>> { \
336+
struct OpMixin< \
337+
Op, std::enable_if_t<std::is_same_v<Op, OP> && /* bit_not is handled \
338+
separately below */ \
339+
!std::is_same_v<Op, std::bit_not<void>>>> { \
337340
friend auto operator OPERATOR(const Self &v) { return apply<OP>(v); } \
338341
};
339342

0 commit comments

Comments
 (0)