matchfinder_common: fix conditions for vectorized init and rebase

This commit is contained in:
Eric Biggers 2017-05-29 17:38:35 -07:00
parent 1f8090cda1
commit a53e457a5a
3 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ matchfinder_init_avx2(mf_pos_t *data, size_t size)
__m256i v, *p; __m256i v, *p;
size_t n; size_t n;
if (size % sizeof(__m256i) * 4) if (size % (sizeof(__m256i) * 4) != 0)
return false; return false;
STATIC_ASSERT(sizeof(mf_pos_t) == 2); STATIC_ASSERT(sizeof(mf_pos_t) == 2);
@ -34,7 +34,7 @@ matchfinder_rebase_avx2(mf_pos_t *data, size_t size)
__m256i v, *p; __m256i v, *p;
size_t n; size_t n;
if ((size % sizeof(__m256i) * 4 != 0)) if (size % (sizeof(__m256i) * 4) != 0)
return false; return false;
STATIC_ASSERT(sizeof(mf_pos_t) == 2); STATIC_ASSERT(sizeof(mf_pos_t) == 2);

View File

@ -11,7 +11,7 @@ matchfinder_init_neon(mf_pos_t *data, size_t size)
int16x8_t v, *p; int16x8_t v, *p;
size_t n; size_t n;
if (size % sizeof(int16x8_t) * 4) if (size % (sizeof(int16x8_t) * 4) != 0)
return false; return false;
STATIC_ASSERT(sizeof(mf_pos_t) == 2); STATIC_ASSERT(sizeof(mf_pos_t) == 2);
@ -38,7 +38,7 @@ matchfinder_rebase_neon(mf_pos_t *data, size_t size)
int16x8_t v, *p; int16x8_t v, *p;
size_t n; size_t n;
if ((size % sizeof(int16x8_t) * 4 != 0)) if (size % (sizeof(int16x8_t) * 4) != 0)
return false; return false;
STATIC_ASSERT(sizeof(mf_pos_t) == 2); STATIC_ASSERT(sizeof(mf_pos_t) == 2);

View File

@ -11,7 +11,7 @@ matchfinder_init_sse2(mf_pos_t *data, size_t size)
__m128i v, *p; __m128i v, *p;
size_t n; size_t n;
if (size % sizeof(__m128i) * 4) if (size % (sizeof(__m128i) * 4) != 0)
return false; return false;
STATIC_ASSERT(sizeof(mf_pos_t) == 2); STATIC_ASSERT(sizeof(mf_pos_t) == 2);
@ -34,7 +34,7 @@ matchfinder_rebase_sse2(mf_pos_t *data, size_t size)
__m128i v, *p; __m128i v, *p;
size_t n; size_t n;
if ((size % sizeof(__m128i) * 4 != 0)) if (size % (sizeof(__m128i) * 4) != 0)
return false; return false;
STATIC_ASSERT(sizeof(mf_pos_t) == 2); STATIC_ASSERT(sizeof(mf_pos_t) == 2);