[][src]Type Definition packed_simd_2::u8x16

type u8x16 = Simd<[u8; 16]>;

A 128-bit vector with 16 u8 lanes.

Implementations

impl u8x16[src]

pub const fn new(
    x0: u8,
    x1: u8,
    x2: u8,
    x3: u8,
    x4: u8,
    x5: u8,
    x6: u8,
    x7: u8,
    x8: u8,
    x9: u8,
    x10: u8,
    x11: u8,
    x12: u8,
    x13: u8,
    x14: u8,
    x15: u8
) -> Self
[src]

Creates a new instance with each vector elements initialized with the provided values.

pub const fn lanes() -> usize[src]

Returns the number of vector lanes.

pub const fn splat(value: u8) -> Self[src]

Constructs a new instance with each element initialized to value.

pub fn extract(self, index: usize) -> u8[src]

Extracts the value at index.

Panics

If index >= Self::lanes().

pub unsafe fn extract_unchecked(self, index: usize) -> u8[src]

Extracts the value at index.

Safety

If index >= Self::lanes() the behavior is undefined.

#[must_use = "replace does not modify the original value - \ it returns a new vector with the value at `index` \ replaced by `new_value`d"]pub fn replace(self, index: usize, new_value: u8) -> Self[src]

Returns a new vector where the value at index is replaced by new_value.

Panics

If index >= Self::lanes().

#[must_use = "replace_unchecked does not modify the original value - \ it returns a new vector with the value at `index` \ replaced by `new_value`d"]pub unsafe fn replace_unchecked(self, index: usize, new_value: u8) -> Self[src]

Returns a new vector where the value at index is replaced by new_value.

Safety

If index >= Self::lanes() the behavior is undefined.

impl u8x16[src]

pub fn rotate_left(self, n: u8x16) -> u8x16[src]

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.

pub fn rotate_right(self, n: u8x16) -> u8x16[src]

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.

impl u8x16[src]

pub fn min(self, x: Self) -> Self[src]

Minimum of two vectors.

Returns a new vector containing the minimum value of each of the input vector lanes.

pub fn max(self, x: Self) -> Self[src]

Maximum of two vectors.

Returns a new vector containing the maximum value of each of the input vector lanes.

impl u8x16[src]

pub fn wrapping_sum(self) -> u8[src]

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.

pub fn wrapping_product(self) -> u8[src]

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.

impl u8x16[src]

pub fn max_element(self) -> u8[src]

Largest vector element value.

pub fn min_element(self) -> u8[src]

Smallest vector element value.

impl u8x16[src]

pub fn and(self) -> u8[src]

Lane-wise bitwise and of the vector elements.

Note: if the vector has one lane, the first element of the vector is returned.

pub fn or(self) -> u8[src]

Lane-wise bitwise or of the vector elements.

Note: if the vector has one lane, the first element of the vector is returned.

pub fn xor(self) -> u8[src]

Lane-wise bitwise xor of the vector elements.

Note: if the vector has one lane, the first element of the vector is returned.

impl u8x16[src]

pub fn from_slice_aligned(slice: &[u8]) -> Self[src]

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.

pub fn from_slice_unaligned(slice: &[u8]) -> Self[src]

Instantiates a new vector with the values of the slice.

Panics

If slice.len() < Self::lanes().

pub unsafe fn from_slice_aligned_unchecked(slice: &[u8]) -> Self[src]

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.

pub unsafe fn from_slice_unaligned_unchecked(slice: &[u8]) -> Self[src]

Instantiates a new vector with the values of the slice.

Safety

If slice.len() < Self::lanes() the behavior is undefined.

impl u8x16[src]

pub fn write_to_slice_aligned(self, slice: &mut [u8])[src]

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.

pub fn write_to_slice_unaligned(self, slice: &mut [u8])[src]

Writes the values of the vector to the slice.

Panics

If slice.len() < Self::lanes().

pub unsafe fn write_to_slice_aligned_unchecked(self, slice: &mut [u8])[src]

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.

pub unsafe fn write_to_slice_unaligned_unchecked(self, slice: &mut [u8])[src]

Writes the values of the vector to the slice.

Safety

If slice.len() < Self::lanes() the behavior is undefined.

impl u8x16[src]

pub fn swap_bytes(self) -> Self[src]

Reverses the byte order of the vector.

pub fn to_le(self) -> Self[src]

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.

pub fn to_be(self) -> Self[src]

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.

pub fn from_le(x: Self) -> Self[src]

Converts a vector from little endian to the target's endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

pub fn from_be(x: Self) -> Self[src]

Converts a vector from big endian to the target's endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

impl u8x16[src]

pub fn count_ones(self) -> Self[src]

Returns the number of ones in the binary representation of the lanes of self.

pub fn count_zeros(self) -> Self[src]

Returns the number of zeros in the binary representation of the lanes of self.

pub fn leading_zeros(self) -> Self[src]

Returns the number of leading zeros in the binary representation of the lanes of self.

pub fn trailing_zeros(self) -> Self[src]

Returns the number of trailing zeros in the binary representation of the lanes of self.

