Trait lav::SimdBits

source ·
pub trait SimdBits<B: Bits, const N: usize>
where LaneCount<N>: SupportedLaneCount, for<'a> Self: Send + Sync + Clone + Copy + Default + PartialEq + Eq + PartialOrd + Ord + From<Simd<B, N>> + Into<Simd<B, N>> + From<[B; N]> + Into<[B; N]> + AsRef<[B; N]> + AsMut<[B; N]> + Product<Self> + Sum<Self> + Product<&'a Self> + Sum<&'a Self> + Hash + Debug + Index<usize, Output = B> + IndexMut<usize, Output = B> + Select<Self::Mask> + Add<Output = Self> + AddAssign + Sub<Output = Self> + SubAssign + Mul<Output = Self> + MulAssign + Div<Output = Self> + DivAssign + Rem<Output = Self> + RemAssign + Shl<Output = Self> + ShlAssign + Shr<Output = Self> + ShrAssign + BitAnd<Output = Self> + BitAndAssign + BitOr<Output = Self> + BitOrAssign + BitXor<Output = Self> + BitXorAssign + Add<&'a Self, Output = Self> + AddAssign<&'a Self> + Sub<&'a Self, Output = Self> + SubAssign<&'a Self> + Mul<&'a Self, Output = Self> + MulAssign<&'a Self> + Div<&'a Self, Output = Self> + DivAssign<&'a Self> + Rem<&'a Self, Output = Self> + RemAssign<&'a Self> + Shl<&'a Self, Output = Self> + ShlAssign<&'a Self> + Shr<&'a Self, Output = Self> + ShrAssign<&'a Self> + BitAnd<&'a Self, Output = Self> + BitAndAssign<&'a Self> + BitOr<&'a Self, Output = Self> + BitOrAssign<&'a Self> + BitXor<&'a Self, Output = Self> + BitXorAssign<&'a Self> + Not<Output = Self>,
{ type Mask: SimdMask<N>; const N: usize = N; // Required methods fn splat(value: B) -> Self; fn simd_eq(self, other: Self) -> Self::Mask; fn simd_ne(self, other: Self) -> Self::Mask; fn simd_lt(self, other: Self) -> Self::Mask; fn simd_gt(self, other: Self) -> Self::Mask; fn simd_le(self, other: Self) -> Self::Mask; fn simd_ge(self, other: Self) -> Self::Mask; fn saturating_add(self, other: Self) -> Self; fn saturating_sub(self, other: Self) -> Self; // Provided methods fn len(&self) -> usize { ... } fn abs_sub(self, other: Self) -> Self { ... } }
Expand description

Bits representation vector of SimdReal vector with associated SimdMask vector.

Required Associated Types§

source

type Mask: SimdMask<N>

Associated mask vector.

Provided Associated Constants§

source

const N: usize = N

Number of lanes in this vector.

Required Methods§

source

fn splat(value: B) -> Self

Constructs a SIMD vector by setting all lanes to the given value.

source

fn simd_eq(self, other: Self) -> Self::Mask

Test if each lane is equal to the corresponding lane in other.

source

fn simd_ne(self, other: Self) -> Self::Mask

Test if each lane is not equal to the corresponding lane in other.

source

fn simd_lt(self, other: Self) -> Self::Mask

Test if each lane is less than the corresponding lane in other.

source

fn simd_gt(self, other: Self) -> Self::Mask

Test if each lane is greater than the corresponding lane in other.

source

fn simd_le(self, other: Self) -> Self::Mask

Test if each lane is less than or equal to the corresponding lane in other.

source

fn simd_ge(self, other: Self) -> Self::Mask

Test if each lane is greater than or equal to the corresponding lane in other.

source

fn saturating_add(self, other: Self) -> Self

Lanewise saturating add.

source

fn saturating_sub(self, other: Self) -> Self

Lanewise saturating subtract.

Provided Methods§

source

fn len(&self) -> usize

Get the number of lanes in this vector.

source

fn abs_sub(self, other: Self) -> Self

Lanewise absolute subtract.

Equals self.saturating_sub(other) | other.saturating_sub(self).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<const N: usize> SimdBits<u32, N> for Simd<u32, N>

§

type Mask = Mask<i32, N>

source§

fn splat(value: u32) -> Self

source§

fn simd_eq(self, other: Self) -> Self::Mask

source§

fn simd_ne(self, other: Self) -> Self::Mask

source§

fn simd_lt(self, other: Self) -> Self::Mask

source§

fn simd_gt(self, other: Self) -> Self::Mask

source§

fn simd_le(self, other: Self) -> Self::Mask

source§

fn simd_ge(self, other: Self) -> Self::Mask

source§

fn saturating_add(self, other: Self) -> Self

source§

fn saturating_sub(self, other: Self) -> Self

source§

impl<const N: usize> SimdBits<u64, N> for Simd<u64, N>

§

type Mask = Mask<i64, N>

source§

fn splat(value: u64) -> Self

source§

fn simd_eq(self, other: Self) -> Self::Mask

source§

fn simd_ne(self, other: Self) -> Self::Mask

source§

fn simd_lt(self, other: Self) -> Self::Mask

source§

fn simd_gt(self, other: Self) -> Self::Mask

source§

fn simd_le(self, other: Self) -> Self::Mask

source§

fn simd_ge(self, other: Self) -> Self::Mask

source§

fn saturating_add(self, other: Self) -> Self

source§

fn saturating_sub(self, other: Self) -> Self

Implementors§