You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support gather for different sizes of types on data and indices #751
We are recently using xsimd to make our Velox query evaluation engine portable. One of the gap we found is xsimd does not support gather for different sizes of types on data and indices. For example we have gather of int64 data with int32 indices, and this can be implemented using __m256i as data register and __m128i as index register on AVX2. Is there a way to solve this? You can refer to our implementation for some idea. If you agree with our approach, we can even help integrate the implementation into xsimd.
I am happy to answer any questions you have. And thank you for creating this library, it really helps to allow us to rewrite our SIMD code in a portable and readable manner.
Activity
serge-sans-paille commentedon May 21, 2022
I'm not sure about the
HalfBatch, but if I ere to implement it in xsimd, I would make it a type adaptor, something alikexsimd::half_batch<B>::typeinstead of introducing new batch types. It would mapbatch<float, avx2>tobatch<float, sse4.2>But the fact that it doesn't have any specialization for
sseit disturbs me.amyspark commentedon May 24, 2022
This is what I did to hand-optimize two cases we use at Krita:
xsimd/include/xsimd/arch/xsimd_avx2.hpp
Lines 350 to 369 in c7567bb
Instead of using separate batch types, I would suggest to SFINAE on the size of the index batch.