impl u8x16[src]

pub fn shuffle1_dyn<I>(self, indices: I) -> Self where
    Self: Shuffle1Dyn<Indices = I>, 
[src]

Shuffle vector elements according to indices.

impl u8x16[src]

pub fn eq(self, other: Self) -> m8x16[src]

Lane-wise equality comparison.

pub fn ne(self, other: Self) -> m8x16[src]

Lane-wise inequality comparison.

pub fn lt(self, other: Self) -> m8x16[src]

Lane-wise less-than comparison.

pub fn le(self, other: Self) -> m8x16[src]

Lane-wise less-than-or-equals comparison.

pub fn gt(self, other: Self) -> m8x16[src]

Lane-wise greater-than comparison.

pub fn ge(self, other: Self) -> m8x16[src]

Lane-wise greater-than-or-equals comparison.

impl u8x16[src]

pub fn partial_lex_ord(&self) -> LexicographicallyOrdered<u8x16>[src]

Returns a wrapper that implements PartialOrd.

impl u8x16[src]

pub fn lex_ord(&self) -> LexicographicallyOrdered<u8x16>[src]

Returns a wrapper that implements Ord.

impl u8x16[src]

pub fn bitmask(self) -> u16[src]

Creates a bitmask with the MSB of each vector lane.

If the vector has less than 8 lanes, the bits that do not correspond to any vector lanes are cleared.

Trait Implementations

impl Add<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u8> for u8x16[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Simd<[u8; 16]>> for u8x16[src]

impl AddAssign<u8> for u8x16[src]

impl Binary for u8x16[src]

impl BitAnd<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAnd<u8> for u8x16[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAndAssign<Simd<[u8; 16]>> for u8x16[src]

impl BitAndAssign<u8> for u8x16[src]

impl BitOr<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOr<u8> for u8x16[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<Simd<[u8; 16]>> for u8x16[src]

impl BitOrAssign<u8> for u8x16[src]

impl BitXor<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the ^ operator.

impl BitXor<u8> for u8x16[src]

type Output = Self

The resulting type after applying the ^ operator.

impl BitXorAssign<Simd<[u8; 16]>> for u8x16[src]

impl BitXorAssign<u8> for u8x16[src]

impl Debug for u8x16[src]

impl Default for u8x16[src]

impl Div<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u8> for u8x16[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<Simd<[u8; 16]>> for u8x16[src]

impl DivAssign<u8> for u8x16[src]

impl Eq for u8x16[src]

impl From<[u8; 16]> for u8x16[src]

impl FromCast<Simd<[f32; 16]>> for u8x16[src]

impl FromCast<Simd<[i16; 16]>> for u8x16[src]

impl FromCast<Simd<[i32; 16]>> for u8x16[src]

impl FromCast<Simd<[i8; 16]>> for u8x16[src]

impl FromCast<Simd<[m16; 16]>> for u8x16[src]

impl FromCast<Simd<[m32; 16]>> for u8x16[src]

impl FromCast<Simd<[m8; 16]>> for u8x16[src]

impl FromCast<Simd<[u16; 16]>> for u8x16[src]

impl FromCast<Simd<[u32; 16]>> for u8x16[src]

impl Hash for u8x16[src]

impl LowerHex for u8x16[src]

impl Mul<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u8> for u8x16[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<Simd<[u8; 16]>> for u8x16[src]

impl MulAssign<u8> for u8x16[src]

impl Not for u8x16[src]

type Output = Self

The resulting type after applying the ! operator.

impl Octal for u8x16[src]

impl PartialEq<Simd<[u8; 16]>> for u8x16[src]

impl<'a> Product<&'a Simd<[u8; 16]>> for u8x16[src]

impl Product<Simd<[u8; 16]>> for u8x16[src]

impl Rem<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the % operator.

impl Rem<u8> for u8x16[src]

type Output = Self

The resulting type after applying the % operator.

impl RemAssign<Simd<[u8; 16]>> for u8x16[src]

impl RemAssign<u8> for u8x16[src]

impl Shl<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the << operator.

impl Shl<u32> for u8x16[src]

type Output = Self

The resulting type after applying the << operator.

impl ShlAssign<Simd<[u8; 16]>> for u8x16[src]

impl ShlAssign<u32> for u8x16[src]

impl Shr<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the >> operator.

impl Shr<u32> for u8x16[src]

type Output = Self

The resulting type after applying the >> operator.

impl ShrAssign<Simd<[u8; 16]>> for u8x16[src]

impl ShrAssign<u32> for u8x16[src]

impl Simd for u8x16[src]

type Element = u8

Element type of the SIMD vector

type LanesType = [u32; 16]

The type: [u32; Self::N].

impl Sub<Simd<[u8; 16]>> for u8x16[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<u8> for u8x16[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Simd<[u8; 16]>> for u8x16[src]

impl SubAssign<u8> for u8x16[src]

impl<'a> Sum<&'a Simd<[u8; 16]>> for u8x16[src]

impl Sum<Simd<[u8; 16]>> for u8x16[src]

impl UpperHex for u8x16[src]