Skip to main content

PackedCubicTrinomialExtensionField

Type Alias PackedCubicTrinomialExtensionField 

Source
pub type PackedCubicTrinomialExtensionField<F, PF> = PackedExtField<F, PF, 3, CubicTrinomial>;
Expand description

Packed cubic extension field, one element per SIMD lane.

Type alias for the unified PackedExtField with Shape = CubicTrinomial.

Aliased Type§

pub struct PackedCubicTrinomialExtensionField<F, PF> { /* private fields */ }

Trait Implementations§

Source§

impl<F, PF> Add for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl<F, PF> Add<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CubicTrinomialExtensionField<F>) -> Self

Performs the + operation. Read more
Source§

impl<F, PF> Add<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: PF) -> Self

Performs the + operation. Read more
Source§

impl<F, PF> AddAssign for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<F, PF> AddAssign<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn add_assign(&mut self, rhs: CubicTrinomialExtensionField<F>)

Performs the += operation. Read more
Source§

impl<F, PF> AddAssign<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn add_assign(&mut self, rhs: PF)

Performs the += operation. Read more
Source§

impl<F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>> Algebra<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>

Source§

fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Self
where F: Dup,

Dot product between algebra elements and base field scalars. Read more
Source§

const BATCHED_LC_CHUNK: usize = 8

Optimal chunk size for batched_linear_combination. Read more
Source§

fn batched_linear_combination(values: &[Self], coeffs: &[F]) -> Self
where F: Dup,

Runtime-length linear combination: Σ values[i] * coeffs[i]. Read more
Source§

impl<F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>> Algebra<PF> for PackedCubicTrinomialExtensionField<F, PF>

Source§

fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Self
where F: Dup,

Dot product between algebra elements and base field scalars. Read more
Source§

const BATCHED_LC_CHUNK: usize = 8

Optimal chunk size for batched_linear_combination. Read more
Source§

fn batched_linear_combination(values: &[Self], coeffs: &[F]) -> Self
where F: Dup,

Runtime-length linear combination: Σ values[i] * coeffs[i]. Read more
Source§

impl<F, PF> BasedVectorSpace<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

const DIMENSION: usize = 3

The dimension of the vector space, i.e. the number of elements in its basis.
Source§

fn as_basis_coefficients_slice(&self) -> &[PF]

Fixes a basis for the algebra A and uses this to map an element of A to a slice of DIMENSION F elements. Read more
Source§

fn from_basis_coefficients_fn<Fn: FnMut(usize) -> PF>(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 more
Source§

fn from_basis_coefficients_iter<I: ExactSizeIterator<Item = PF>>( 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 more
Source§

fn flatten_to_base(vec: Vec<Self>) -> Vec<PF>

Convert from a vector of Self to a vector of F by flattening the basis coefficients. Read more
Source§

fn reconstitute_from_base(vec: Vec<PF>) -> Vec<Self>

Convert from a vector of F to a vector of Self by combining the basis coefficients. Read more
Source§

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

fn ith_basis_element(i: usize) -> Option<Self>

Given a basis for the Algebra A, return the i’th basis element. Read more
Source§

impl<F: Field, PF: PackedField<Scalar = F>> Default for PackedCubicTrinomialExtensionField<F, PF>

Source§

fn default() -> Self

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

impl<F: CubicTrinomialExtendable> Div for PackedCubicTrinomialExtensionField<F, F::Packing>

Source§

type Output = PackedExtField<F, <F as Field>::Packing, 3, CubicTrinomial>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self

Performs the / operation. Read more
Source§

impl<F, PF> Div<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CubicTrinomialExtensionField<F>) -> Self

Performs the / operation. Read more
Source§

impl<F: CubicTrinomialExtendable> DivAssign for PackedCubicTrinomialExtensionField<F, F::Packing>

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<F, PF> DivAssign<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn div_assign(&mut self, rhs: CubicTrinomialExtensionField<F>)

Performs the /= operation. Read more
Source§

impl<F: Field, PF: PackedField<Scalar = F>> From<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>

Source§

fn from(x: CubicTrinomialExtensionField<F>) -> Self

Converts to this type from the input type.
Source§

impl<F: Field, PF: PackedField<Scalar = F>> From<PF> for PackedCubicTrinomialExtensionField<F, PF>

Source§

fn from(x: PF) -> Self

Converts to this type from the input type.
Source§

impl<F, PF> Mul for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl<F, PF> Mul<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CubicTrinomialExtensionField<F>) -> Self

Performs the * operation. Read more
Source§

impl<F, PF> Mul<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PF) -> Self

Performs the * operation. Read more
Source§

impl<F, PF> MulAssign for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<F, PF> MulAssign<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn mul_assign(&mut self, rhs: CubicTrinomialExtensionField<F>)

Performs the *= operation. Read more
Source§

impl<F, PF> MulAssign<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn mul_assign(&mut self, rhs: PF)

Performs the *= operation. Read more
Source§

impl<F, PF> Neg for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<F: CubicTrinomialExtendable> PackedFieldExtension<F, ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, F::Packing>

Source§

fn from_ext_fn(f: impl Fn(usize) -> CubicTrinomialExtensionField<F>) -> Self

Construct a packed extension by applying f to each lane. Read more
Source§

