33
44#include < cstdint>
55
6- #include " ../config.h"
7-
86#if defined(__ANDROID__) || (defined(__linux__) && defined(__ARM_ARCH))
97 // A C/C++ header file that converts Intel SSE intrinsics to Arm/Aarch64 NEON intrinsics.
108 #include < sse2neon.h>
@@ -28,31 +26,31 @@ struct I32x4 {
2826 v = _mm_setr_epi32 (x, y, z, w);
2927 }
3028
31- inline static I32x4 splat (int32_t x) {
29+ static I32x4 splat (int32_t x) {
3230 return I32x4 (_mm_set1_epi32 (x));
3331 }
3432
35- inline I32x4 shift_l (int32_t count) const {
33+ I32x4 shift_l (int32_t count) const {
3634 // Same as _mm_sllv_epi32(v, _mm_set1_epi32(count)), but that requires AVX2.
3735 // Cf. https://stackoverflow.com/questions/14731442/am-i-using-mm-srl-epi32-wrong
3836 return I32x4 (_mm_sll_epi32 (v, _mm_set_epi32 (0 , 0 , 0 , count)));
3937 }
4038
41- inline I32x4 shift_r (int32_t count) const {
39+ I32x4 shift_r (int32_t count) const {
4240 // Same as _mm_srlv_epi32(v, _mm_set1_epi32(count)), but that requires AVX2.
4341 // Cf. https://stackoverflow.com/questions/14731442/am-i-using-mm-srl-epi32-wrong
4442 return I32x4 (_mm_srl_epi32 (v, _mm_set_epi32 (0 , 0 , 0 , count)));
4543 }
4644
47- inline I32x4 operator +(const I32x4 &b) const {
45+ I32x4 operator +(const I32x4 &b) const {
4846 return I32x4 (_mm_add_epi32 (v, b.v ));
4947 }
5048
51- inline I32x4 operator -(const I32x4 &b) const {
49+ I32x4 operator -(const I32x4 &b) const {
5250 return I32x4 (_mm_sub_epi32 (v, b.v ));
5351 }
5452
55- inline I32x4 operator *(const I32x4 &b) const {
53+ I32x4 operator *(const I32x4 &b) const {
5654 // Multiply 2 and 0.
5755 __m128i tmp1 = _mm_mul_epu32 (v, b.v );
5856 // Multiply 3 and 1.
@@ -62,11 +60,11 @@ struct I32x4 {
6260 return I32x4 (_mm_unpacklo_epi32 (_mm_shuffle_epi32 (tmp1, 8 ), _mm_shuffle_epi32 (tmp2, 8 )));
6361 }
6462
65- inline void operator +=(const I32x4 &b) {
63+ void operator +=(const I32x4 &b) {
6664 *this = *this + b;
6765 }
6866
69- inline void operator -=(const I32x4 &b) {
67+ void operator -=(const I32x4 &b) {
7068 *this = *this - b;
7169 }
7270};
0 commit comments