Crate bitwise [−] [src]
bitwise
offers portable high-level manipulation algorithms
(@github,
@crates.io).
The algorithms:
- have descriptive names to ease reading code that performs bit manipulations,
- often optimize to perfect assembly code (and always on nightly by using
the
bitintr
crate), - works on
stableunstable only :( due to specialization for now.
Example
extern crate bitwise; use bitwise::word::*; fn main() { let u = outer_perfect_shuffle(0b_1001_1111u8); let v = inner_perfect_shuffle(0b_1001_1111u8); let w = u.copy_bit(4u8, v, 3u8); assert_eq!(w.parallel_bits_deposit(u), 0b_1001_0011u8); }
Reexports
pub extern crate bitintr; |
pub use word::*; |
Modules
word |
Algorithms for single words (u8...u64). |