#[repr(C, align(32))]pub struct i16x16 { /* private fields */ }
Implementations§
source§impl i16x16
impl i16x16
pub fn new(array: [i16; 16]) -> Self
pub fn move_mask(self) -> i32
pub fn any(self) -> bool
pub fn all(self) -> bool
pub fn none(self) -> bool
sourcepub fn from_i8x16(v: i8x16) -> Self
pub fn from_i8x16(v: i8x16) -> Self
widens and sign extends to i16x16
pub fn blend(self, t: Self, f: Self) -> Self
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 max(self, rhs: Self) -> Self
pub fn min(self, rhs: Self) -> Self
pub fn saturating_add(self, rhs: Self) -> Self
pub fn saturating_sub(self, rhs: Self) -> Self
sourcepub fn dot(self, rhs: Self) -> i32x8
pub fn dot(self, rhs: Self) -> i32x8
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 equivilent 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_s16 instruction on neon
- i16x8_q15mulr_sat on simd128
- _mm256_mulhrs_epi16 on avx2
- emulated via mul_i16_* on sse2
sourcepub fn mul_scale_round_n(self, rhs: i16) -> Self
pub fn mul_scale_round_n(self, rhs: i16) -> Self
Multiply and scale equivilent 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_s16 instruction on neon
- i16x8_q15mulr_sat on simd128
- _mm256_mulhrs_epi16 on avx2
- emulated via mul_i16_* on sse2
pub fn to_array(self) -> [i16; 16]
pub fn as_array_ref(&self) -> &[i16; 16]
pub fn as_array_mut(&mut self) -> &mut [i16; 16]
Trait Implementations§
source§impl AddAssign<&i16x16> for i16x16
impl AddAssign<&i16x16> for i16x16
source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+=
operation. Read moresource§impl AddAssign for i16x16
impl AddAssign for i16x16
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+=
operation. Read moresource§impl BitAndAssign<&i16x16> for i16x16
impl BitAndAssign<&i16x16> for i16x16
source§fn bitand_assign(&mut self, rhs: &Self)
fn bitand_assign(&mut self, rhs: &Self)
&=
operation. Read moresource§impl BitAndAssign for i16x16
impl BitAndAssign for i16x16
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moresource§impl BitOrAssign<&i16x16> for i16x16
impl BitOrAssign<&i16x16> for i16x16
source§fn bitor_assign(&mut self, rhs: &Self)
fn bitor_assign(&mut self, rhs: &Self)
|=
operation. Read moresource§impl BitOrAssign for i16x16
impl BitOrAssign for i16x16
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresource§impl BitXorAssign<&i16x16> for i16x16
impl BitXorAssign<&i16x16> for i16x16
source§fn bitxor_assign(&mut self, rhs: &Self)
fn bitxor_assign(&mut self, rhs: &Self)
^=
operation. Read moresource§impl BitXorAssign for i16x16
impl BitXorAssign for i16x16
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moresource§impl MulAssign<&i16x16> for i16x16
impl MulAssign<&i16x16> for i16x16
source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
*=
operation. Read moresource§impl MulAssign for i16x16
impl MulAssign for i16x16
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*=
operation. Read moresource§impl PartialEq for i16x16
impl PartialEq for i16x16
source§impl SubAssign<&i16x16> for i16x16
impl SubAssign<&i16x16> for i16x16
source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
-=
operation. Read moresource§impl SubAssign for i16x16
impl SubAssign for i16x16
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read moreimpl Copy for i16x16
impl Eq for i16x16
impl Pod for i16x16
impl StructuralEq for i16x16
impl StructuralPartialEq for i16x16
Auto Trait Implementations§
impl RefUnwindSafe for i16x16
impl Send for i16x16
impl Sync for i16x16
impl Unpin for i16x16
impl UnwindSafe for i16x16
Blanket Implementations§
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,
§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
.