@@ -33,7 +33,7 @@ template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY I MulWithClMulReduce(I
33
33
static constexpr I MASK = Mask<BITS, I>();
34
34
35
35
const __m128i MOD128 = _mm_cvtsi64_si128 (MOD);
36
- __m128i product = _mm_clmulepi64_si128 (_mm_cvtsi64_si128 (( uint64_t )a) , _mm_cvtsi64_si128 (( uint64_t )b ), 0x00 );
36
+ __m128i product = _mm_clmulepi64_si128 (_mm_cvtsi64_si128 (uint64_t (a)) , _mm_cvtsi64_si128 (uint64_t (b) ), 0x00 );
37
37
if (BITS <= 32 ) {
38
38
__m128i high1 = _mm_srli_epi64 (product, BITS);
39
39
__m128i red1 = _mm_clmulepi64_si128 (high1, MOD128, 0x00 );
@@ -69,7 +69,7 @@ template<typename I, int BITS, int POS> NO_SANITIZE_MEMORY I MulTrinomial(I a, I
69
69
{
70
70
static constexpr I MASK = Mask<BITS, I>();
71
71
72
- __m128i product = _mm_clmulepi64_si128 (_mm_cvtsi64_si128 (( uint64_t )a) , _mm_cvtsi64_si128 (( uint64_t )b ), 0x00 );
72
+ __m128i product = _mm_clmulepi64_si128 (_mm_cvtsi64_si128 (uint64_t (a)) , _mm_cvtsi64_si128 (uint64_t (b) ), 0x00 );
73
73
if (BITS <= 32 ) {
74
74
__m128i high1 = _mm_srli_epi64 (product, BITS);
75
75
__m128i red1 = _mm_xor_si128 (high1, _mm_slli_epi64 (high1, POS));
@@ -92,7 +92,7 @@ template<typename I, int BITS, int POS> NO_SANITIZE_MEMORY I MulTrinomial(I a, I
92
92
return _mm_cvtsi128_si64 (_mm_xor_si128 (_mm_xor_si128 (product, red1), red2)) & MASK;
93
93
}
94
94
} else {
95
- const __m128i MOD128 = _mm_cvtsi64_si128 (1 + ((( uint64_t ) 1 ) << POS));
95
+ const __m128i MOD128 = _mm_cvtsi64_si128 (1 + ((uint64_t { 1 } ) << POS));
96
96
__m128i red1 = _mm_clmulepi64_si128 (high1, MOD128, 0x00 );
97
97
__m128i high2 = _mm_or_si128 (_mm_srli_epi64 (red1, BITS), _mm_srli_si128 (_mm_slli_epi64 (red1, 64 - BITS), 8 ));
98
98
__m128i red2 = _mm_xor_si128 (high2, _mm_slli_epi64 (high2, POS));
@@ -143,7 +143,7 @@ template<typename I, int B, I MOD, I (*MUL)(I, I), typename F, const F* SQR, con
143
143
Elem FromSeed (uint64_t seed) const {
144
144
uint64_t k0 = 0x434c4d554c466c64ull ; // "CLMULFld"
145
145
uint64_t k1 = seed;
146
- uint64_t count = (( uint64_t )B ) << 32 ;
146
+ uint64_t count = (uint64_t (B) ) << 32 ;
147
147
I ret;
148
148
do {
149
149
ret = O::Mask (I (SipHash (k0, k1, count++)));
0 commit comments