error: no member named 'bitwise_rshift' in namespace 'xsimd'
mbasmanova opened this issue · 4 comments
I'm new to xsimd and SIMD in general, hence, apologize for a noob's question.
I have a vector int8_t that stores 4-bit integers, 2 values per entry. I'm trying to load values at even indices into one SIMD register and values at odd indices into another SIMD register.
I'm trying to apply bitwise_rshift to a batch of 8-bit integers (int8_t), but getting a compile error:
error: no member named 'bitwise_rshift' in namespace 'xsimd'
std::vector<int8_t> deltas_;
...
const auto bucketMask = xsimd::broadcast(kBucketMask);
auto batch1 = xsimd::load_unaligned(deltas_.data());
batch1 = xsimd::bitwise_and(batch1, bucketMask);
auto batch2 = xsimd::load_unaligned(deltas_.data());
batch2 = xsimd::bitwise_rshift(batch2, 4); // <----------- compile error happens here
I wonder if xsimd::bitwise_rshift is supposed to work and if there is an example of proper usage I could refer to.
Perhaps, I'm missing PR #933 from ~10 months ago.
As a side effect, also expose xsimd::bitwise_lshift and xsimd::bitwise_rshift
functions that were only exposed through their operator counterpart.
I'm able to workaround the compiler error using
batch2 = xsimd::kernel::bitwise_rshift(batch2, 4, xsimd::default_arch{});
can you try with the latest revision of xsimd? This seems to work properly:
https://godbolt.org/z/haabYzcWc
(assuming Intel architecture)
@serge-sans-paille Thanks. It does seem to be a problem with my older version.