pub struct i16x8 { /* private fields */ }Implementations§
Source§impl i16x8
impl i16x8
pub const fn new(array: [i16; 8]) -> Self
Sourcepub fn simd_eq<Rhs>(self, other: Rhs) -> <Self as CmpEq<Rhs>>::Outputwhere
Self: CmpEq<Rhs>,
pub fn simd_eq<Rhs>(self, other: Rhs) -> <Self as CmpEq<Rhs>>::Outputwhere
Self: CmpEq<Rhs>,
Test if each element is equal to the corresponding element in other.
Sourcepub fn simd_ne<Rhs>(self, other: Rhs) -> <Self as CmpNe<Rhs>>::Outputwhere
Self: CmpNe<Rhs>,
pub fn simd_ne<Rhs>(self, other: Rhs) -> <Self as CmpNe<Rhs>>::Outputwhere
Self: CmpNe<Rhs>,
Test if each element is not equal to the corresponding element in
other.
Sourcepub fn simd_lt<Rhs>(self, other: Rhs) -> <Self as CmpLt<Rhs>>::Outputwhere
Self: CmpLt<Rhs>,
pub fn simd_lt<Rhs>(self, other: Rhs) -> <Self as CmpLt<Rhs>>::Outputwhere
Self: CmpLt<Rhs>,
Test if each element is less than the corresponding element in other.
Sourcepub fn simd_gt<Rhs>(self, other: Rhs) -> <Self as CmpGt<Rhs>>::Outputwhere
Self: CmpGt<Rhs>,
pub fn simd_gt<Rhs>(self, other: Rhs) -> <Self as CmpGt<Rhs>>::Outputwhere
Self: CmpGt<Rhs>,
Test if each element is greater than the corresponding element in
other.
Sourcepub fn simd_le<Rhs>(self, other: Rhs) -> <Self as CmpLe<Rhs>>::Outputwhere
Self: CmpLe<Rhs>,
pub fn simd_le<Rhs>(self, other: Rhs) -> <Self as CmpLe<Rhs>>::Outputwhere
Self: CmpLe<Rhs>,
Test if each element is less than or equal to the corresponding element
in other.
Sourcepub fn simd_ge<Rhs>(self, other: Rhs) -> <Self as CmpGe<Rhs>>::Outputwhere
Self: CmpGe<Rhs>,
pub fn simd_ge<Rhs>(self, other: Rhs) -> <Self as CmpGe<Rhs>>::Outputwhere
Self: CmpGe<Rhs>,
Test if each element is greater than or equal to the corresponding
element in other.
pub fn to_bitmask(self) -> u32
pub fn any(self) -> bool
pub fn all(self) -> bool
pub fn none(self) -> bool
Sourcepub fn from_u8x16_low(u: u8x16) -> Self
pub fn from_u8x16_low(u: u8x16) -> Self
Unpack the lower half of the input and expand it to i16 values.
Sourcepub fn from_u8x16_high(u: u8x16) -> Self
pub fn from_u8x16_high(u: u8x16) -> Self
Unpack the upper half of the input and expand it to i16 values.
Sourcepub fn from_i32x8_saturate(v: i32x8) -> Self
pub fn from_i32x8_saturate(v: i32x8) -> Self
returns low i16 of i32, saturating values that are too large
Sourcepub fn from_i32x8_truncate(v: i32x8) -> Self
pub fn from_i32x8_truncate(v: i32x8) -> Self
returns low i16 of i32, truncating the upper bits if they are set
pub fn from_slice_unaligned(input: &[i16]) -> Self
pub fn blend(self, t: Self, f: Self) -> Self
Sourcepub fn is_positive(self) -> Self
pub fn is_positive(self) -> Self
Returns true for each positive element and false if it is zero or negative.
Sourcepub fn is_negative(self) -> Self
pub fn is_negative(self) -> Self
Returns true for each negative element and false if it is zero or positive.
Sourcepub fn reduce_add(self) -> i16
pub fn reduce_add(self) -> i16
horizontal add of all the elements of the vector
Sourcepub fn reduce_min(self) -> i16
pub fn reduce_min(self) -> i16
horizontal min of all the elements of the vector
Sourcepub fn reduce_max(self) -> i16
pub fn reduce_max(self) -> i16
horizontal max of all the elements of the vector
pub fn abs(self) -> Self
pub fn unsigned_abs(self) -> u16x8
Sourcepub fn signum(self) -> Self
pub fn signum(self) -> Self
Returns numbers representing the sign of each element.
0if the number is zero1if the number is positive-1if the number is negative
pub fn max(self, rhs: Self) -> Self
pub fn min(self, rhs: Self) -> Self
Sourcepub fn clamp(self, min: Self, max: Self) -> Self
pub fn clamp(self, min: Self, max: Self) -> Self
Restrict each element to a certain interval.
If min > max, the result is unspeficied. Consider manually checking
for that case.
pub fn saturating_add(self, rhs: Self) -> Self
pub fn saturating_sub(self, rhs: Self) -> Self
Sourcepub fn saturating_mul(self, rhs: Self) -> Self
pub fn saturating_mul(self, rhs: Self) -> Self
Lanewise saturating multiply.
Sourcepub fn saturating_div(self, rhs: Self) -> Self
pub fn saturating_div(self, rhs: Self) -> Self
Lanewise saturating divide.
Note that because division has no hardware support, this operation is very slow and should be avoided if possible.
Sourcepub fn dot(self, rhs: Self) -> i32x4
pub fn dot(self, rhs: Self) -> i32x4
Calculates partial dot product. Multiplies packed signed 16-bit integers, producing intermediate signed 32-bit integers. Horizontally add adjacent pairs of intermediate 32-bit integers.
Sourcepub fn mul_scale_round(self, rhs: Self) -> Self
pub fn mul_scale_round(self, rhs: Self) -> Self
Multiply and scale equivalent to ((self * rhs) + 0x4000) >> 15 on each
lane, effectively multiplying by a 16 bit fixed point number between -1
and 1. This corresponds to the following instructions:
vqrdmulhq_s16instruction on neoni16x8_q15mulr_saton simd128_mm_mulhrs_epi16on ssse3- emulated via
mul_i16_*on sse2
Sourcepub fn mul_keep_high(lhs: Self, rhs: Self) -> Self
pub fn mul_keep_high(lhs: Self, rhs: Self) -> Self
Multiples two i16x8 and return the high part of intermediate i32x8
Sourcepub fn mul_widen(self, rhs: Self) -> i32x8
pub fn mul_widen(self, rhs: Self) -> i32x8
multiplies two i16x8 and returns the result as a widened i32x8
Sourcepub fn mul_scale_round_n(self, rhs: i16) -> Self
pub fn mul_scale_round_n(self, rhs: i16) -> Self
Multiply and scale, equivalent to ((self * rhs) + 0x4000) >> 15 on each
lane, effectively multiplying by a 16 bit fixed point number between -1
and 1. This corresponds to the following instructions:
vqrdmulhq_n_s16instruction on neoni16x8_q15mulr_saton simd128_mm_mulhrs_epi16on ssse3- emulated via
mul_i16_*on sse2
pub fn to_array(self) -> [i16; 8]
pub fn as_array(&self) -> &[i16; 8]
pub fn as_mut_array(&mut self) -> &mut [i16; 8]
Trait Implementations§
Source§impl AddAssign for i16x8
impl AddAssign for i16x8
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl AddAssign<&i16x8> for i16x8
impl AddAssign<&i16x8> for i16x8
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+= operation. Read moreSource§impl BitAndAssign for i16x8
impl BitAndAssign for i16x8
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitAndAssign<&i16x8> for i16x8
impl BitAndAssign<&i16x8> for i16x8
Source§fn bitand_assign(&mut self, rhs: &Self)
fn bitand_assign(&mut self, rhs: &Self)
&= operation. Read moreSource§impl BitOrAssign for i16x8
impl BitOrAssign for i16x8
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitOrAssign<&i16x8> for i16x8
impl BitOrAssign<&i16x8> for i16x8
Source§fn bitor_assign(&mut self, rhs: &Self)
fn bitor_assign(&mut self, rhs: &Self)
|= operation. Read moreSource§impl BitXorAssign for i16x8
impl BitXorAssign for i16x8
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl BitXorAssign<&i16x8> for i16x8
impl BitXorAssign<&i16x8> for i16x8
Source§fn bitxor_assign(&mut self, rhs: &Self)
fn bitxor_assign(&mut self, rhs: &Self)
^= operation. Read moreimpl Copy for i16x8
impl Eq for i16x8
Source§impl MulAssign for i16x8
impl MulAssign for i16x8
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl MulAssign<&i16x8> for i16x8
impl MulAssign<&i16x8> for i16x8
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
*= operation. Read moreimpl Pod for i16x8
Source§impl Shl for i16x8
impl Shl for i16x8
Source§impl Shr for i16x8
impl Shr for i16x8
impl StructuralPartialEq for i16x8
Source§impl SubAssign for i16x8
impl SubAssign for i16x8
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreSource§impl SubAssign<&i16x8> for i16x8
impl SubAssign<&i16x8> for i16x8
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
-= operation. Read moreAuto Trait Implementations§
impl Freeze for i16x8
impl RefUnwindSafe for i16x8
impl Send for i16x8
impl Sync for i16x8
impl Unpin for i16x8
impl UnsafeUnpin for i16x8
impl UnwindSafe for i16x8
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.