bug 1244: add url to original source of pos popcount
[libreriscv.git] / conferences / fosdem2024 / fosdem2024_ddffirst / pospopcount.c
index df0983aeeac58890f7fa4f37a814981da6218b19..35e252dcb5d74ca957de7e5f138dcbd30ca80114 100644 (file)
@@ -1,7 +1,6 @@
 /*Copyright (c) 2020 Robert Clausecker fuz@fuz.su
   count8 reference implementation */
-func count8safe(counts *[8]int, buf []uint8) {
-    for i := range buf
-        for j := 0; j < 8; j++
-            counts[j] += int(buf[i] >> j & 1)
-}
+count8safe(counts *[8]int, buf []uint8) 
+  for i := range buf
+    for j := 0; j < 8; j++
+      counts[j] += int(buf[i] >> j & 1)