Function bitintr::bmi2::bzhi
[−]
[src]
pub fn bzhi<T: BZHI>(x: T, y: T) -> T
Zero the high bits of x
at position >= bit_position
.
Panics
If bit_position >= bit_size()
.
Intrinsics (when available BMI2)
BZHI
: Zero high bits
starting with specified bit position (supports 32/64 bit registers).
Examples
use bitintr::bmi2::bzhi; let n = 0b1111_0010u32; let s = 0b0001_0010u32; assert_eq!(bzhi(n, 5), s);