alt="pospopcnt" width="60%" />
-
-
-<br />
-
-
# Visual representation of the pospopcount algorithm
In order to perform positional popcount we need to go
through series of steps shown below in figures 3, 4, 5 & 6.
accumulated. It is worth noting that each intermediate result
is independent of the other intermediate results and also
parallel reduction can be applied to all of them
-individually. This gives two opportunities for parallelism.
+individually. This gives *two* opportunities for
+hardware parallelism rather than one.
<img src="/openpower/sv/cookbook/ParallelAccumulate.drawio.svg"
alt="pospopcnt" width="100%" />
-
+In short this algorithm is very straightforward to implement thanks to the two
+crucial instructions, `gbbd` and `popcntd`. Below is a walkthrough of the
+assembler, keeping it very simple, and exploiting only one of the opportunities
+for parallelism (by not including the Parallel Reduction opportunity mentioned
+above).
# Walkthrough of the assembler