#[repr(C, align(16))]pub struct i16x8 { /* private fields */ }
Implementations§
source§impl i16x8
impl i16x8
pub fn new(array: [i16; 8]) -> 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_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
pub fn is_negative(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 unsigned_abs(self) -> u16x8
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) -> 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_s16
instruction on neoni16x8_q15mulr_sat
on simd128_mm_mulhrs_epi16
on 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_s16
instruction on neoni16x8_q15mulr_sat
on simd128_mm_mulhrs_epi16
on ssse3- emulated via
mul_i16_*
on sse2
pub fn to_array(self) -> [i16; 8]
pub fn as_array_ref(&self) -> &[i16; 8]
pub fn as_array_mut(&mut self) -> &mut [i16; 8]
Trait Implementations§
source§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 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 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 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 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 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 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 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 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 moresource§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 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 moresource§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 moreimpl Copy for i16x8
impl Eq for i16x8
impl Pod for i16x8
impl StructuralPartialEq for i16x8
Auto Trait Implementations§
impl Freeze for i16x8
impl RefUnwindSafe for i16x8
impl Send for i16x8
impl Sync for i16x8
impl Unpin for i16x8
impl UnwindSafe for i16x8
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,
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
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)