Skip to content

Commit

Permalink
Merge pull request #652 from rouault/_MM_SHUFFLE2
Browse files Browse the repository at this point in the history
Add _MM_SHUFFLE2() macro for shuffle parameter for _mm_shuffle_pd()
  • Loading branch information
jserv authored Nov 4, 2024
2 parents 5b35287 + 1f3d2b5 commit a0998f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sse2neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,15 @@ FORCE_INLINE void _sse2neon_smp_mb(void)
#define _MM_SHUFFLE(fp3, fp2, fp1, fp0) \
(((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | ((fp0)))

/**
* MACRO for shuffle parameter for _mm_shuffle_pd().
* Argument fp1 is a digit[01] that represents the fp from argument "b"
* of mm_shuffle_pd that will be placed in fp1 of result.
* fp0 is a digit[01] that represents the fp from argument "a" of mm_shuffle_pd
* that will be placed in fp0 of result.
*/
#define _MM_SHUFFLE2(fp1, fp0) (((fp1) << 1) | (fp0))

#if __has_builtin(__builtin_shufflevector)
#define _sse2neon_shuffle(type, a, b, ...) \
__builtin_shufflevector(a, b, __VA_ARGS__)
Expand Down

0 comments on commit a0998f0

Please sign in to comment.