Struct wide::i16x8

source ·
#[repr(C, align(16))]
pub struct i16x8 { /* private fields */ }

Implementations§

source§

impl i16x8

source

pub const ONE: i16x8 = _

source

pub const ZERO: i16x8 = _

source

pub const MAX: i16x8 = _

source

pub const MIN: i16x8 = _

source

pub const LANES: u16 = 8u16

The number of lanes in this SIMD vector.

source

pub const BITS: u16 = 128u16

The size of this SIMD vector in bits.

source§

impl i16x8

source

pub fn new(array: [i16; 8]) -> Self

source

pub fn move_mask(self) -> i32

source

pub fn any(self) -> bool

source

pub fn all(self) -> bool

source

pub fn none(self) -> bool

source

pub fn from_u8x16_low(u: u8x16) -> Self

Unpack the lower half of the input and expand it to i16 values.

source

pub fn from_u8x16_high(u: u8x16) -> Self

Unpack the upper half of the input and expand it to i16 values.

source

pub fn from_i32x8_saturate(v: i32x8) -> Self

returns low i16 of i32, saturating values that are too large

source

pub fn from_i32x8_truncate(v: i32x8) -> Self

returns low i16 of i32, truncating the upper bits if they are set

source

pub fn from_slice_unaligned(input: &[i16]) -> Self

source

pub fn blend(self, t: Self, f: Self) -> Self

source

pub fn is_negative(self) -> Self

source

pub fn reduce_add(self) -> i16

horizontal add of all the elements of the vector

source

pub fn reduce_min(self) -> i16

horizontal min of all the elements of the vector

source

pub fn reduce_max(self) -> i16

horizontal max of all the elements of the vector

source

pub fn abs(self) -> Self

source

pub fn unsigned_abs(self) -> u16x8

source

pub fn max(self, rhs: Self) -> Self

source

pub fn min(self, rhs: Self) -> Self

source

pub fn saturating_add(self, rhs: Self) -> Self

source

pub fn saturating_sub(self, rhs: Self) -> Self

source

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.

source

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 neon
  • i16x8_q15mulr_sat on simd128
  • _mm_mulhrs_epi16 on ssse3
  • emulated via mul_i16_* on sse2
source

pub fn mul_keep_high(lhs: Self, rhs: Self) -> Self

Multiples two i16x8 and return the high part of intermediate i32x8

source

pub fn mul_widen(self, rhs: Self) -> i32x8

multiplies two i16x8 and returns the result as a widened i32x8

source

pub fn transpose(data: [i16x8; 8]) -> [i16x8; 8]

transpose matrix of 8x8 i16 matrix

source

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 neon
  • i16x8_q15mulr_sat on simd128
  • _mm_mulhrs_epi16 on ssse3
  • emulated via mul_i16_* on sse2
source

pub fn to_array(self) -> [i16; 8]

source

pub fn as_array_ref(&self) -> &[i16; 8]

source

pub fn as_array_mut(&mut self) -> &mut [i16; 8]

source§

impl i16x8

source

pub fn splat(elem: i16) -> i16x8

Trait Implementations§

source§

impl Add<&i16x8> for i16x8

§

type Output = i16x8

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i16> for i16x8

§

type Output = i16x8

The resulting type after applying the + operator.
source§

fn add(self, rhs: i16) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i16x8> for i16

§

type Output = i16x8

The resulting type after applying the + operator.
source§

fn add(self, rhs: i16x8) -> Self::Output

Performs the + operation. Read more
source§

impl Add for i16x8

§

type Output = i16x8

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<&i16x8> for i16x8

source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
source§

impl AddAssign for i16x8

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Binary for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd<&i16x8> for i16x8

§

type Output = i16x8

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: &Self) -> Self::Output

Performs the & operation. Read more
source§

impl BitAnd for i16x8

§

type Output = i16x8

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl BitAndAssign<&i16x8> for i16x8

source§

fn bitand_assign(&mut self, rhs: &Self)

Performs the &= operation. Read more
source§

impl BitAndAssign for i16x8

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitOr<&i16x8> for i16x8

§

type Output = i16x8

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: &Self) -> Self::Output

Performs the | operation. Read more
source§

impl BitOr for i16x8

§

type Output = i16x8

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl BitOrAssign<&i16x8> for i16x8

source§

fn bitor_assign(&mut self, rhs: &Self)

Performs the |= operation. Read more
source§

impl BitOrAssign for i16x8

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitXor<&i16x8> for i16x8

§

type Output = i16x8

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: &Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXor for i16x8

§

type Output = i16x8

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXorAssign<&i16x8> for i16x8

source§

fn bitxor_assign(&mut self, rhs: &Self)

