mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Avoid a clone (#114)
This commit is contained in:
parent
7d8bac7169
commit
80b696a3a2
@ -16,9 +16,9 @@ use crate::util::reverse_index_bits_in_place;
|
||||
pub fn fri_proof<F: Field + Extendable<D>, const D: usize>(
|
||||
initial_merkle_trees: &[&MerkleTree<F>],
|
||||
// Coefficients of the polynomial on which the LDT is performed. Only the first `1/rate` coefficients are non-zero.
|
||||
lde_polynomial_coeffs: &PolynomialCoeffs<F::Extension>,
|
||||
lde_polynomial_coeffs: PolynomialCoeffs<F::Extension>,
|
||||
// Evaluation of the polynomial on the large domain.
|
||||
lde_polynomial_values: &PolynomialValues<F::Extension>,
|
||||
lde_polynomial_values: PolynomialValues<F::Extension>,
|
||||
challenger: &mut Challenger<F>,
|
||||
config: &FriConfig,
|
||||
) -> FriProof<F, D> {
|
||||
@ -53,14 +53,11 @@ pub fn fri_proof<F: Field + Extendable<D>, const D: usize>(
|
||||
}
|
||||
|
||||
fn fri_committed_trees<F: Field + Extendable<D>, const D: usize>(
|
||||
polynomial_coeffs: &PolynomialCoeffs<F::Extension>,
|
||||
polynomial_values: &PolynomialValues<F::Extension>,
|
||||
mut coeffs: PolynomialCoeffs<F::Extension>,
|
||||
mut values: PolynomialValues<F::Extension>,
|
||||
challenger: &mut Challenger<F>,
|
||||
config: &FriConfig,
|
||||
) -> (Vec<MerkleTree<F>>, PolynomialCoeffs<F::Extension>) {
|
||||
let mut values = polynomial_values.clone();
|
||||
let mut coeffs = polynomial_coeffs.clone();
|
||||
|
||||
let mut trees = Vec::new();
|
||||
|
||||
let mut shift = F::MULTIPLICATIVE_GROUP_GENERATOR;
|
||||
|
||||
@ -186,8 +186,8 @@ impl<F: Field> ListPolynomialCommitment<F> {
|
||||
.par_iter()
|
||||
.map(|c| &c.merkle_tree)
|
||||
.collect::<Vec<_>>(),
|
||||
&lde_final_poly,
|
||||
&lde_final_values,
|
||||
lde_final_poly,
|
||||
lde_final_values,
|
||||
challenger,
|
||||
&config.fri_config,
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user