[−][src]Function safe_arch::population_count_i32
#[must_use]pub fn population_count_i32(a: i32) -> i32
This is supported with target feature
popcnt
only.Count the number of bits set within an i32
assert_eq!(population_count_i32(0), 0); assert_eq!(population_count_i32(0b1), 1); assert_eq!(population_count_i32(0b1001), 2);