5#ifndef BITCOIN_UTIL_BITMANIP_H
6#define BITCOIN_UTIL_BITMANIP_H
8#include <config/bitcoin-config.h>
13#if HAVE_DECL___BUILTIN_POPCOUNT
14 return __builtin_popcount(v);
23 v = v - ((v >> 1) & 0x55555555);
24 v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
25 return (((v + (v >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
uint32_t countBits(uint32_t v)