pub fn popcount(builder: &mut CircuitBuilder, input: Wire) -> WireExpand description
Computes the population count (number of 1-bits) of a 64-bit word.
This function implements the SWAR algorithm to efficiently count bits using parallel operations within a single 64-bit register.
§Arguments
builder- The circuit builder to add constraints toinput- Wire containing the 64-bit value to count bits in
§Returns
- Wire containing the popcount result (value between 0 and 64)