fn packed_ext_powers(base: CubicTrinomialExtensionField<F>) -> Powers<Self>

Similar to packed_powers, construct an iterator which returns powers of base packed into PackedFieldExtension elements.
Source§

fn from_ext_slice(slice: &[ExtField]) -> Self

Pack a length-WIDTH slice of extension field elements into one packed extension. Read more
Source§

fn pack_ext_columns<const N: usize>(rows: &[[ExtField; N]]) -> [Self; N]

Pack N columns from W rows of extension field elements into N packed extensions. Read more
Source§

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

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])

Write all W lanes into the given slice. Read more
Source§

fn unpack_ext_into<const N: usize>( packed: &[Self; N], rows: &mut [[ExtField; N]], )

Unpack N packed extensions into W rows of N extension elements. Read more
Source§

fn unpack_ext_iter<const N: usize>( packed: [Self; N], ) -> impl Iterator<Item = [ExtField; N]>

Source§

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§

fn packed_ext_powers_capped( base: ExtField, unpacked_len: usize, ) -> impl Iterator<Item = Self>

Similar to packed_ext_powers but only returns unpacked_len powers of base. Read more
Source§

impl<F, PF> PrimeCharacteristicRing for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

const ZERO: Self

The additive identity of the ring. Read more
Source§

const ONE: Self

The multiplicative identity of the ring. Read more
Source§

const TWO: Self

The element in the ring given by ONE + ONE. Read more
Source§

const NEG_ONE: Self

The element in the ring given by -ONE. Read more
Source§

type PrimeSubfield = <PF as PrimeCharacteristicRing>::PrimeSubfield

The field ℤ/p where the characteristic of this ring is p.
Source§

fn from_prime_subfield(val: Self::PrimeSubfield) -> Self

Embed an element of the prime field ℤ/p into the ring R. Read more
Source§

fn from_bool(b: bool) -> Self

Return Self::ONE if b is true and Self::ZERO if b is false.
Source§

fn halve(&self) -> Self

The elementary function halve(a) = a/2. Read more
Source§

fn square(&self) -> Self

The elementary function square(a) = a^2. Read more
Source§

fn mul_2exp_u64(&self, exp: u64) -> Self

The elementary function mul_2exp_u64(a, exp) = a * 2^{exp}. Read more
Source§

fn div_2exp_u64(&self, exp: u64) -> Self

Divide by a given power of two. div_2exp_u64(a, exp) = a/2^exp Read more
Source§

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

fn from_u8(int: u8) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_u16(int: u16) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_u32(int: u32) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_u64(int: u64) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_u128(int: u128) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_usize(int: usize) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_i8(int: i8) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_i16(int: i16) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_i32(int: i32) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_i64(int: i64) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_i128(int: i128) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn from_isize(int: isize) -> Self

Given an integer r, return the sum of r copies of ONE: Read more
Source§

fn double(&self) -> Self

The elementary function double(a) = 2*a. Read more
Source§

fn cube(&self) -> Self

The elementary function cube(a) = a^3. Read more
Source§

fn xor(&self, y: &Self) -> Self

Computes the arithmetic generalization of boolean xor. Read more
Source§

fn xor3(&self, y: &Self, z: &Self) -> Self

Computes the arithmetic generalization of a triple xor. Read more
Source§

fn andn(&self, y: &Self) -> Self

Computes the arithmetic generalization of andnot. Read more
Source§

fn bool_check(&self) -> Self

The vanishing polynomial for boolean values: x * (x - 1). Read more
Source§

fn exp_u64(&self, power: u64) -> Self

Exponentiation by a u64 power. Read more
Source§

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

The elementary function exp_power_of_2(a, power_log) = a^{2^power_log}. Read more
Source§

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>

Construct an iterator which returns powers of self shifted by start: start, start*self^1, start*self^2, ....
Source§

fn dot_product<const N: usize>(u: &[Self; N], v: &[Self; N]) -> Self

Compute the dot product of two vectors.
Source§

fn sum_array<const N: usize>(input: &[Self]) -> Self

Compute the sum of a slice of elements whose length is a compile time constant. Read more
Source§

impl<F, PF> Product for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<F, PF> Product<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn product<I: Iterator<Item = CubicTrinomialExtensionField<F>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<F, PF> Sub for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

impl<F, PF> Sub<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CubicTrinomialExtensionField<F>) -> Self

Performs the - operation. Read more
Source§

impl<F, PF> Sub<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

type Output = PackedExtField<F, PF, 3, CubicTrinomial>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PF) -> Self

Performs the - operation. Read more
Source§

impl<F, PF> SubAssign for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<F, PF> SubAssign<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn sub_assign(&mut self, rhs: CubicTrinomialExtensionField<F>)

Performs the -= operation. Read more
Source§

impl<F, PF> SubAssign<PF> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn sub_assign(&mut self, rhs: PF)

Performs the -= operation. Read more
Source§

impl<F, PF> Sum for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<F, PF> Sum<ExtField<F, 3, CubicTrinomial>> for PackedCubicTrinomialExtensionField<F, PF>
where F: CubicTrinomialExtendable, PF: PackedField<Scalar = F>,

Source§

fn sum<I: Iterator<Item = CubicTrinomialExtensionField<F>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.