pub trait SimdBase: 'static + Sized + Clone + Copy + Sync + Send + Debug + PartialEq + Eq + Default + Pod + Zeroable + BitXor + BitXorAssign + BitOr + BitOrAssign + BitAnd + BitAndAssign + AddAssign + Add + SubAssign + Sub + ShlAssign<u64> + Shl<u64, Output = Self> + ShrAssign<u64> + Shr<u64, Output = Self> + ShlAssign<Self> + Shl<Self, Output = Self> + ShrAssign<Self> + Shr<Self, Output = Self> + ConstantTimeEq + ConditionallySelectable {
    type Array: 'static + Sized + Clone + Copy + Sync + Send + Debug + Pod + Zeroable + PartialEq + Eq + Default + Hash + AsRef<[Self::Scalar]> + From<Self> + Into<Self>;
    type Scalar: Scalar;
    type Signed: SimdBase<Scalar = <<Self as SimdBase>::Scalar as Scalar>::Signed> + From<Self> + Into<Self>;
    type Unsigned: SimdBase<Scalar = <<Self as SimdBase>::Scalar as Scalar>::Unsigned> + From<Self> + Into<Self>;
    type BroadcastLoInput: SimdBase<Scalar = Self::Scalar>;

    const LANES: usize;
    const ZERO: Self;
Show 15 methods fn is_zero(&self) -> bool; fn set_lo(value: Self::Scalar) -> Self; fn broadcast(value: Self::Scalar) -> Self; fn broadcast_lo(of: Self::BroadcastLoInput) -> Self; fn extract<const I: usize>(&self) -> Self::Scalar; fn shift_left<const BITS: usize>(&self) -> Self; fn shift_right<const BITS: usize>(&self) -> Self; fn and_not(&self, other: Self) -> Self; fn cmp_eq(&self, other: Self) -> Self; fn cmp_gt(&self, other: Self) -> Self; fn unpack_lo(&self, other: Self) -> Self; fn unpack_hi(&self, other: Self) -> Self; fn max(&self, other: Self) -> Self; fn min(&self, other: Self) -> Self; fn as_array(&self) -> Self::Array { ... }
}
Expand description

A vector equivalent to [T; Self::Lanes].

Note that each implemented method shows an equivalent scalar implementation.

Effects of Signedness on shift operations

When Scalar is signed, this will shift in sign bits, as opposed to zeroes.

Required Associated Types

The equivalent array type of this vector.

The scalar that this value holds.

The signed version of this vector.

The unsigned version of this vector.

Required Associated Constants

The number of elements of this vector.

Note: this number is not the number of 128-bit lanes in this vector.

Required Methods

Create a new vector by setting element 0 to value, and the rest of the elements to 0.

Create a new vector by setting every element to value.

Create a vector by setting every element to element 0 of of.

Get the I-th element of this vector

Shift each element left by BITS.

Shift each element right by BITS.

Effects of Signedness

When T is signed, this will shift in sign bits, as opposed to zeroes.

Compute self & (! other).

Create a vector where each element is all 1’s if the elements are equal, and all 0’s otherwise.

Create a vector where each element is all 1’s if the element of self is greater than the corresponding element of other, and all 0’s otherwise.

Interleave the elements of the low half of self and other

Interleave the elements of the high half of self and other

Make a vector consisting of the maximum elements of self and other.

Make a vector consisting of the minimum elements of self and other.

Provided Methods

Convert the vector to an array.

Implementors