[−][src]Function safe_arch::population_deposit_u64
#[must_use]pub fn population_deposit_u64(a: u64, index: u64) -> u64
This is supported with target feature
bmi2
only.Deposit contiguous low bits from a u64
according to a mask.
Other bits are zero.
assert_eq!(population_deposit_u64(0b1001, 0b1111), 0b1001); assert_eq!(population_deposit_u64(0b1001, 0b1110), 0b0010); assert_eq!(population_deposit_u64(0b1001, 0b1100), 0b0100);