Type Definition packed_simd_2::isizex4
source · [−]Expand description
A vector with 4 isize lanes.
Implementations
sourceimpl isizex4
impl isizex4
sourcepub const fn new(x0: isize, x1: isize, x2: isize, x3: isize) -> Self
pub const fn new(x0: isize, x1: isize, x2: isize, x3: isize) -> Self
Creates a new instance with each vector elements initialized with the provided values.
sourcepub const fn splat(value: isize) -> Self
pub const fn splat(value: isize) -> Self
Constructs a new instance with each element initialized to
value.
sourcepub unsafe fn extract_unchecked(self, index: usize) -> isize
pub unsafe fn extract_unchecked(self, index: usize) -> isize
sourcepub fn replace(self, index: usize, new_value: isize) -> Self
pub fn replace(self, index: usize, new_value: isize) -> Self
Returns a new vector where the value at index is replaced by new_value.
Panics
If index >= Self::lanes().
sourcepub unsafe fn replace_unchecked(self, index: usize, new_value: isize) -> Self
pub unsafe fn replace_unchecked(self, index: usize, new_value: isize) -> Self
Returns a new vector where the value at index is replaced by new_value.
Safety
If index >= Self::lanes() the behavior is undefined.
sourceimpl isizex4
impl isizex4
sourcepub fn rotate_left(self, n: isizex4) -> isizex4
pub fn rotate_left(self, n: isizex4) -> isizex4
Shifts the bits of each lane to the left by the specified
amount in the corresponding lane of n, wrapping the
truncated bits to the end of the resulting integer.
Note: this is neither the same operation as << nor equivalent
to slice::rotate_left.
sourcepub fn rotate_right(self, n: isizex4) -> isizex4
pub fn rotate_right(self, n: isizex4) -> isizex4
Shifts the bits of each lane to the right by the specified
amount in the corresponding lane of n, wrapping the
truncated bits to the beginning of the resulting integer.
Note: this is neither the same operation as << nor equivalent
to slice::rotate_left.
sourceimpl isizex4
impl isizex4
sourcepub fn wrapping_sum(self) -> isize
pub fn wrapping_sum(self) -> isize
Horizontal wrapping sum of the vector elements.
The intrinsic performs a tree-reduction of the vector elements. That is, for an 8 element vector:
((x0 + x1) + (x2 + x3)) + ((x4 + x5) + (x6 + x7))
If an operation overflows it returns the mathematical result
modulo 2^n where n is the number of times it overflows.
sourcepub fn wrapping_product(self) -> isize
pub fn wrapping_product(self) -> isize
Horizontal wrapping product of the vector elements.
The intrinsic performs a tree-reduction of the vector elements. That is, for an 8 element vector:
((x0 * x1) * (x2 * x3)) * ((x4 * x5) * (x6 * x7))
If an operation overflows it returns the mathematical result
modulo 2^n where n is the number of times it overflows.
sourceimpl isizex4
impl isizex4
sourcepub fn max_element(self) -> isize
pub fn max_element(self) -> isize
Largest vector element value.
sourcepub fn min_element(self) -> isize
pub fn min_element(self) -> isize
Smallest vector element value.
sourceimpl isizex4
impl isizex4
sourcepub fn and(self) -> isize
pub fn and(self) -> isize
Lane-wise bitwise and of the vector elements.
Note: if the vector has one lane, the first element of the vector is returned.
sourceimpl isizex4
impl isizex4
sourcepub fn from_slice_aligned(slice: &[isize]) -> Self
pub fn from_slice_aligned(slice: &[isize]) -> Self
Instantiates a new vector with the values of the slice.
Panics
If slice.len() < Self::lanes() or &slice[0] is not aligned
to an align_of::<Self>() boundary.
sourcepub fn from_slice_unaligned(slice: &[isize]) -> Self
pub fn from_slice_unaligned(slice: &[isize]) -> Self
sourceimpl isizex4
impl isizex4
sourcepub fn write_to_slice_aligned(self, slice: &mut [isize])
pub fn write_to_slice_aligned(self, slice: &mut [isize])
Writes the values of the vector to the slice.
Panics
If slice.len() < Self::lanes() or &slice[0] is not
aligned to an align_of::<Self>() boundary.
sourcepub fn write_to_slice_unaligned(self, slice: &mut [isize])
pub fn write_to_slice_unaligned(self, slice: &mut [isize])
sourceimpl isizex4
impl isizex4
sourcepub fn swap_bytes(self) -> Self
pub fn swap_bytes(self) -> Self
Reverses the byte order of the vector.
sourcepub fn to_le(self) -> Self
pub fn to_le(self) -> Self
Converts self to little endian from the target’s endianness.
On little endian this is a no-op. On big endian the bytes are swapped.
sourcepub fn to_be(self) -> Self
pub fn to_be(self) -> Self
Converts self to big endian from the target’s endianness.
On big endian this is a no-op. On little endian the bytes are swapped.
sourceimpl isizex4
impl isizex4
sourcepub fn count_ones(self) -> Self
pub fn count_ones(self) -> Self
Returns the number of ones in the binary representation of
the lanes of self.
sourcepub fn count_zeros(self) -> Self
pub fn count_zeros(self) -> Self
Returns the number of zeros in the binary representation of
the lanes of self.
sourcepub fn leading_zeros(self) -> Self
pub fn leading_zeros(self) -> Self
Returns the number of leading zeros in the binary
representation of the lanes of self.
sourcepub fn trailing_zeros(self) -> Self
pub fn trailing_zeros(self) -> Self
Returns the number of trailing zeros in the binary
representation of the lanes of self.
sourceimpl isizex4
impl isizex4
sourcepub fn shuffle1_dyn<I>(self, indices: I) -> Self where
Self: Shuffle1Dyn<Indices = I>,
pub fn shuffle1_dyn<I>(self, indices: I) -> Self where
Self: Shuffle1Dyn<Indices = I>,
Shuffle vector elements according to indices.
sourceimpl isizex4
impl isizex4
sourcepub fn partial_lex_ord(&self) -> LexicographicallyOrdered<isizex4>
pub fn partial_lex_ord(&self) -> LexicographicallyOrdered<isizex4>
Returns a wrapper that implements PartialOrd.
Trait Implementations
sourceimpl AddAssign<Simd<[isize; 4]>> for isizex4
impl AddAssign<Simd<[isize; 4]>> for isizex4
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the += operation. Read more
sourceimpl AddAssign<isize> for isizex4
impl AddAssign<isize> for isizex4
sourcefn add_assign(&mut self, other: isize)
fn add_assign(&mut self, other: isize)
Performs the += operation. Read more
sourceimpl BitAndAssign<Simd<[isize; 4]>> for isizex4
impl BitAndAssign<Simd<[isize; 4]>> for isizex4
sourcefn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the &= operation. Read more
sourceimpl BitAndAssign<isize> for isizex4
impl BitAndAssign<isize> for isizex4
sourcefn bitand_assign(&mut self, other: isize)
fn bitand_assign(&mut self, other: isize)
Performs the &= operation. Read more
sourceimpl BitOrAssign<Simd<[isize; 4]>> for isizex4
impl BitOrAssign<Simd<[isize; 4]>> for isizex4
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the |= operation. Read more
sourceimpl BitOrAssign<isize> for isizex4
impl BitOrAssign<isize> for isizex4
sourcefn bitor_assign(&mut self, other: isize)
fn bitor_assign(&mut self, other: isize)
Performs the |= operation. Read more
sourceimpl BitXorAssign<Simd<[isize; 4]>> for isizex4
impl BitXorAssign<Simd<[isize; 4]>> for isizex4
sourcefn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the ^= operation. Read more
sourceimpl BitXorAssign<isize> for isizex4
impl BitXorAssign<isize> for isizex4
sourcefn bitxor_assign(&mut self, other: isize)
fn bitxor_assign(&mut self, other: isize)
Performs the ^= operation. Read more
sourceimpl DivAssign<Simd<[isize; 4]>> for isizex4
impl DivAssign<Simd<[isize; 4]>> for isizex4
sourcefn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the /= operation. Read more
sourceimpl DivAssign<isize> for isizex4
impl DivAssign<isize> for isizex4
sourcefn div_assign(&mut self, other: isize)
fn div_assign(&mut self, other: isize)
Performs the /= operation. Read more
sourceimpl MulAssign<Simd<[isize; 4]>> for isizex4
impl MulAssign<Simd<[isize; 4]>> for isizex4
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the *= operation. Read more
sourceimpl MulAssign<isize> for isizex4
impl MulAssign<isize> for isizex4
sourcefn mul_assign(&mut self, other: isize)
fn mul_assign(&mut self, other: isize)
Performs the *= operation. Read more
sourceimpl RemAssign<Simd<[isize; 4]>> for isizex4
impl RemAssign<Simd<[isize; 4]>> for isizex4
sourcefn rem_assign(&mut self, other: Self)
fn rem_assign(&mut self, other: Self)
Performs the %= operation. Read more
sourceimpl RemAssign<isize> for isizex4
impl RemAssign<isize> for isizex4
sourcefn rem_assign(&mut self, other: isize)
fn rem_assign(&mut self, other: isize)
Performs the %= operation. Read more
sourceimpl ShlAssign<Simd<[isize; 4]>> for isizex4
impl ShlAssign<Simd<[isize; 4]>> for isizex4
sourcefn shl_assign(&mut self, other: Self)
fn shl_assign(&mut self, other: Self)
Performs the <<= operation. Read more
sourceimpl ShlAssign<u32> for isizex4
impl ShlAssign<u32> for isizex4
sourcefn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
Performs the <<= operation. Read more
sourceimpl ShrAssign<Simd<[isize; 4]>> for isizex4
impl ShrAssign<Simd<[isize; 4]>> for isizex4
sourcefn shr_assign(&mut self, other: Self)
fn shr_assign(&mut self, other: Self)
Performs the >>= operation. Read more
sourceimpl ShrAssign<u32> for isizex4
impl ShrAssign<u32> for isizex4
sourcefn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
Performs the >>= operation. Read more
sourceimpl SubAssign<Simd<[isize; 4]>> for isizex4
impl SubAssign<Simd<[isize; 4]>> for isizex4
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the -= operation. Read more
sourceimpl SubAssign<isize> for isizex4
impl SubAssign<isize> for isizex4
sourcefn sub_assign(&mut self, other: isize)
fn sub_assign(&mut self, other: isize)
Performs the -= operation. Read more