Skip to content

Commit c6404ee

Browse files
committed
Re-enable vectorized bitwise_invert for integer types
1 parent 2c93211 commit c6404ee

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/bitwise_invert.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ template <typename argT, typename resT> struct BitwiseInvertFunctor
5858

5959
using is_constant = typename std::false_type;
6060
// constexpr resT constant_value = resT{};
61-
using supports_vec = typename std::false_type;
61+
using supports_vec = typename std::negation<std::is_same<argT, bool>>;
6262
using supports_sg_loadstore = typename std::true_type;
63-
;
6463

6564
resT operator()(const argT &in) const
6665
{
@@ -71,6 +70,12 @@ template <typename argT, typename resT> struct BitwiseInvertFunctor
7170
return ~in;
7271
}
7372
}
73+
74+
template <int vec_sz>
75+
sycl::vec<resT, vec_sz> operator()(const sycl::vec<argT, vec_sz> &in) const
76+
{
77+
return ~in;
78+
}
7479
};
7580

7681
template <typename argT,

0 commit comments

Comments
 (0)