pub struct M128(/* private fields */);Expand description
128-bit value that is used for 128-bit SIMD operations
Implementations§
Trait Implementations§
Source§impl BitAndAssign for M128
impl BitAndAssign for M128
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign for M128
impl BitOrAssign for M128
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign for M128
impl BitXorAssign for M128
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl DeserializeBytes for M128
impl DeserializeBytes for M128
fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl Distribution<M128> for StandardUniform
impl Distribution<M128> for StandardUniform
Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> M128
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> M128
Generate a random value of
T, using rng as the source of randomness.§fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>where
R: Rng,
Self: Sized,
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 moreSource§impl Divisible<M128> for M128
impl Divisible<M128> for M128
Source§fn value_iter(value: Self) -> impl ExactSizeIterator<Item = M128> + Send + Clone
fn value_iter(value: Self) -> impl ExactSizeIterator<Item = M128> + 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 = M128> + Send + Clone + '_
fn ref_iter( value: &Self, ) -> impl ExactSizeIterator<Item = M128> + 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 = M128> + Send + Clone + '_
fn slice_iter( slice: &[Self], ) -> impl ExactSizeIterator<Item = M128> + Send + Clone + '_
Returns an iterator over subdivisions of a slice of underliers, ordered from LSB to MSB.
Source§unsafe fn get_unchecked(&self, _index: usize) -> M128
unsafe fn get_unchecked(&self, _index: usize) -> M128
Get element at index (LSB-first ordering) without bounds checking. Read more
Source§unsafe fn set_unchecked(&mut self, _index: usize, val: M128)
unsafe fn set_unchecked(&mut self, _index: usize, val: M128)
Set element at index (LSB-first ordering) in place, without bounds checking. Read more
Source§impl Divisible<u128> for M128
impl Divisible<u128> for M128
Source§fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u128> + Send + Clone
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 + '_
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 + '_
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§unsafe fn get_unchecked(&self, _index: usize) -> u128
unsafe fn get_unchecked(&self, _index: usize) -> u128
Get element at index (LSB-first ordering) without bounds checking. Read more
Source§unsafe fn set_unchecked(&mut self, _index: usize, val: u128)
unsafe fn set_unchecked(&mut self, _index: usize, val: u128)
Set element at index (LSB-first ordering) in place, without bounds checking. Read more
Source§impl Divisible<u16> for M128
impl Divisible<u16> for M128
Source§fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u16> + Send + Clone
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 + '_
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 + '_
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§unsafe fn get_unchecked(&self, index: usize) -> u16
unsafe fn get_unchecked(&self, index: usize) -> u16
Get element at index (LSB-first ordering) without bounds checking. Read more
Source§unsafe fn set_unchecked(&mut self, index: usize, val: u16)
unsafe fn set_unchecked(&mut self, index: usize, val: u16)
Set element at index (LSB-first ordering) in place, without bounds checking. Read more
Source§impl Divisible<u32> for M128
impl Divisible<u32> for M128
Source§fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u32> + Send + Clone
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 + '_
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 + '_
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§unsafe fn get_unchecked(&self, index: usize) -> u32
unsafe fn get_unchecked(&self, index: usize) -> u32
Get element at index (LSB-first ordering) without bounds checking. Read more
Source§unsafe fn set_unchecked(&mut self, index: usize, val: u32)
unsafe fn set_unchecked(&mut self, index: usize, val: u32)
Set element at index (LSB-first ordering) in place, without bounds checking. Read more
Source§impl Divisible<u64> for M128
impl Divisible<u64> for M128
Source§fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u64> + Send + Clone
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 + '_
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 + '_
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§unsafe fn get_unchecked(&self, index: usize) -> u64
unsafe fn get_unchecked(&self, index: usize) -> u64
Get element at index (LSB-first ordering) without bounds checking. Read more
Source§unsafe fn set_unchecked(&mut self, index: usize, val: u64)
unsafe fn set_unchecked(&mut self, index: usize, val: u64)
Set element at index (LSB-first ordering) in place, without bounds checking. Read more
Source§impl Divisible<u8> for M128
impl Divisible<u8> for M128
Source§fn value_iter(value: Self) -> impl ExactSizeIterator<Item = u8> + Send + Clone
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 + '_
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 + '_
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§unsafe fn get_unchecked(&self, index: usize) -> u8
unsafe fn get_unchecked(&self, index: usize) -> u8
Get element at index (LSB-first ordering) without bounds checking. Read more
Source§unsafe fn set_unchecked(&mut self, index: usize, val: u8)
unsafe fn set_unchecked(&mut self, index: usize, val: u8)
Set element at index (LSB-first ordering) in place, without bounds checking. Read more
Source§impl From<BinaryField128bGhash> for M128
impl From<BinaryField128bGhash> for M128
Source§fn from(val: BinaryField128bGhash) -> Self
fn from(val: BinaryField128bGhash) -> Self
Converts to this type from the input type.
Source§impl From<M128> for BinaryField128bGhash
impl From<M128> for BinaryField128bGhash
Source§impl Ord for M128
impl Ord for M128
Source§impl PartialOrd for M128
impl PartialOrd for M128
Source§impl TransparentWrapper<M128> for BinaryField128bGhash
impl TransparentWrapper<M128> for BinaryField128bGhash
§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
Convert a reference to the inner type into a reference to the wrapper
type.
§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
Convert a mutable reference to the inner type into a mutable reference to
the wrapper type.
§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
Convert a slice to the inner type into a slice to the wrapper type.
§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
Convert a mutable slice to the inner type into a mutable slice to the
wrapper type.
§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
Convert a reference to the wrapper type into a reference to the inner
type.
§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
Convert a mutable reference to the wrapper type into a mutable reference
to the inner type.
§fn peel_slice(s: &[Self]) -> &[Inner]where
Self: Sized,
fn peel_slice(s: &[Self]) -> &[Inner]where
Self: Sized,
Convert a slice to the wrapped type into a slice to the inner type.
§fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where
Self: Sized,
fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where
Self: Sized,
Convert a mutable slice to the wrapped type into a mutable slice to the
inner type.
Source§impl UnderlierType for M128
impl UnderlierType for M128
const ZERO: Self
const ONE: Self
const ONES: Self
Source§fn interleave(self, other: Self, log_block_len: usize) -> (Self, Self)
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) -> Selfwhere
T: UnderlierType,
Self: Divisible<T>,
unsafe fn spread<T>(self, log_block_len: usize, block_idx: usize) -> Selfwhere
T: UnderlierType,
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 moreSource§const BITS: usize = _
const BITS: usize = _
Number of bits used to represent a value.
This may not be equal to the number of bits in a type instance.
Source§fn fill_with_bit(val: u8) -> Self
fn fill_with_bit(val: u8) -> Self
Fill value with the given bit
val must be 0 or 1.Source§fn transpose(self, other: Self, log_block_len: usize) -> (Self, Self)
fn transpose(self, other: Self, log_block_len: usize) -> (Self, Self)
Transpose with the given bit size
fn from_fn<T>(f: impl FnMut(usize) -> T) -> Selfwhere
T: UnderlierType,
Self: Divisible<T>,
Source§fn broadcast_subvalue<T>(value: T) -> Selfwhere
T: UnderlierType,
Self: Divisible<T>,
fn broadcast_subvalue<T>(value: T) -> Selfwhere
T: UnderlierType,
Self: Divisible<T>,
Broadcast subvalue to fill
Self.
Self::BITS/T::BITS is supposed to be a power of 2.impl Copy for M128
impl Eq for M128
impl Pod for M128
impl Send for M128
impl Sync for M128
Auto Trait Implementations§
impl Freeze for M128
impl RefUnwindSafe for M128
impl Unpin for M128
impl UnsafeUnpin for M128
impl UnwindSafe for M128
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
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
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 Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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