xsimd
xsimd copied to clipboard
store_aligned second parameter should be batch<T, N> not simd_type
In order to call store_aligned / unaligned in a generic fashion we should make the second parameter also aware of the batch size not being the max batch size (e.g. storing a SSE batch with this function when AVX is available doesn't work right now).
Hi, is there some kind of workaround for this issue? I must admit this is quite inconvenient in my case, where I want to manage batches of size 4 with an AVX compilation.
thx
Yes, definitely, you can always call the store aligned member function of the batch!
float* ptr;
xsimd::batch<float, 4> a(0, 1, 2, 3);
a.store_aligned(ptr);
...
@wolfv : thanks, that did the trick indeed :-)
Good to hear. If you want to contribute and open a PR that implements this for the free functions, that would be very appreciated :)
@wolfv : Contributing to xsimd would be great, but for now I haven't got enough bandwidth. Anyway I keep the idea in my mind ;-) Another feature I would be interested in is having shuffle/permutation capabilities in xsimd.
We now have a free function for loading / storing, and the simd_type / batch type distinction doesn't exist anymore → closing.