Skip to content

Migrate to Ceno MPCS/Polynomial/Sumcheck #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: whir_integration
Choose a base branch
from
Open
29 changes: 1 addition & 28 deletions spartan_parallel/src/custom_dense_mlpoly.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(clippy::too_many_arguments)]
use std::cmp::min;

use crate::dense_mlpoly::DensePolynomial;
use multilinear_extensions::mle::DenseMultilinearExtension;
use crate::math::Math;
use ff_ext::ExtensionField;
use rayon::prelude::*;
Expand Down Expand Up @@ -365,31 +365,4 @@ impl<E: ExtensionField> DensePolynomialPqx<E> {
cl.bound_poly_vars_rp(rp_rev);
return cl.index(0, 0, 0, 0);
}

// Convert to a (p, q_rev, x_rev) regular dense poly of form (p, q, x)
pub fn to_dense_poly(&self) -> DensePolynomial<E> {
let ZERO = E::ZERO;

let p_space = self.num_vars_p.pow2();
let q_space = self.num_vars_q.pow2();
let w_space = self.num_vars_w.pow2();
let x_space = self.num_vars_x.pow2();

let mut Z_poly = vec![ZERO; p_space * q_space * w_space * x_space];
for p in 0..self.num_instances {
for q in 0..self.num_proofs[p] {
for w in 0..self.num_witness_secs {
for x in 0..self.num_inputs[p][w] {
Z_poly[
p * q_space * w_space * x_space
+ q * w_space * x_space
+ w * x_space
+ x
] = self.Z[p][q][w][x];
}
}
}
}
DensePolynomial::new(Z_poly)
}
}
Loading
Loading