pub fn popCount(r: *Managed, a: *const Managed, bit_count: usize) !void 3615
3616
3617
3618
3619
3620
3621
3622 pub fn popCount(r: *Managed, a: *const Managed, bit_count: usize) !void {
const aliased = limbsAliasDistinct(r, a);
const needed = calcTwosCompLimbCount(bit_count);
try r.ensureAliasAwareCapacity(needed, aliased);
var m = r.toMutable();
m.popCount(a.toConst(), bit_count);
r.setMetadata(m.positive, m.len);
}
r = @popCount(a) with 2s-complement semantics. r and a may be aliases.