pub trait IsFFTField: IsField {
const TWO_ADICITY: u64;
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType;
// Provided methods
fn field_name() -> &'static str { ... }
fn get_primitive_root_of_unity(
order: u64,
) -> Result<FieldElement<Self>, FieldError> { ... }
}
Expand description
Trait to define necessary parameters for FFT-friendly Fields.
Two-Adic fields are ones whose order is of the form $2^n k + 1$.
Here $n$ is usually called the two-adicity of the field. The
reason we care about it is that in an $n$-adic field there are $2^j$-roots
of unity for every j
between 1 and n, which is needed to do Fast Fourier.
A two-adic primitive root of unity is a number w that satisfies w^(2^n) = 1
and w^(j) != 1 for every j below 2^n. With this primitive root we can generate
any other root of unity we need to perform FFT.
Required Associated Constants§
const TWO_ADICITY: u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Provided Methods§
Sourcefn field_name() -> &'static str
fn field_name() -> &'static str
Used for searching this field’s implementation in other languages, e.g in MSL for executing parallel operations with the Metal API.
Sourcefn get_primitive_root_of_unity(
order: u64,
) -> Result<FieldElement<Self>, FieldError>
fn get_primitive_root_of_unity( order: u64, ) -> Result<FieldElement<Self>, FieldError>
Returns a primitive root of unity of order $2^{order}$. This is an element w such that w^{2^order} = 1 modulo p and w^k <> 1 modulo p for k not congruent to 2^order
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl IsFFTField for Degree4BabyBearExtensionField
impl IsFFTField for Degree4BabyBearExtensionField
const TWO_ADICITY: u64 = 29u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Source§impl IsFFTField for Degree4BabyBearU32ExtensionField
impl IsFFTField for Degree4BabyBearU32ExtensionField
const TWO_ADICITY: u64 = 29u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Source§impl IsFFTField for Degree2ExtensionField
impl IsFFTField for Degree2ExtensionField
const TWO_ADICITY: u64 = 31u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Source§impl IsFFTField for FrField
impl IsFFTField for FrField
const TWO_ADICITY: u64 = 32u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Source§impl IsFFTField for lambdaworks_math::field::fields::fft_friendly::babybear::Babybear31PrimeField
Available on non-crate feature cuda
only.
impl IsFFTField for lambdaworks_math::field::fields::fft_friendly::babybear::Babybear31PrimeField
cuda
only.const TWO_ADICITY: u64 = 24u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Source§impl IsFFTField for lambdaworks_math::field::fields::fft_friendly::babybear_u32::Babybear31PrimeField
Available on non-crate feature cuda
only.
impl IsFFTField for lambdaworks_math::field::fields::fft_friendly::babybear_u32::Babybear31PrimeField
cuda
only.