Skip to content

Commit

Permalink
remove shift argument from compute_lde_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
tess-eract committed Jun 14, 2024
1 parent 1e4c51c commit f7ffdf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
10 changes: 3 additions & 7 deletions commit/src/pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,10 @@ where
'a: 'b;

// Compute the (shifted) low-degree extensions only without computing the commitment.
fn compute_ldes_batches(
&self,
polynomials: Vec<In>,
coset_shifts: &[Val],
) -> Vec<Self::LdeOwned>;
fn compute_ldes_batches(&self, polynomials: Vec<In>) -> Vec<Self::LdeOwned>;

fn compute_lde_batch(&self, polynomials: In, coset_shift: Val) -> Vec<Self::LdeOwned> {
self.compute_ldes_batches(vec![polynomials], &[coset_shift])
fn compute_lde_batch(&self, polynomials: In) -> Vec<Self::LdeOwned> {
self.compute_ldes_batches(vec![polynomials])
}

// Commit to polys that are already defined over a coset.
Expand Down
11 changes: 3 additions & 8 deletions fri/src/two_adic_pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,12 @@ where
.collect()
}

fn compute_ldes_batches(
&self,
polynomials: Vec<In>,
coset_shifts: &[C::Val],
) -> Vec<Self::LdeOwned> {
fn compute_ldes_batches(&self, polynomials: Vec<In>) -> Vec<Self::LdeOwned> {
info_span!("compute all coset LDEs").in_scope(|| {
polynomials
.par_iter()
.zip_eq(coset_shifts)
.map(|(poly, coset_shift)| {
let shift = C::Val::generator() / *coset_shift;
.map(|poly| {
let shift = C::Val::generator();
let input = ((*poly).clone()).to_row_major_matrix();
self.dft
.coset_lde_batch(input, self.fri.log_blowup, shift)
Expand Down

0 comments on commit f7ffdf5

Please sign in to comment.