Closed RalfJung closed 11 months ago
Seems like we forgot to update the docs when https://github.com/rust-lang/portable-simd/pull/267 landed. This documentation matches the follow testcase:
let values = [false, false, false, true]; let mask = Mask::<i64, 4>::from_array(values); unsafe { let bitmask1: u8 = simd_bitmask(mask.to_int()); let bitmask2: [u8; 1] = simd_bitmask(mask.to_int()); if cfg!(target_endian = "little") { assert_eq!(bitmask1, 0b1000); assert_eq!(bitmask2, [0b1000]); } else { assert_eq!(bitmask1, 0b0001); assert_eq!(bitmask2, [0b0001]); } }
Seems like we forgot to update the docs when https://github.com/rust-lang/portable-simd/pull/267 landed. This documentation matches the follow testcase: