xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

Permute/swizzle with non-constant mask

Open Yuhta opened this issue 3 years ago • 1 comments

We are recently using xsimd to make our Velox query evaluation engine portable. One of the gap we found is xsimd only supports constant permutation mask in swizzle. Can we have support for non-constant swizzle?

In our project we are only using permutation as a way of filtering data, so we take a register of data and a bit mask and move all elements with bit mask set to the front of the register, similar to what std::partition is doing. You can refer to the detail here: https://github.com/facebookincubator/velox/blob/main/velox/common/base/SimdUtil.h#L299-L318

We can help integrating either the generic permutation or the filter implementation we have, which I believe is a quite generic pattern.

Yuhta avatar May 20 '22 17:05 Yuhta

I'd be happy to see a generic implemèntation of swizzle being contributed. PR welcome!

serge-sans-paille avatar May 21 '22 05:05 serge-sans-paille

Closed by #927

serge-sans-paille avatar Jun 06 '23 19:06 serge-sans-paille