xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

Add arange

Open wolfv opened this issue 6 years ago • 1 comments

SIMDified arange can give a ~4x improvement about std::iota and for loops.

wolfv avatar Jun 11 '18 17:06 wolfv

The algorithm would be extremely simple:

xsimd::batch<double, 4> x(0,1,2,3);
xsimd::batch<double, 4> step(4);

for (...)
    assign (x)
    x = x + step;

needs some adjustments for step size but should all be fairly straightforward.

wolfv avatar Jun 11 '18 17:06 wolfv

This should go to https://github.com/xtensor-stack/xsimd-algorithm

serge-sans-paille avatar Dec 29 '22 16:12 serge-sans-paille