bug 1244: add url to original source of pos popcount
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 9 Jan 2024 14:00:57 +0000 (14:00 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 9 Jan 2024 14:01:00 +0000 (14:01 +0000)
conferences/fosdem2024/fosdem2024_ddffirst/fosdem2024_ddffirst.tex
conferences/fosdem2024/fosdem2024_ddffirst/pospopcount.c

index 58550e9924ebba6c72e407f02f245cbe5dddb5ca..2c17909dd6d76d5d130660f37926542cc8e1a41d 100644 (file)
@@ -183,10 +183,12 @@ for (i = 0; i < VL; i++)
   \begin{itemize}
        \item   Positional popcount adds up the totals of each bit set to 1 in each bit-position, of an array of input values.
        \item   Notoriously difficult to do in SIMD assembler: typically 550 lines
+    \item https://github.com/clausecker/pospop
 
    \end{itemize}
        
        \lstinputlisting[language={}]{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)