Add portable SIMD swizzle, multishift, compress, and expand - #349
Open
Novum wants to merge 1 commit into
Open
Conversation
^ Conflicts: ^ CHANGELOG.md ^ fearless_simd_gen/src/mk_neon.rs ^ fearless_simd_gen/src/mk_wasm.rs ^ fearless_simd_gen/src/mk_x86.rs
Novum
force-pushed
the
fearless-simd-swizzle-multishift-compress-expand
branch
from
August 25, 2026 08:00
0978b34 to
903da47
Compare
Contributor
|
Thanks for the PR! I really don't want to add ops that only exist on AVX-512 as "portable" ops. The proper way to deal with these is to write a I can see us adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I needed those ops in a project of mine so I gave it a go.
This adds 128-, 256-, and 512-bit operations for concatenated dynamic swizzles, per-64-bit-lane multishift, masked compression/expansion, and masked expand-loads.
Concatenated swizzles use optimized existing primitives on SSE4.2, AVX2, Neon, and Wasm, while AVX-512 uses native VBMI/VBMI2 instructions.
As usual there are scalar fallbacks for portable code.