aboutsummaryrefslogtreecommitdiff
path: root/src/arch/avx2.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-08-06 11:33:51 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-08-06 11:33:51 +0200
commitd9cbff9e9efbd6a84211ed001c3d0ea8b6fd3057 (patch)
treeca65e4b0f7f7d4a61c2205d54ad2610abe6713db /src/arch/avx2.h
parent950f3f27b1bbd883767ae282be25414e04f11465 (diff)
downloadnissy-core-d9cbff9e9efbd6a84211ed001c3d0ea8b6fd3057.tar.gz
nissy-core-d9cbff9e9efbd6a84211ed001c3d0ea8b6fd3057.zip
Remove AVX512 instruction
Diffstat (limited to 'src/arch/avx2.h')
-rw-r--r--src/arch/avx2.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/arch/avx2.h b/src/arch/avx2.h
index cb9c0cd..74aad53 100644
--- a/src/arch/avx2.h
+++ b/src/arch/avx2.h
@@ -430,13 +430,12 @@ invcoord_epe(uint64_t i)
430STATIC_INLINE bool 430STATIC_INLINE bool
431is_eo_even(cube_t cube) 431is_eo_even(cube_t cube)
432{ 432{
433 uint8_t count; 433 uint32_t mask;
434 __m256i e; 434 __m256i e;
435 435
436 e = _mm256_and_si256(cube, EO_AVX2); 436 e = _mm256_and_si256(cube, EO_AVX2);
437 e = _mm256_srli_si256(e, EOSHIFT); 437 e = _mm256_slli_epi16(e, 7-EOSHIFT);
438 mask = _mm256_movemask_epi8(e);
438 439
439 count = _mm256_reduce_add_epi8(e); 440 return popcount_u32(mask) % 2;
440
441 return count % 2 == 0;
442} 441}

Generated with cgit - Back to sebastiano.tronto.net