util/bitset: Add BITSET_COUNT helper
authorAlyssa Rosenzweig <a@rosenzweig.io>
Sun, 2 May 2021 17:16:17 +0000 (13:16 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sun, 2 May 2021 20:38:28 +0000 (20:38 +0000)
commite07a2a0f18398a9d55b8b2580ccfd5bc1f18725b
tree0fdab23ca00bed4123ff88c9d3a11033d12eae9b
parent231651fd89fb007610568b3ca76837253e7683ff
util/bitset: Add BITSET_COUNT helper

Expressible as a prefix sum but that's a bit unnatural, so add a
convenience helper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrants <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10581>
src/util/bitset.h