pub struct i32x4 { /* private fields */ }Implementations§
Source§impl i32x4
impl i32x4
pub const fn new(array: [i32; 4]) -> 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 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 mul_widen(self, rhs: Self) -> i64x4
pub fn mul_widen(self, rhs: Self) -> i64x4
Multiplies corresponding 32 bit lanes and returns the 64 bit result on the corresponding lanes.
Effectively does two multiplies on 128 bit platforms, but is easier
to use than wrapping mul_widen_i32_odd_m128i individually.
pub fn abs(self) -> Self
pub fn unsigned_abs(self) -> u32x4
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
Sourcepub fn reduce_add(self) -> i32
pub fn reduce_add(self) -> i32
horizontal add of all the elements of the vector
Sourcepub fn reduce_max(self) -> i32
pub fn reduce_max(self) -> i32
horizontal max of all the elements of the vector
Sourcepub fn reduce_min(self) -> i32
pub fn reduce_min(self) -> i32
horizontal min of all the elements of the vector
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.
pub fn round_float(self) -> f32x4
pub fn to_bitmask(self) -> u32
pub fn any(self) -> bool
pub fn all(self) -> bool
pub fn none(self) -> bool
Sourcepub fn transpose(data: [i32x4; 4]) -> [i32x4; 4]
pub fn transpose(data: [i32x4; 4]) -> [i32x4; 4]
Transpose matrix of 4x4 i32 matrix. Currently only accelerated on SSE.
pub fn to_array(self) -> [i32; 4]
pub fn as_array(&self) -> &[i32; 4]
pub fn as_mut_array(&mut self) -> &mut [i32; 4]
Trait Implementations§
Source§impl AddAssign<&i32x4> for i32x4
impl AddAssign<&i32x4> for i32x4
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+= operation. Read moreSource§impl AddAssign for i32x4
impl AddAssign for i32x4
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl BitAndAssign<&i32x4> for i32x4
impl BitAndAssign<&i32x4> for i32x4
Source§fn bitand_assign(&mut self, rhs: &Self)
fn bitand_assign(&mut self, rhs: &Self)
&= operation. Read moreSource§impl BitAndAssign for i32x4
impl BitAndAssign for i32x4
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOrAssign<&i32x4> for i32x4
impl BitOrAssign<&i32x4> for i32x4
Source§fn bitor_assign(&mut self, rhs: &Self)
fn bitor_assign(&mut self, rhs: &Self)
|= operation. Read moreSource§impl BitOrAssign for i32x4
impl BitOrAssign for i32x4
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXorAssign<&i32x4> for i32x4
impl BitXorAssign<&i32x4> for i32x4
Source§fn bitxor_assign(&mut self, rhs: &Self)
fn bitxor_assign(&mut self, rhs: &Self)
^= operation. Read moreSource§impl BitXorAssign for i32x4
impl BitXorAssign for i32x4
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl MulAssign<&i32x4> for i32x4
impl MulAssign<&i32x4> for i32x4
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
*= operation. Read moreSource§impl MulAssign for i32x4
impl MulAssign for i32x4
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl Shl for i32x4
Shifts lanes by the corresponding lane.
impl Shl for i32x4
Shifts lanes by the corresponding lane.
Bitwise shift-left; yields self << mask(rhs), where mask removes any
high-order bits of rhs that would cause the shift to exceed the bitwidth
of the type. (same as wrapping_shl)
Source§impl Shr for i32x4
Shifts lanes by the corresponding lane.
impl Shr for i32x4
Shifts lanes by the corresponding lane.
Bitwise shift-right; yields self >> mask(rhs), where mask removes any
high-order bits of rhs that would cause the shift to exceed the bitwidth
of the type. (same as wrapping_shr)
Source§impl SubAssign<&i32x4> for i32x4
impl SubAssign<&i32x4> for i32x4
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
-= operation. Read moreSource§impl SubAssign for i32x4
impl SubAssign for i32x4
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreimpl Copy for i32x4
impl Eq for i32x4
impl Pod for i32x4
impl StructuralPartialEq for i32x4
Auto Trait Implementations§
impl Freeze for i32x4
impl RefUnwindSafe for i32x4
impl Send for i32x4
impl Sync for i32x4
impl Unpin for i32x4
impl UnsafeUnpin for i32x4
impl UnwindSafe for i32x4
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.