Replacing the _mm_srli_epi64 Function
This function is used to shift a rightwards based on the size of imm, fill 0s in the vacated bits, and return the operation result.
For details about _mm_srli_epi64, see Intrinsics Guide.
- Code on x86:
__m128i _mm_srli_epi64 (__m128i a, int imm) ;
- Alternative for Kunpeng processors:
#include <arm_neon.h> int64x2_t Arm_mm_srli_epi64 (int64x2_t a,int imm) { int64x2_t ret; if ((imm) <= 0) { ret = a; } else if ((imm)> 63) { ret = vdupq_n_s64(0); } else { ret = vreinterpretq_s64_u64(vshrq_n_u64(vreinterpretq_u64_s64(a), imm)); } return ret; }
Parent topic: Source Code Modification Cases