Performs the ^= operation. Read more
source§

impl BitXorAssign for i16x8

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl Clone for i16x8

source§

fn clone(&self) -> i16x8

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CmpEq for i16x8

§

type Output = i16x8

source§

fn cmp_eq(self, rhs: Self) -> Self::Output

source§

impl CmpGt for i16x8

§

type Output = i16x8

source§

fn cmp_gt(self, rhs: Self) -> Self::Output

source§

impl CmpLt for i16x8

§

type Output = i16x8

source§

fn cmp_lt(self, rhs: Self) -> Self::Output

source§

impl Debug for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for i16x8

source§

fn default() -> i16x8

Returns the “default value” for a type. Read more
source§

impl Display for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<[i16; 8]> for i16x8

source§

fn from(arr: [i16; 8]) -> Self

Converts to this type from the input type.
source§

impl From<i16> for i16x8

source§

fn from(elem: i16) -> Self

Splats the single value given across all lanes.

source§

impl From<i16x8> for [i16; 8]

source§

fn from(simd: i16x8) -> Self

Converts to this type from the input type.
source§

impl From<i16x8> for i32x8

source§

fn from(value: i16x8) -> Self

Converts to this type from the input type.
source§

impl LowerExp for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl LowerHex for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Mul<&i16x8> for i16x8

§

type Output = i16x8

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Self) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i16> for i16x8

§

type Output = i16x8

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i16x8> for i16

§

type Output = i16x8

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i16x8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul for i16x8

§

type Output = i16x8

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl MulAssign<&i16x8> for i16x8

source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
source§

impl MulAssign for i16x8

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Neg for &i16x8

§

type Output = i16x8

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Neg for i16x8

§

type Output = i16x8

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Not for &i16x8

§

type Output = i16x8

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl Not for i16x8

§

type Output = i16x8

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl Octal for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl PartialEq for i16x8

source§

fn eq(&self, other: &i16x8) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<RHS> Product<RHS> for i16x8
where i16x8: MulAssign<RHS>,

source§

fn product<I: Iterator<Item = RHS>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Shl<i128> for i16x8

source§

fn shl(self, rhs: i128) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<i16> for i16x8

source§

fn shl(self, rhs: i16) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<i32> for i16x8

source§

fn shl(self, rhs: i32) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<i64> for i16x8

source§

fn shl(self, rhs: i64) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<i8> for i16x8

source§

fn shl(self, rhs: i8) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<u128> for i16x8

source§

fn shl(self, rhs: u128) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<u16> for i16x8

source§

fn shl(self, rhs: u16) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<u32> for i16x8

source§

fn shl(self, rhs: u32) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<u64> for i16x8

source§

fn shl(self, rhs: u64) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shl<u8> for i16x8

source§

fn shl(self, rhs: u8) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the << operator.
source§

impl Shr<i128> for i16x8

source§

fn shr(self, rhs: i128) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<i16> for i16x8

source§

fn shr(self, rhs: i16) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<i32> for i16x8

source§

fn shr(self, rhs: i32) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<i64> for i16x8

source§

fn shr(self, rhs: i64) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<i8> for i16x8

source§

fn shr(self, rhs: i8) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<u128> for i16x8

source§

fn shr(self, rhs: u128) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<u16> for i16x8

source§

fn shr(self, rhs: u16) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<u32> for i16x8

source§

fn shr(self, rhs: u32) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<u64> for i16x8

source§

fn shr(self, rhs: u64) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Shr<u8> for i16x8

source§

fn shr(self, rhs: u8) -> Self::Output

Shifts all lanes by the value given.

§

type Output = i16x8

The resulting type after applying the >> operator.
source§

impl Sub<&i16x8> for i16x8

§

type Output = i16x8

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Self) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i16> for i16x8

§

type Output = i16x8

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i16) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i16x8> for i16

§

type Output = i16x8

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i16x8) -> Self::Output

Performs the - operation. Read more
source§

impl Sub for i16x8

§

type Output = i16x8

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign<&i16x8> for i16x8

source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
source§

impl SubAssign for i16x8

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<RHS> Sum<RHS> for i16x8
where i16x8: AddAssign<RHS>,

source§

fn sum<I: Iterator<Item = RHS>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl UpperExp for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl UpperHex for i16x8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Zeroable for i16x8

source§

fn zeroed() -> Self

source§

impl Copy for i16x8

source§

impl Eq for i16x8

source§

impl Pod for i16x8

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

§

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

If this function returns true, then it must be valid to reinterpret bits as &Self.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> AnyBitPattern for T
where T: Pod,

source§

impl<T> NoUninit for T
where T: Pod,