Skip to content

Conversation

@AntoinePrv
Copy link
Contributor

@AntoinePrv AntoinePrv commented Nov 10, 2025

Add 8 and 16 bits AVX2 swizzle implementation.
These two sizes are not available on AVX.
Algorithm very similar to GH-1189.

@AntoinePrv AntoinePrv mentioned this pull request Nov 10, 2025
@serge-sans-paille
Copy link
Contributor

looking at the build failure on x86_64, you need to add some std::enable_if to disambiguate.

@AntoinePrv
Copy link
Contributor Author

Or could it be that I should add the 8/16 bits overload as batch constants as well (which we'd also want)?

@AntoinePrv
Copy link
Contributor Author

AntoinePrv commented Nov 11, 2025

Seems like the failure is already on main.
The batch_constant is simply a naive fallback, I will address them in a separate PR.
CC @JohanMabille

@serge-sans-paille
Copy link
Contributor

Looks good, squash everything with a nice commit message and we're good to go!


// swizzle (constant mask)
template <
class A, typename T,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could you use a variadic argument count here and just static_assert on the count? (here and the function below).

@AntoinePrv
Copy link
Contributor Author

@serge-sans-paille you should be able to squash-merge directly from the Github UI once ready.
Let me know if you prefer I squash instead.

@serge-sans-paille serge-sans-paille merged commit 4393266 into xtensor-stack:master Nov 11, 2025
56 of 59 checks passed
@serge-sans-paille
Copy link
Contributor

@AntoinePrv : I've done it but I generally prefer when the author creates a consistent commit message during the squash: the author knows better!

@AntoinePrv AntoinePrv deleted the swizzle-avx2 branch November 11, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants