1 #![feature(portable_simd, generic_const_exprs, adt_const_params)]
2 #![allow(incomplete_features)]
3 #![cfg(feature = "generic_const_exprs")]
9 let int = Simd::<u32, 2>::from_array([0xdeadbeef, 0x8badf00d]);
10 let bytes = int.to_ne_bytes();
11 assert_eq!(int[0].to_ne_bytes(), bytes[..4]);
12 assert_eq!(int[1].to_ne_bytes(), bytes[4..]);
13 assert_eq!(Simd::<u32, 2>::from_ne_bytes(bytes), int);