xsimd
xsimd copied to clipboard
Handle loading of bool* correctly
Currently, it's not possible to load from a bool pointer.
E.g.
xt::uvector<bool> xbools(100, true);
xsimd::load_unaligned(&xbools[0])
fails with substitution errors. Now it's actually a question what we should do here. Maybe we should map bools to batches with sizeof(bool) elements? batch<char, 8>(bool*)...
Note I am using uvector here because std::vector uses a bitmask ... :)
The bool type matches with xsimd::batch_bool<T, Arch>
, so provided you know which type of boolean mask you want to load, xsimd supports xsimd::batch_bool<T, Arch>::load_unaligned(bool*)
, see https://godbolt.org/z/zvMeE9b6E