M128

Struct M128 

Source
pub struct M128(/* private fields */);
Expand description

128-bit value that is used for 128-bit SIMD operations

Implementations§

Source§

impl M128

Source

pub const fn from_u128(val: u128) -> Self

Trait Implementations§

Source§

impl BitAnd for M128

Source§

type Output = M128

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAndAssign for M128

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr for M128

Source§

type Output = M128

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOrAssign for M128

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor for M128

Source§

type Output = M128

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXorAssign for M128

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for M128

Source§

fn clone(&self) -> M128

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for M128

Source§

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

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

impl Default for M128

Source§

fn default() -> Self

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

impl DeserializeBytes for M128

Source§

fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>
where Self: Sized,

Source§

impl Display for M128

Source§

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

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

impl Distribution<M128> for StandardUniform

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> M128

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl Divisible<u128> for M128

Source§

const LOG_N: usize = 0usize

The log2 of the number of T elements that fit in Self.
Source§

fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u128> + Send + Clone

Returns an iterator over subdivisions of this underlier value, ordered from LSB to MSB.
Source§

fn ref_iter( value: &Self, ) -> impl ExactSizeIterator<Item = u128> + Send + Clone + '_

Returns an iterator over subdivisions of this underlier reference, ordered from LSB to MSB.
Source§

fn slice_iter( slice: &[Self], ) -> impl ExactSizeIterator<Item = u128> + Send + Clone + '_

Returns an iterator over subdivisions of a slice of underliers, ordered from LSB to MSB.
Source§

fn get(self, index: usize) -> u128

Get element at index (LSB-first ordering). Read more
Source§

fn set(self, index: usize, val: u128) -> Self

Set element at index (LSB-first ordering), returning modified value. Read more
Source§

fn broadcast(val: u128) -> Self

Create a value with val broadcast to all N positions.
Source§

fn from_iter(iter: impl Iterator<Item = u128>) -> Self

Construct a value from an iterator of elements. Read more
Source§

const N: usize = _

The number of T elements that fit in Self.
Source§

impl Divisible<u16> for M128

Source§

const LOG_N: usize = 3usize

The log2 of the number of T elements that fit in Self.
Source§

fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u16> + Send + Clone

Returns an iterator over subdivisions of this underlier value, ordered from LSB to MSB.
Source§

fn ref_iter( value: &Self, ) -> impl ExactSizeIterator<Item = u16> + Send + Clone + '_

Returns an iterator over subdivisions of this underlier reference, ordered from LSB to MSB.
Source§

fn slice_iter( slice: &[Self], ) -> impl ExactSizeIterator<Item = u16> + Send + Clone + '_

Returns an iterator over subdivisions of a slice of underliers, ordered from LSB to MSB.
Source§

fn get(self, index: usize) -> u16

Get element at index (LSB-first ordering). Read more
Source§

fn set(self, index: usize, val: u16) -> Self

Set element at index (LSB-first ordering), returning modified value. Read more
Source§

fn broadcast(val: u16) -> Self

Create a value with val broadcast to all N positions.
Source§

fn from_iter(iter: impl Iterator<Item = u16>) -> Self

Construct a value from an iterator of elements. Read more
Source§

const N: usize = _

The number of T elements that fit in Self.
Source§

impl Divisible<u32> for M128

Source§

const LOG_N: usize = 2usize

The log2 of the number of T elements that fit in Self.
Source§

fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u32> + Send + Clone

Returns an iterator over subdivisions of this underlier value, ordered from LSB to MSB.
Source§

fn ref_iter( value: &Self, ) -> impl ExactSizeIterator<Item = u32> + Send + Clone + '_

Returns an iterator over subdivisions of this underlier reference, ordered from LSB to MSB.
Source§

fn slice_iter( slice: &[Self], ) -> impl ExactSizeIterator<Item = u32> + Send + Clone + '_

Returns an iterator over subdivisions of a slice of underliers, ordered from LSB to MSB.
Source§

fn get(self, index: usize) -> u32

Get element at index (LSB-first ordering). Read more
Source§

fn set(self, index: usize, val: u32) -> Self

Set element at index (LSB-first ordering), returning modified value. Read more
Source§

fn broadcast(val: u32) -> Self

Create a value with val broadcast to all N positions.
Source§

fn from_iter(iter: impl Iterator<Item = u32>) -> Self

Construct a value from an iterator of elements. Read more
Source§

const N: usize = _

The number of T elements that fit in Self.
Source§

impl Divisible<u64> for M128

Source§

const LOG_N: usize = 1usize

The log2 of the number of T elements that fit in Self.
Source§

fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u64> + Send + Clone

Returns an iterator over subdivisions of this underlier value, ordered from LSB to MSB.
Source§

fn ref_iter( value: &Self, ) -> impl ExactSizeIterator<Item = u64> + Send + Clone + '_

Returns an iterator over subdivisions of this underlier reference, ordered from LSB to MSB.
Source§

fn slice_iter( slice: &[Self], ) -> impl ExactSizeIterator<Item = u64> + Send + Clone + '_

