#[repr(transparent)]pub struct PackedQM31(pub [<Complex<Mersenne31> as ExtensionField<Mersenne31>>::ExtensionPacking; 2]);Expand description
Packed representation of QM31: two packed Complex<Mersenne31>
coefficients, each holding PackedM31::WIDTH lanes.
Tuple Fields§
§0: [<Complex<Mersenne31> as ExtensionField<Mersenne31>>::ExtensionPacking; 2]Trait Implementations§
Source§impl Add for PackedQM31
impl Add for PackedQM31
Source§impl Add<<Mersenne31 as Field>::Packing> for PackedQM31
impl Add<<Mersenne31 as Field>::Packing> for PackedQM31
Source§impl Add<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl Add<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§impl AddAssign for PackedQM31
impl AddAssign for PackedQM31
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl AddAssign<<Mersenne31 as Field>::Packing> for PackedQM31
impl AddAssign<<Mersenne31 as Field>::Packing> for PackedQM31
Source§fn add_assign(&mut self, rhs: <Mersenne31 as Field>::Packing)
fn add_assign(&mut self, rhs: <Mersenne31 as Field>::Packing)
Performs the
+= operation. Read moreSource§impl AddAssign<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl AddAssign<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§fn add_assign(&mut self, rhs: QM31)
fn add_assign(&mut self, rhs: QM31)
Performs the
+= operation. Read moreSource§impl Algebra<<Mersenne31 as Field>::Packing> for PackedQM31
impl Algebra<<Mersenne31 as Field>::Packing> for PackedQM31
Source§fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Selfwhere
F: Dup,
fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Selfwhere
F: Dup,
Dot product between algebra elements and base field scalars. Read more
Source§const BATCHED_LC_CHUNK: usize = 8
const BATCHED_LC_CHUNK: usize = 8
Optimal chunk size for
batched_linear_combination. Read moreSource§impl Algebra<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl Algebra<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Selfwhere
F: Dup,
fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Selfwhere
F: Dup,
Dot product between algebra elements and base field scalars. Read more
Source§const BATCHED_LC_CHUNK: usize = 8
const BATCHED_LC_CHUNK: usize = 8
Optimal chunk size for
batched_linear_combination. Read moreSource§impl BasedVectorSpace<<Mersenne31 as Field>::Packing> for PackedQM31
impl BasedVectorSpace<<Mersenne31 as Field>::Packing> for PackedQM31
Source§const DIMENSION: usize = 4
const DIMENSION: usize = 4
The dimension of the vector space, i.e. the number of elements in
its basis.
Source§fn as_basis_coefficients_slice(&self) -> &[<Mersenne31 as Field>::Packing]
fn as_basis_coefficients_slice(&self) -> &[<Mersenne31 as Field>::Packing]
Fixes a basis for the algebra
A and uses this to
map an element of A to a slice of DIMENSION F elements. Read moreSource§fn from_basis_coefficients_fn<Fn: FnMut(usize) -> <Mersenne31 as Field>::Packing>(
f: Fn,
) -> Self
fn from_basis_coefficients_fn<Fn: FnMut(usize) -> <Mersenne31 as Field>::Packing>( f: Fn, ) -> Self
Fixes a basis for the algebra
A and uses this to
map DIMENSION F elements to an element of A. Similar
to core:array::from_fn, the DIMENSION F elements are
given by Fn(0), ..., Fn(DIMENSION - 1) called in that order. Read moreSource§fn from_basis_coefficients_iter<I: ExactSizeIterator<Item = <Mersenne31 as Field>::Packing>>(
iter: I,
) -> Option<Self>
fn from_basis_coefficients_iter<I: ExactSizeIterator<Item = <Mersenne31 as Field>::Packing>>( iter: I, ) -> Option<Self>
Fixes a basis for the algebra
A and uses this to
map DIMENSION F elements to an element of A. Read moreSource§fn from_basis_coefficients_slice(slice: &[F]) -> Option<Self>
fn from_basis_coefficients_slice(slice: &[F]) -> Option<Self>
Fixes a basis for the algebra
A and uses this to
map DIMENSION F elements to an element of A. Read moreSource§fn ith_basis_element(i: usize) -> Option<Self>
fn ith_basis_element(i: usize) -> Option<Self>
Given a basis for the Algebra
A, return the i’th basis element. Read moreSource§fn flatten_to_base(vec: Vec<Self>) -> Vec<F>
fn flatten_to_base(vec: Vec<Self>) -> Vec<F>
Source§impl Clone for PackedQM31
impl Clone for PackedQM31
Source§fn clone(&self) -> PackedQM31
fn clone(&self) -> PackedQM31
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PackedQM31
Source§impl Debug for PackedQM31
impl Debug for PackedQM31
Source§impl Default for PackedQM31
impl Default for PackedQM31
Source§fn default() -> PackedQM31
fn default() -> PackedQM31
Returns the “default value” for a type. Read more
Source§impl Distribution<PackedQM31> for StandardUniform
impl Distribution<PackedQM31> for StandardUniform
Source§impl Div for PackedQM31
impl Div for PackedQM31
Source§impl DivAssign for PackedQM31
impl DivAssign for PackedQM31
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreimpl Eq for PackedQM31
Source§impl From<<Mersenne31 as Field>::Packing> for PackedQM31
impl From<<Mersenne31 as Field>::Packing> for PackedQM31
Source§impl From<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl From<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§impl Mul for PackedQM31
impl Mul for PackedQM31
Source§impl Mul<<Mersenne31 as Field>::Packing> for PackedQM31
impl Mul<<Mersenne31 as Field>::Packing> for PackedQM31
Source§impl Mul<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl Mul<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§impl MulAssign for PackedQM31
impl MulAssign for PackedQM31
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl MulAssign<<Mersenne31 as Field>::Packing> for PackedQM31
impl MulAssign<<Mersenne31 as Field>::Packing> for PackedQM31
Source§fn mul_assign(&mut self, rhs: <Mersenne31 as Field>::Packing)
fn mul_assign(&mut self, rhs: <Mersenne31 as Field>::Packing)
Performs the
*= operation. Read moreSource§impl MulAssign<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl MulAssign<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§fn mul_assign(&mut self, rhs: QM31)
fn mul_assign(&mut self, rhs: QM31)
Performs the
*= operation. Read moreSource§impl Neg for PackedQM31
impl Neg for PackedQM31
Source§impl PackedFieldExtension<Mersenne31, ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl PackedFieldExtension<Mersenne31, ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§fn packed_ext_powers(base: QM31) -> Powers<Self>
fn packed_ext_powers(base: QM31) -> Powers<Self>
Similar to
packed_powers, construct an iterator which returns
powers of base packed into PackedFieldExtension elements.Source§fn from_ext_fn(f: impl Fn(usize) -> ExtField) -> Self
fn from_ext_fn(f: impl Fn(usize) -> ExtField) -> Self
Construct a packed extension by applying
f to each lane. Read moreSource§fn from_ext_slice(slice: &[ExtField]) -> Self
fn from_ext_slice(slice: &[ExtField]) -> Self
Pack a length-
WIDTH slice of extension field elements into one packed extension. Read moreSource§fn pack_ext_columns<const N: usize>(rows: &[[ExtField; N]]) -> [Self; N]
fn pack_ext_columns<const N: usize>(rows: &[[ExtField; N]]) -> [Self; N]
Source§fn pack_ext_columns_fn<const N: usize>(
row_fn: impl Fn(usize) -> [ExtField; N],
) -> [Self; N]
fn pack_ext_columns_fn<const N: usize>( row_fn: impl Fn(usize) -> [ExtField; N], ) -> [Self; N]
Pack
N columns using a closure that produces each row. Read moreSource§fn extract(&self, lane: usize) -> ExtField
fn extract(&self, lane: usize) -> ExtField
Extract the extension field element at the given SIMD lane.
Source§fn to_ext_slice(&self, out: &mut [ExtField])
fn to_ext_slice(&self, out: &mut [ExtField])
Write all
W lanes into the given slice. Read moreSource§fn unpack_ext_into<const N: usize>(
packed: &[Self; N],
rows: &mut [[ExtField; N]],
)
fn unpack_ext_into<const N: usize>( packed: &[Self; N], rows: &mut [[ExtField; N]], )
Source§fn unpack_ext_iter<const N: usize>(
packed: [Self; N],
) -> impl Iterator<Item = [ExtField; N]>
fn unpack_ext_iter<const N: usize>( packed: [Self; N], ) -> impl Iterator<Item = [ExtField; N]>
Iterator equivalent of
PackedFieldExtension::unpack_ext_into. Read moreSource§fn to_ext_iter(
iter: impl IntoIterator<Item = Self>,
) -> impl Iterator<Item = ExtField>
fn to_ext_iter( iter: impl IntoIterator<Item = Self>, ) -> impl Iterator<Item = ExtField>
Convert an iterator of packed extension field elements to an iterator of
extension field elements (flat — one
ExtField per lane per packed value).Source§impl PartialEq for PackedQM31
impl PartialEq for PackedQM31
Source§fn eq(&self, other: &PackedQM31) -> bool
fn eq(&self, other: &PackedQM31) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PrimeCharacteristicRing for PackedQM31
impl PrimeCharacteristicRing for PackedQM31
Source§type PrimeSubfield = Mersenne31
type PrimeSubfield = Mersenne31
The field
ℤ/p where the characteristic of this ring is p.Source§fn from_prime_subfield(val: Self::PrimeSubfield) -> Self
fn from_prime_subfield(val: Self::PrimeSubfield) -> Self
Source§fn mul_2exp_u64(&self, exp: u64) -> Self
fn mul_2exp_u64(&self, exp: u64) -> Self
The elementary function
mul_2exp_u64(a, exp) = a * 2^{exp}. Read moreSource§fn div_2exp_u64(&self, exp: u64) -> Self
fn div_2exp_u64(&self, exp: u64) -> Self
Divide by a given power of two.
div_2exp_u64(a, exp) = a/2^exp Read moreSource§fn zero_vec(len: usize) -> Vec<Self>
fn zero_vec(len: usize) -> Vec<Self>
Allocates a vector of zero elements of length
len. Many operating systems zero pages
before assigning them to a userspace process. In that case, our process should not need to
write zeros, which would be redundant. However, the compiler may not always recognize this. Read moreSource§fn from_usize(int: usize) -> Self
fn from_usize(int: usize) -> Self
Source§fn from_isize(int: isize) -> Self
fn from_isize(int: isize) -> Self
Source§fn xor(&self, y: &Self) -> Self
fn xor(&self, y: &Self) -> Self
Computes the arithmetic generalization of boolean
xor. Read moreSource§fn xor3(&self, y: &Self, z: &Self) -> Self
fn xor3(&self, y: &Self, z: &Self) -> Self
Computes the arithmetic generalization of a triple
xor. Read moreSource§fn bool_check(&self) -> Self
fn bool_check(&self) -> Self
The vanishing polynomial for boolean values:
x * (x - 1). Read moreSource§fn exp_const_u64<const POWER: u64>(&self) -> Self
fn exp_const_u64<const POWER: u64>(&self) -> Self
Exponentiation by a small constant power. Read more
Source§fn exp_power_of_2(&self, power_log: usize) -> Self
fn exp_power_of_2(&self, power_log: usize) -> Self
The elementary function
exp_power_of_2(a, power_log) = a^{2^power_log}. Read moreSource§fn powers(&self) -> Powers<Self>
fn powers(&self) -> Powers<Self>
Construct an iterator which returns powers of
self: self^0, self^1, self^2, ....Source§fn shifted_powers(&self, start: Self) -> Powers<Self>
fn shifted_powers(&self, start: Self) -> Powers<Self>
Construct an iterator which returns powers of
self shifted by start: start, start*self^1, start*self^2, ....Source§impl Product for PackedQM31
impl Product for PackedQM31
impl StructuralPartialEq for PackedQM31
Source§impl Sub for PackedQM31
impl Sub for PackedQM31
Source§impl Sub<<Mersenne31 as Field>::Packing> for PackedQM31
impl Sub<<Mersenne31 as Field>::Packing> for PackedQM31
Source§impl Sub<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl Sub<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§impl SubAssign for PackedQM31
impl SubAssign for PackedQM31
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl SubAssign<<Mersenne31 as Field>::Packing> for PackedQM31
impl SubAssign<<Mersenne31 as Field>::Packing> for PackedQM31
Source§fn sub_assign(&mut self, rhs: <Mersenne31 as Field>::Packing)
fn sub_assign(&mut self, rhs: <Mersenne31 as Field>::Packing)
Performs the
-= operation. Read moreSource§impl SubAssign<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
impl SubAssign<ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>> for PackedQM31
Source§fn sub_assign(&mut self, rhs: QM31)
fn sub_assign(&mut self, rhs: QM31)
Performs the
-= operation. Read moreAuto Trait Implementations§
impl Freeze for PackedQM31
impl RefUnwindSafe for PackedQM31
impl Send for PackedQM31
impl Sync for PackedQM31
impl Unpin for PackedQM31
impl UnsafeUnpin for PackedQM31
impl UnwindSafe for PackedQM31
Blanket Implementations§
Source§impl<R> Algebra<R> for Rwhere
R: PrimeCharacteristicRing,
impl<R> Algebra<R> for Rwhere
R: PrimeCharacteristicRing,
Source§fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Selfwhere
F: Dup,
fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Selfwhere
F: Dup,
Dot product between algebra elements and base field scalars. Read more
Source§const BATCHED_LC_CHUNK: usize = 8
const BATCHED_LC_CHUNK: usize = 8
Optimal chunk size for
batched_linear_combination. Read moreSource§impl<F> BasedVectorSpace<F> for Fwhere
F: PrimeCharacteristicRing,
impl<F> BasedVectorSpace<F> for Fwhere
F: PrimeCharacteristicRing,
Source§const DIMENSION: usize = 1
const DIMENSION: usize = 1
The dimension of the vector space, i.e. the number of elements in
its basis.
Source§fn as_basis_coefficients_slice(&self) -> &[F]
fn as_basis_coefficients_slice(&self) -> &[F]
Fixes a basis for the algebra
A and uses this to
map an element of A to a slice of DIMENSION F elements. Read moreSource§fn from_basis_coefficients_fn<Fn>(f: Fn) -> F
fn from_basis_coefficients_fn<Fn>(f: Fn) -> F
Fixes a basis for the algebra
A and uses this to
map DIMENSION F elements to an element of A. Similar
to core:array::from_fn, the DIMENSION F elements are
given by Fn(0), ..., Fn(DIMENSION - 1) called in that order. Read moreSource§fn from_basis_coefficients_iter<I>(iter: I) -> Option<F>where
I: ExactSizeIterator<Item = F>,
fn from_basis_coefficients_iter<I>(iter: I) -> Option<F>where
I: ExactSizeIterator<Item = F>,
Fixes a basis for the algebra
A and uses this to
map DIMENSION F elements to an element of A. Read moreSource§fn flatten_to_base(vec: Vec<F>) -> Vec<F>
fn flatten_to_base(vec: Vec<F>) -> Vec<F>
Source§fn reconstitute_from_base(vec: Vec<F>) -> Vec<F>
fn reconstitute_from_base(vec: Vec<F>) -> Vec<F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConvolutionElt for T
impl<T> ConvolutionRhs for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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