aboutsummaryrefslogtreecommitdiff
path: root/src/arch/neon.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-04-06 15:18:26 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-04-06 15:18:26 +0200
commitfe534f1497da6447153064d7bba00243000f803b (patch)
tree851cd657931dce7584baf00cf092360416161793 /src/arch/neon.h
parentb729562fc3c1b85f1ea9a19fadd1caaf85b85777 (diff)
downloadnissy-core-fe534f1497da6447153064d7bba00243000f803b.tar.gz
nissy-core-fe534f1497da6447153064d7bba00243000f803b.zip
Added popcount_u64
Diffstat (limited to 'src/arch/neon.h')
-rw-r--r--src/arch/neon.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/arch/neon.h b/src/arch/neon.h
index f997813..725e589 100644
--- a/src/arch/neon.h
+++ b/src/arch/neon.h
@@ -47,6 +47,17 @@ popcount_u32(uint32_t x)
47 return (int)x; 47 return (int)x;
48} 48}
49 49
50STATIC_INLINE int
51popcount_u64(uint64_t x)
52{
53 int top, bottom;
54
55 bottom = popcount_u32((uint32_t)(x & UINT64_C(0xFFFFFFFF)));
56 top = popcount_u32((uint32_t)(x >> UINT64_C(32)));
57
58 return top + bottom;
59}
60
50STATIC void 61STATIC void
51pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12]) 62pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12])
52{ 63{

Generated with cgit - Back to sebastiano.tronto.net