40template <
size_t Words>
41[[nodiscard]] uint64_t
popcount(uint64_t
const*
const buffer) {
43 for (
size_t i = 0; i < Words; ++i) {
44 popcount += std::popcount(buffer[i]);
58template <
size_t Words>
61 for (
size_t i = 0; i < Words; ++i) {
62 popcount += std::popcount(~buffer[i]);
uint64_t popcount_zeros(uint64_t const *const buffer)
Counts the number of zero bits in a specific number of 64-bit words.
Definition popcount.hpp:59
uint64_t popcount(uint64_t const *const buffer)
Compute popcount of a specific number of 64-bit words.
Definition popcount.hpp:41