xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

bitwise_not doesn't work with batch_bool

Open nilsdeppe opened this issue 1 year ago • 0 comments

Hi folks!

Thanks for the great library! It's a real pleasure to use and provides really fantastic performance improvements! (As you probably know :D )

I've tried to use xsimd::bitwise_not(batch_bool) and this gives a compiler error. Example code:

#include <xsimd/xsimd.hpp>
namespace xs = xsimd;
int main() {
  const xs::batch<double> b(0.0);
  const auto mask = xs::bitwise_not(b != xs::batch<double>(1.0));
}

Error:

error: no matching function for call to 'bitwise_not'
/usr/local/include/xsimd/types/xsimd_api.hpp:284:24: note: candidate template ignored: could not match 'batch' against 'batch_bool'
    inline batch<T, A> bitwise_not(batch<T, A> const& x) noexcept

I'm using AVX2 and clang 13 with xsimd 8.1.0.

nilsdeppe avatar Aug 03 '22 12:08 nilsdeppe