mirror of https://github.com/zcash/halo2.git
chore: Update `k` to be obtained from struct
This commit is contained in:
parent
a4cc9f60e0
commit
580d982a64
|
@ -52,7 +52,7 @@ impl<C: CurveAffine> Argument<C> {
|
||||||
#[cfg(feature = "multicore")]
|
#[cfg(feature = "multicore")]
|
||||||
let random_poly = {
|
let random_poly = {
|
||||||
let n_threads = current_num_threads();
|
let n_threads = current_num_threads();
|
||||||
let n = 1usize << domain.k() as usize;
|
let n = 1usize << domain.k as usize;
|
||||||
let n_chunks = n_threads + if n % n_threads != 0 { 1 } else { 0 };
|
let n_chunks = n_threads + if n % n_threads != 0 { 1 } else { 0 };
|
||||||
let mut rand_vec = vec![C::Scalar::ZERO; n];
|
let mut rand_vec = vec![C::Scalar::ZERO; n];
|
||||||
|
|
||||||
|
|
|
@ -130,14 +130,6 @@ impl<F, B> Polynomial<F, B> {
|
||||||
pub fn num_coeffs(&self) -> usize {
|
pub fn num_coeffs(&self) -> usize {
|
||||||
self.values.len()
|
self.values.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Allows to create a Polynomial from a Vec.
|
|
||||||
pub fn from_evals(vector: Vec<F>) -> Self {
|
|
||||||
Polynomial {
|
|
||||||
values: vector,
|
|
||||||
_marker: PhantomData,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn batch_invert_assigned<F: Field>(
|
pub(crate) fn batch_invert_assigned<F: Field>(
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::marker::PhantomData;
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct EvaluationDomain<F: Field> {
|
pub struct EvaluationDomain<F: Field> {
|
||||||
n: u64,
|
n: u64,
|
||||||
k: u32,
|
pub(crate) k: u32,
|
||||||
extended_k: u32,
|
extended_k: u32,
|
||||||
omega: F,
|
omega: F,
|
||||||
omega_inv: F,
|
omega_inv: F,
|
||||||
|
@ -142,11 +142,6 @@ impl<F: WithSmallOrderMulGroup<3>> EvaluationDomain<F> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the `k` or Degree associated to the domain.
|
|
||||||
pub(crate) fn k(&self) -> usize {
|
|
||||||
self.k as usize
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Obtains a polynomial in Lagrange form when given a vector of Lagrange
|
/// Obtains a polynomial in Lagrange form when given a vector of Lagrange
|
||||||
/// coefficients of size `n`; panics if the provided vector is the wrong
|
/// coefficients of size `n`; panics if the provided vector is the wrong
|
||||||
/// length.
|
/// length.
|
||||||
|
|
Loading…
Reference in New Issue