[−][src]Crate bitintr
bitintr
offers portable bit manipulation intrinsics
(@github,
@crates.io).
The intrinsics are named after their CPU instruction and organized in
traits of the same name. These traits are implemented for all integer types
except u128/i128
.
The std::arch
intrinsics are used when the required features are enabled
in the target. You might manually enable features via -C target-feature=+...
and/or -C target-cpu=...
.
Traits
Andn | Logical and not |
Bextr | Bit field extract |
Blcfill | Fill from lowest clear bit |
Blci | Isolate lowest clear bit |
Blcic | Isolate lowest clear bit |
Blcmsk | Mask from lowest clear bit. |
Blcs | Set lowest clear bit |
Blsfill | Fill from lowest set bit |
Blsi | Extract lowest set isolated bit. |
Blsic | Isolate lowest set bit and complement |
Blsmsk | Get mask up to lowest set bit. |
Blsr | Resets lowest set bit. |
Bzhi | Zero high bits |
Cls | Count leading sign bits |
Lzcnt | Count leading zeros |
Mulx | Unsigned multiply without affecting flags. |
Pdep | Parallel bits deposit |
Pext | Parallel bits extract |
Popcnt | Count bits set. |
Rbit | Bit reverse |
Rev | Byte reverse |
T1mskc | Inverse mask from trailing ones |
Tzcnt | Counts trailing zero bits |
Tzmsk | Mask from trailing zeros |