pub trait SimdBase16: SimdBase + SimdSaturatingArithmetic{
// Required methods
fn shuffle_lo<const I3: usize, const I2: usize, const I1: usize, const I0: usize>(
&self,
) -> Self;
fn shuffle_hi<const I3: usize, const I2: usize, const I1: usize, const I0: usize>(
&self,
) -> Self;
}Expand description
A vector containing 16-bit values.
Required Methods§
Sourcefn shuffle_lo<const I3: usize, const I2: usize, const I1: usize, const I0: usize>(
&self,
) -> Self
fn shuffle_lo<const I3: usize, const I2: usize, const I1: usize, const I0: usize>( &self, ) -> Self
Shuffle within the lower 64-bits of each 128-bit subvector.
§Example
assert_eq!(
U16x16::from([
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
]).shuffle_lo::<0, 1, 1, 3>(),
U16x16::from([
3, 1, 1, 0, 4, 5, 6, 7, 11, 9, 9, 8, 12, 13, 14, 15
]),
);Sourcefn shuffle_hi<const I3: usize, const I2: usize, const I1: usize, const I0: usize>(
&self,
) -> Self
fn shuffle_hi<const I3: usize, const I2: usize, const I1: usize, const I0: usize>( &self, ) -> Self
Shuffle within the upper 64-bits of each 128-bit subvector.
§Example
assert_eq!(
U16x16::from([
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
]).shuffle_hi::<0, 1, 1, 3>(),
U16x16::from([
0, 1, 2, 3, 7, 5, 5, 4, 8, 9, 10, 11, 15, 13, 13, 12
]),
);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.