Crates.io | bitwise |
lib.rs | bitwise |
version | 0.1.1 |
source | src |
created_at | 2017-02-22 09:02:03.781855 |
updated_at | 2017-02-23 10:25:17.198225 |
description | Portable high-level bitwise manipulation algorithms. |
homepage | https://gnzlbg.github.io/bitwise |
repository | https://github.com/gnzlbg/bitwise |
max_upload_size | |
id | 8631 |
size | 134,522 |
We do what we must because we can.
The algorithms:
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);
}
The minimum required rustc version is >= 1.13.0.
Requires unstable for now.
Some algorithms like the Morton Z-Curve encoding/decoding routines switch implementation at compile-time depending on target features (like BMI2 support).
Licensed under the MIT license.
The giants that came before us:
Yes please! Just note that all contributions shall be licensed as above without any additional terms or conditions.