Returns an iterator over subdivisions of a slice of underliers, ordered from LSB to MSB.
Source§

fn get(self, index: usize) -> u64

Get element at index (LSB-first ordering). Read more
Source§

fn set(self, index: usize, val: u64) -> Self

Set element at index (LSB-first ordering), returning modified value. Read more
Source§

fn broadcast(val: u64) -> Self

Create a value with val broadcast to all N positions.
Source§

fn from_iter(iter: impl Iterator<Item = u64>) -> Self

Construct a value from an iterator of elements. Read more
Source§

const N: usize = _

The number of T elements that fit in Self.
Source§

impl Divisible<u8> for M128

Source§

const LOG_N: usize = 4usize

The log2 of the number of T elements that fit in Self.
Source§

fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u8> + Send + Clone

Returns an iterator over subdivisions of this underlier value, ordered from LSB to MSB.
Source§

fn ref_iter( value: &Self, ) -> impl ExactSizeIterator<Item = u8> + Send + Clone + '_

Returns an iterator over subdivisions of this underlier reference, ordered from LSB to MSB.
Source§

fn slice_iter( slice: &[Self], ) -> impl ExactSizeIterator<Item = u8> + Send + Clone + '_

Returns an iterator over subdivisions of a slice of underliers, ordered from LSB to MSB.
Source§

fn get(self, index: usize) -> u8

Get element at index (LSB-first ordering). Read more
Source§

fn set(self, index: usize, val: u8) -> Self

Set element at index (LSB-first ordering), returning modified value. Read more
Source§

fn broadcast(val: u8) -> Self

Create a value with val broadcast to all N positions.
Source§

fn from_iter(iter: impl Iterator<Item = u8>) -> Self

Construct a value from an iterator of elements. Read more
Source§

const N: usize = _

The number of T elements that fit in Self.
Source§

impl From<M128> for __m128i

Source§

fn from(value: M128) -> Self

Converts to this type from the input type.
Source§

impl From<M128> for u128

Source§

fn from(value: M128) -> Self

Converts to this type from the input type.
Source§

impl From<__m128i> for M128

Source§

fn from(value: __m128i) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for M128

Source§

fn from(value: u128) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for M128

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for M128

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for M128

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for M128

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl Not for M128

Source§

type Output = M128

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Ord for M128

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<F> PackScalar<F> for M128
where F: BinaryField, PackedPrimitiveType<M128, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = M128>,

Source§

impl PartialEq for M128

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialOrd for M128

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl SerializeBytes for M128

Source§

fn serialize(&self, write_buf: impl BufMut) -> Result<(), SerializationError>

Source§

impl Shl<usize> for M128

Source§

type Output = M128

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shr<usize> for M128

Source§

type Output = M128

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl UnderlierWithBitOps for M128

Source§

const ZERO: Self

Source§

const ONE: Self

Source§

const ONES: Self

Source§

fn fill_with_bit(val: u8) -> Self

Fill value with the given bit val must be 0 or 1.
Source§

fn interleave(self, other: Self, log_block_len: usize) -> (Self, Self)

Interleave with the given bit size
Source§

unsafe fn spread<T>(self, log_block_len: usize, block_idx: usize) -> Self
where T: UnderlierWithBitOps, Self: Divisible<T>,

Spread takes a block of sub_elements of T type within the current value and repeats them to the full underlier width. Read more
Source§

fn transpose(self, other: Self, log_block_len: usize) -> (Self, Self)

Transpose with the given bit size
Source§

fn from_fn<T>(f: impl FnMut(usize) -> T) -> Self
where T: UnderlierType, Self: Divisible<T>,

Source§

fn broadcast_subvalue<T>(value: T) -> Self
where T: UnderlierType, Self: Divisible<T>,

Broadcast subvalue to fill Self. Self::BITS/T::BITS is supposed to be a power of 2.
Source§

unsafe fn get_subvalue<T>(&self, i: usize) -> T
where T: UnderlierType, Self: Divisible<T>,

Gets the subvalue from the given position. Function panics in case when index is out of range. Read more
Source§

unsafe fn set_subvalue<T>(&mut self, i: usize, val: T)
where T: UnderlierWithBitOps, Self: Divisible<T>,

Sets the subvalue in the given position. Function panics in case when index is out of range. Read more
Source§

impl Zeroable for M128

§

fn zeroed() -> Self

Source§

impl Copy for M128

Source§

impl Eq for M128

Source§

impl Pod for M128

Source§

impl Send for M128

Source§

impl Sync for M128

Auto Trait Implementations§

§

impl Freeze for M128

§

impl RefUnwindSafe for M128

§

impl Unpin for M128

§

impl UnwindSafe for M128

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> 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
§

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

§

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.
§

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Random for T

Source§

fn random(rng: impl Rng) -> T

Generate random value
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

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

§

impl<_INNER> Bitwise for _INNER
where _INNER: Shr<usize, Output = _INNER> + BitAnd<Output = _INNER> + From<u8> + PartialEq + Sync + Copy,

§

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