xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

Add `xsimd::arange_batch_constant`

Open AntoinePrv opened this issue 1 month ago • 1 comments

While adding too many utilities for batch_constant may not be a goal, I believe an additional utility to generate a batch_constant with increasing numbers from zeros could be an interesting building block for a few cases:

  • Lane mask: arange_batch_constant<T, A>() / make_batch_constant<T, size / 2, A>();
  • Even numbers mask: arange_batch_constant<T, A>() % make_batch_constant<T, 2, A>();
  • Already used in tests

AntoinePrv avatar Nov 21 '25 11:11 AntoinePrv

And why not: overload interaction with std::integral_constant, to avoid some tedious construction.

  1. I can handle all those, that would be quite fun for me
  2. let's postpone that after the release

serge-sans-paille avatar Nov 21 '25 13:11 serge-sans-paille