[−][src]Macro safe_arch::extract_i16_as_i32_m128i
Gets an i16
value out of an m128i
, returns as i32
.
The lane to get must be a constant. If you select outside the range 0..8
then the selection is wrapped to be in range (only the lowest 3 bits of the
input are used).
let a = m128i::from([0xA_i16, 0xB, 0xC, 0xD, 0, 0, 0, 0]); // assert_eq!(extract_i16_as_i32_m128i!(a, 0), 0xA); assert_eq!(extract_i16_as_i32_m128i!(a, 1), 0xB); // the lane requested is "wrapped" to be a valid index. assert_eq!(50 & 0b111, 2); assert_eq!(extract_i16_as_i32_m128i!(a, 50), 0xC);