forked from klauspost/reedsolomon
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cbits: Use
__builtin_shuffle
for generic code
GCC has a built-in function to shuffle vectors the way we need to called `__builtin_shuffle`. This commit changes the code to use the built-in in the 'generic' case (i.e. when no host-specific SIMD implementation is available). One could argue this could be used to replace all host-specific implementations, but it turns out the built-in generates slightly more code than the hand-rolled intrinsics calls. Use of the built-in is depending on a `configure` test. Since this test needs to execute some real code (to ensure the built-in does what it's expected to), this will always fail when cross-compiling. In such scenario, the built-in is not used and the 'old' byte-by-byte generic shuffle code remains in place.
- Loading branch information
Showing
2 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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