From: shriya Date: Tue, 21 Nov 2023 15:52:41 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8de15bfabb6fe3a7ef5df83e14044d77cfc51e89;p=libreriscv.git --- diff --git a/openpower/sv/cookbook/pospopcnt.mdwn b/openpower/sv/cookbook/pospopcnt.mdwn index d6d43a2aa..37bda1a17 100644 --- a/openpower/sv/cookbook/pospopcnt.mdwn +++ b/openpower/sv/cookbook/pospopcnt.mdwn @@ -6,8 +6,7 @@ Positional popcount in optimised assembler is typically done on SIMD ISAs in around 500 lines. Power ISA thanks to `bpermd` can be much more efficient: with SVP64 even more so. The reference implementation showing the concept -is below, and it adds up the totals of each bit set to 1 in each bit-position, -of an array of input values. +is below. ``` // Copyright (c) 2020 Robert Clausecker @@ -20,7 +19,7 @@ func count8safe(counts *[8]int, buf []uint8) { } } ``` - +Array popcount is just standard popcount function on an array of values whereas positional popcount adds up the totals of each bit set to 1 in each bit-position, of an array of input values. pospopcnt [[!tag svp64_cookbook ]]