Skip to main content

u8x16

Struct u8x16 

Source
pub struct u8x16 { /* private fields */ }

Implementations§

Source§

impl u8x16

Source

pub const ONE: u8x16

Source

pub const ZERO: u8x16

Source

pub const MAX: u8x16

Source

pub const MIN: u8x16

Source

pub const LANES: u16 = 16

The number of lanes in this SIMD vector.

Source

pub const BITS: u16 = 128

The size of this SIMD vector in bits.

Source§

impl u8x16

Source

pub const fn new(array: [u8; 16]) -> Self

Source

pub fn cmp_eq(self, rhs: Self) -> Self

Source

pub fn blend(self, t: Self, f: Self) -> Self

Source

pub fn max(self, rhs: Self) -> Self

Source

pub fn min(self, rhs: Self) -> Self

Source

pub fn saturating_add(self, rhs: Self) -> Self

Source

pub fn saturating_sub(self, rhs: Self) -> Self

Source

pub fn unpack_low(lhs: u8x16, rhs: u8x16) -> u8x16

Unpack and interleave low lanes of two u8x16

Source

pub fn unpack_high(lhs: u8x16, rhs: u8x16) -> u8x16

Unpack and interleave high lanes of two u8x16

Source

pub fn narrow_i16x8(lhs: i16x8, rhs: i16x8) -> Self

Pack and saturate two i16x8 to u8x16

Source

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 of self.
  • Index values that are out of range will cause that output lane to be 0.
Source

pub fn swizzle_relaxed(self, rhs: u8x16) -> u8x16

Works like swizzle with the following additional details

  • Indices in the range [0, 15] will select the i-th element of self.
  • 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 0 or self[rhs[i] % 16], depending on the implementation.
Source

pub fn move_mask(self) -> i32

Source

pub fn any(self) -> bool

Source

pub fn all(self) -> bool

Source

pub fn none(self) -> bool

Source

pub fn to_array(self) -> [u8; 16]

Source

pub fn as_array_ref(&self) -> &[u8; 16]

Source

pub fn as_array_mut(&mut self) -> &mut [u8; 16]

Source§

impl u8x16

Source

pub fn splat(elem: u8) -> u8x16

Trait Implementations§

Source§

impl Add for u8x16

Source§

type Output = u8x16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&u8x16> for u8x16

Source§

type Output = u8x16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u8> for u8x16

Source§

type Output = u8x16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u8x16> for u8

Source§

type Output = u8x16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8x16) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for u8x16

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl AddAssign<&u8x16> for u8x16

Source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
Source§

impl Binary for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for u8x16

Source§

type Output = u8x16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<&u8x16> for u8x16

Source§

type Output = u8x16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for u8x16

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitAndAssign<&u8x16> for u8x16

Source§

fn bitand_assign(&mut self, rhs: &Self)

Performs the &= operation. Read more
Source§

impl BitOr for u8x16

Source§

type Output = u8x16

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<&u8x16> for u8x16

Source§

type Output = u8x16

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for u8x16

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitOrAssign<&u8x16> for u8x16

Source§

fn bitor_assign(&mut self, rhs: &Self)

Performs the |= operation. Read more
Source§

impl BitXor for u8x16

Source§

type Output = u8x16

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<&u8x16> for u8x16

Source§

type Output = u8x16

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for u8x16

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl BitXorAssign<&u8x16> for u8x16

Source§

fn bitxor_assign(&mut self, rhs: &Self)

Performs the ^= operation. Read more
Source§

impl Clone for u8x16

Source§

fn clone(&self) -> u8x16

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CmpEq for u8x16

Source§

type Output = u8x16

Source§

fn cmp_eq(self, rhs: Self) -> Self::Output

Source§

impl Copy for u8x16

Source§

impl Debug for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for u8x16

Source§

fn default() -> u8x16

Returns the “default value” for a type. Read more
Source§

impl Display for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for u8x16

Source§

impl From<&[u8]> for u8x16

Source§

fn from(src: &[u8]) -> u8x16

Converts to this type from the input type.
Source§

impl From<[u8; 16]> for u8x16

Source§

fn from(arr: [u8; 16]) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for u8x16

Source§

fn from(elem: u8) -> Self

Splats the single value given across all lanes.

Source§

impl From<u8x16> for i16x16

Source§

fn from(i: u8x16) -> Self

widen with zero extend from u8 to i16

Source§

impl From<u8x16> for u16x16

Source§

fn from(v: u8x16) -> Self

widens and sign extends to u16x16

Source§

impl From<u8x16> for [u8; 16]

Source§

fn from(simd: u8x16) -> Self

Converts to this type from the input type.
Source§

impl LowerExp for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl LowerHex for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Neg for u8x16

Source§

type Output = u8x16

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for &u8x16

Source§

type Output = u8x16

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Not for u8x16

Source§

type Output = u8x16

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Not for &u8x16

Source§

type Output = u8x16

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Octal for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for u8x16

Source§

fn eq(&self, other: &u8x16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Pod for u8x16

Source§

impl StructuralPartialEq for u8x16

Source§

impl Sub for u8x16

Source§

type Output = u8x16

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&u8x16> for u8x16

Source§

type Output = u8x16

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Self) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<u8> for u8x16

Source§

type Output = u8x16

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<u8x16> for u8

Source§

type Output = u8x16

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8x16) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for u8x16

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl SubAssign<&u8x16> for u8x16

Source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
Source§

impl<RHS> Sum<RHS> for u8x16
where u8x16: AddAssign<RHS>,

Source§

fn sum<I: Iterator<Item = RHS>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl UpperExp for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl UpperHex for u8x16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Zeroable for u8x16

Source§

fn zeroed() -> Self

Auto Trait Implementations§

§

impl Freeze for u8x16

§

impl RefUnwindSafe for u8x16

§

impl Send for u8x16

§

impl Sync for u8x16

§

impl Unpin for u8x16

§

impl UnsafeUnpin for u8x16

§

impl UnwindSafe for u8x16

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

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

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.