pub struct i8x16 { /* private fields */ }Implementations§
Source§impl i8x16
impl i8x16
pub const fn new(array: [i8; 16]) -> 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.
Sourcepub fn from_i16x16_saturate(v: i16x16) -> i8x16
pub fn from_i16x16_saturate(v: i16x16) -> i8x16
converts i16 to i8, saturating values that are too large
Sourcepub fn from_i16x16_truncate(v: i16x16) -> i8x16
pub fn from_i16x16_truncate(v: i16x16) -> i8x16
converts i16 to i8, truncating the upper bits if they are set
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.
pub fn reduce_add(self) -> i8
pub fn reduce_max(self) -> i8
pub fn reduce_min(self) -> i8
pub fn abs(self) -> Self
pub fn unsigned_abs(self) -> u8x16
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 from_slice_unaligned(input: &[i8]) -> Self
pub fn to_bitmask(self) -> u32
pub fn any(self) -> bool
pub fn all(self) -> bool
Sourcepub fn swizzle(self, rhs: i8x16) -> i8x16
pub fn swizzle(self, rhs: i8x16) -> i8x16
Returns a new vector where each element is based on the index values in
rhs.
- Index values in the range
[0, 15]select the i-th element ofself. - Index values that are out of range will cause that output lane to be
0.
Sourcepub fn swizzle_relaxed(self, rhs: i8x16) -> i8x16
pub fn swizzle_relaxed(self, rhs: i8x16) -> i8x16
Works like swizzle with the following additional
details
- Indices in the range
[0, 15]will select the i-th element ofself. - If the high bit of any index is set (meaning that the index is negative), then the corresponding output lane is guaranteed to be zero.
- Otherwise the output lane is either
0orself[rhs[i] % 16], depending on the implementation.
pub fn none(self) -> bool
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 transpose(data: [i8x16; 16]) -> [i8x16; 16]
pub fn transpose(data: [i8x16; 16]) -> [i8x16; 16]
Transpose matrix of 16x16 i8 matrix. Currently not accelerated.
pub fn to_array(self) -> [i8; 16]
pub fn as_array(&self) -> &[i8; 16]
pub fn as_mut_array(&mut self) -> &mut [i8; 16]
Trait Implementations§
Source§impl AddAssign<&i8x16> for i8x16
impl AddAssign<&i8x16> for i8x16
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+= operation. Read moreSource§impl AddAssign for i8x16
impl AddAssign for i8x16
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl BitAndAssign<&i8x16> for i8x16
impl BitAndAssign<&i8x16> for i8x16
Source§fn bitand_assign(&mut self, rhs: &Self)
fn bitand_assign(&mut self, rhs: &Self)
&= operation. Read moreSource§impl BitAndAssign for i8x16
impl BitAndAssign for i8x16
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOrAssign<&i8x16> for i8x16
impl BitOrAssign<&i8x16> for i8x16
Source§fn bitor_assign(&mut self, rhs: &Self)
fn bitor_assign(&mut self, rhs: &Self)
|= operation. Read moreSource§impl BitOrAssign for i8x16
impl BitOrAssign for i8x16
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXorAssign<&i8x16> for i8x16
impl BitXorAssign<&i8x16> for i8x16
Source§fn bitxor_assign(&mut self, rhs: &Self)
fn bitxor_assign(&mut self, rhs: &Self)
^= operation. Read moreSource§impl BitXorAssign for i8x16
impl BitXorAssign for i8x16
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Shl<i128> for i8x16
impl Shl<i128> for i8x16
Source§impl Shl<i16> for i8x16
impl Shl<i16> for i8x16
Source§impl Shl<i32> for i8x16
impl Shl<i32> for i8x16
Source§impl Shl<i64> for i8x16
impl Shl<i64> for i8x16
Source§impl Shl<i8> for i8x16
impl Shl<i8> for i8x16
Source§impl Shl<u128> for i8x16
impl Shl<u128> for i8x16
Source§impl Shl<u16> for i8x16
impl Shl<u16> for i8x16
Source§impl Shl<u32> for i8x16
impl Shl<u32> for i8x16
Source§impl Shl<u64> for i8x16
impl Shl<u64> for i8x16
Source§impl Shl<u8> for i8x16
impl Shl<u8> for i8x16
Source§impl Shl for i8x16
impl Shl for i8x16
Source§impl Shr<i128> for i8x16
impl Shr<i128> for i8x16
Source§impl Shr<i16> for i8x16
impl Shr<i16> for i8x16
Source§impl Shr<i32> for i8x16
impl Shr<i32> for i8x16
Source§impl Shr<i64> for i8x16
impl Shr<i64> for i8x16
Source§impl Shr<i8> for i8x16
impl Shr<i8> for i8x16
Source§impl Shr<u128> for i8x16
impl Shr<u128> for i8x16
Source§impl Shr<u16> for i8x16
impl Shr<u16> for i8x16
Source§impl Shr<u32> for i8x16
impl Shr<u32> for i8x16
Source§impl Shr<u64> for i8x16
impl Shr<u64> for i8x16
Source§impl Shr<u8> for i8x16
impl Shr<u8> for i8x16
Source§impl SubAssign<&i8x16> for i8x16
impl SubAssign<&i8x16> for i8x16
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
-= operation. Read moreSource§impl SubAssign for i8x16
impl SubAssign for i8x16
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreimpl Copy for i8x16
impl Eq for i8x16
impl Pod for i8x16
impl StructuralPartialEq for i8x16
Auto Trait Implementations§
impl Freeze for i8x16
impl RefUnwindSafe for i8x16
impl Send for i8x16
impl Sync for i8x16
impl Unpin for i8x16
impl UnsafeUnpin for i8x16
impl UnwindSafe for i8x16
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.