Type Definition packed_simd::i8x64
source · pub type i8x64 = Simd<[i8; 64]>;
Expand description
A 512-bit vector with 64 i8
lanes.
Implementations§
source§impl i8x64
impl i8x64
sourcepub const fn new(
x0: i8,
x1: i8,
x2: i8,
x3: i8,
x4: i8,
x5: i8,
x6: i8,
x7: i8,
x8: i8,
x9: i8,
x10: i8,
x11: i8,
x12: i8,
x13: i8,
x14: i8,
x15: i8,
x16: i8,
x17: i8,
x18: i8,
x19: i8,
x20: i8,
x21: i8,
x22: i8,
x23: i8,
x24: i8,
x25: i8,
x26: i8,
x27: i8,
x28: i8,
x29: i8,
x30: i8,
x31: i8,
x32: i8,
x33: i8,
x34: i8,
x35: i8,
x36: i8,
x37: i8,
x38: i8,
x39: i8,
x40: i8,
x41: i8,
x42: i8,
x43: i8,
x44: i8,
x45: i8,
x46: i8,
x47: i8,
x48: i8,
x49: i8,
x50: i8,
x51: i8,
x52: i8,
x53: i8,
x54: i8,
x55: i8,
x56: i8,
x57: i8,
x58: i8,
x59: i8,
x60: i8,
x61: i8,
x62: i8,
x63: i8
) -> Self
pub const fn new( x0: i8, x1: i8, x2: i8, x3: i8, x4: i8, x5: i8, x6: i8, x7: i8, x8: i8, x9: i8, x10: i8, x11: i8, x12: i8, x13: i8, x14: i8, x15: i8, x16: i8, x17: i8, x18: i8, x19: i8, x20: i8, x21: i8, x22: i8, x23: i8, x24: i8, x25: i8, x26: i8, x27: i8, x28: i8, x29: i8, x30: i8, x31: i8, x32: i8, x33: i8, x34: i8, x35: i8, x36: i8, x37: i8, x38: i8, x39: i8, x40: i8, x41: i8, x42: i8, x43: i8, x44: i8, x45: i8, x46: i8, x47: i8, x48: i8, x49: i8, x50: i8, x51: i8, x52: i8, x53: i8, x54: i8, x55: i8, x56: i8, x57: i8, x58: i8, x59: i8, x60: i8, x61: i8, x62: i8, x63: i8 ) -> Self
Creates a new instance with each vector elements initialized with the provided values.
sourcepub const fn splat(value: i8) -> Self
pub const fn splat(value: i8) -> Self
Constructs a new instance with each element initialized to
value
.
sourcepub unsafe fn extract_unchecked(self, index: usize) -> i8
pub unsafe fn extract_unchecked(self, index: usize) -> i8
sourcepub fn replace(self, index: usize, new_value: i8) -> Self
pub fn replace(self, index: usize, new_value: i8) -> 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: i8) -> Self
pub unsafe fn replace_unchecked(self, index: usize, new_value: i8) -> Self
Returns a new vector where the value at index
is replaced by new_value
.
Safety
If index >= Self::lanes()
the behavior is undefined.
source§impl i8x64
impl i8x64
sourcepub fn rotate_left(self, n: i8x64) -> i8x64
pub fn rotate_left(self, n: i8x64) -> i8x64
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: i8x64) -> i8x64
pub fn rotate_right(self, n: i8x64) -> i8x64
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_right
.
source§impl i8x64
impl i8x64
sourcepub fn wrapping_sum(self) -> i8
pub fn wrapping_sum(self) -> i8
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) -> i8
pub fn wrapping_product(self) -> i8
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.
source§impl i8x64
impl i8x64
sourcepub fn max_element(self) -> i8
pub fn max_element(self) -> i8
Largest vector element value.
sourcepub fn min_element(self) -> i8
pub fn min_element(self) -> i8
Smallest vector element value.
source§impl i8x64
impl i8x64
sourcepub fn and(self) -> i8
pub fn and(self) -> i8
Lane-wise bitwise and
of the vector elements.
Note: if the vector has one lane, the first element of the vector is returned.
source§impl i8x64
impl i8x64
sourcepub fn from_slice_aligned(slice: &[i8]) -> Self
pub fn from_slice_aligned(slice: &[i8]) -> 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: &[i8]) -> Self
pub fn from_slice_unaligned(slice: &[i8]) -> Self
sourcepub unsafe fn from_slice_aligned_unchecked(slice: &[i8]) -> Self
pub unsafe fn from_slice_aligned_unchecked(slice: &[i8]) -> Self
Instantiates a new vector with the values of the slice
.
Safety
If slice.len() < Self::lanes()
or &slice[0]
is not aligned
to an align_of::<Self>()
boundary, the behavior is undefined.
sourcepub unsafe fn from_slice_unaligned_unchecked(slice: &[i8]) -> Self
pub unsafe fn from_slice_unaligned_unchecked(slice: &[i8]) -> Self
Instantiates a new vector with the values of the slice
.
Safety
If slice.len() < Self::lanes()
the behavior is undefined.
source§impl i8x64
impl i8x64
sourcepub fn write_to_slice_aligned(self, slice: &mut [i8])
pub fn write_to_slice_aligned(self, slice: &mut [i8])
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 [i8])
pub fn write_to_slice_unaligned(self, slice: &mut [i8])
sourcepub unsafe fn write_to_slice_aligned_unchecked(self, slice: &mut [i8])
pub unsafe fn write_to_slice_aligned_unchecked(self, slice: &mut [i8])
Writes the values of the vector to the slice
.
Safety
If slice.len() < Self::lanes()
or &slice[0]
is not
aligned to an align_of::<Self>()
boundary, the behavior is
undefined.
sourcepub unsafe fn write_to_slice_unaligned_unchecked(self, slice: &mut [i8])
pub unsafe fn write_to_slice_unaligned_unchecked(self, slice: &mut [i8])
Writes the values of the vector to the slice
.
Safety
If slice.len() < Self::lanes()
the behavior is undefined.
source§impl i8x64
impl i8x64
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.
source§impl i8x64
impl i8x64
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
.
source§impl i8x64
impl i8x64
sourcepub fn shuffle1_dyn<I>(self, indices: I) -> Selfwhere
Self: Shuffle1Dyn<Indices = I>,
pub fn shuffle1_dyn<I>(self, indices: I) -> Selfwhere Self: Shuffle1Dyn<Indices = I>,
Shuffle vector elements according to indices
.
source§impl i8x64
impl i8x64
sourcepub fn partial_lex_ord(&self) -> LexicographicallyOrdered<i8x64>
pub fn partial_lex_ord(&self) -> LexicographicallyOrdered<i8x64>
Returns a wrapper that implements PartialOrd
.
Trait Implementations§
source§impl AddAssign<Simd<[i8; 64]>> for i8x64
impl AddAssign<Simd<[i8; 64]>> for i8x64
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+=
operation. Read moresource§impl AddAssign<i8> for i8x64
impl AddAssign<i8> for i8x64
source§fn add_assign(&mut self, other: i8)
fn add_assign(&mut self, other: i8)
+=
operation. Read moresource§impl BitAndAssign<Simd<[i8; 64]>> for i8x64
impl BitAndAssign<Simd<[i8; 64]>> for i8x64
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
&=
operation. Read moresource§impl BitAndAssign<i8> for i8x64
impl BitAndAssign<i8> for i8x64
source§fn bitand_assign(&mut self, other: i8)
fn bitand_assign(&mut self, other: i8)
&=
operation. Read moresource§impl BitOrAssign<Simd<[i8; 64]>> for i8x64
impl BitOrAssign<Simd<[i8; 64]>> for i8x64
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
|=
operation. Read moresource§impl BitOrAssign<i8> for i8x64
impl BitOrAssign<i8> for i8x64
source§fn bitor_assign(&mut self, other: i8)
fn bitor_assign(&mut self, other: i8)
|=
operation. Read moresource§impl BitXorAssign<Simd<[i8; 64]>> for i8x64
impl BitXorAssign<Simd<[i8; 64]>> for i8x64
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
^=
operation. Read moresource§impl BitXorAssign<i8> for i8x64
impl BitXorAssign<i8> for i8x64
source§fn bitxor_assign(&mut self, other: i8)
fn bitxor_assign(&mut self, other: i8)
^=
operation. Read moresource§impl DivAssign<Simd<[i8; 64]>> for i8x64
impl DivAssign<Simd<[i8; 64]>> for i8x64
source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
/=
operation. Read moresource§impl DivAssign<i8> for i8x64
impl DivAssign<i8> for i8x64
source§fn div_assign(&mut self, other: i8)
fn div_assign(&mut self, other: i8)
/=
operation. Read moresource§impl MulAssign<Simd<[i8; 64]>> for i8x64
impl MulAssign<Simd<[i8; 64]>> for i8x64
source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*=
operation. Read moresource§impl MulAssign<i8> for i8x64
impl MulAssign<i8> for i8x64
source§fn mul_assign(&mut self, other: i8)
fn mul_assign(&mut self, other: i8)
*=
operation. Read moresource§impl RemAssign<Simd<[i8; 64]>> for i8x64
impl RemAssign<Simd<[i8; 64]>> for i8x64
source§fn rem_assign(&mut self, other: Self)
fn rem_assign(&mut self, other: Self)
%=
operation. Read moresource§impl RemAssign<i8> for i8x64
impl RemAssign<i8> for i8x64
source§fn rem_assign(&mut self, other: i8)
fn rem_assign(&mut self, other: i8)
%=
operation. Read moresource§impl ShlAssign<Simd<[i8; 64]>> for i8x64
impl ShlAssign<Simd<[i8; 64]>> for i8x64
source§fn shl_assign(&mut self, other: Self)
fn shl_assign(&mut self, other: Self)
<<=
operation. Read moresource§impl ShlAssign<u32> for i8x64
impl ShlAssign<u32> for i8x64
source§fn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
<<=
operation. Read moresource§impl ShrAssign<Simd<[i8; 64]>> for i8x64
impl ShrAssign<Simd<[i8; 64]>> for i8x64
source§fn shr_assign(&mut self, other: Self)
fn shr_assign(&mut self, other: Self)
>>=
operation. Read moresource§impl ShrAssign<u32> for i8x64
impl ShrAssign<u32> for i8x64
source§fn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
>>=
operation. Read moresource§impl SubAssign<Simd<[i8; 64]>> for i8x64
impl SubAssign<Simd<[i8; 64]>> for i8x64
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
-=
operation. Read moresource§impl SubAssign<i8> for i8x64
impl SubAssign<i8> for i8x64
source§fn sub_assign(&mut self, other: i8)
fn sub_assign(&mut self, other: i8)
-=
operation. Read more