More par_iter (#150)

This commit is contained in:
Daniel Lubarov 2021-08-03 07:39:36 -07:00 committed by GitHub
parent f150f7ec09
commit b1633dc48d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -77,7 +77,7 @@ fn fri_committed_trees<F: Field + Extendable<D>, const D: usize>(
let tree = MerkleTree::new(
values
.values
.chunks(arity)
.par_chunks(arity)
.map(|chunk: &[F::Extension]| flatten(chunk))
.collect(),
false,
@ -91,7 +91,7 @@ fn fri_committed_trees<F: Field + Extendable<D>, const D: usize>(
coeffs = PolynomialCoeffs::new(
coeffs
.coeffs
.chunks_exact(arity)
.par_chunks_exact(arity)
.map(|chunk| reduce_with_powers(chunk, beta))
.collect::<Vec<_>>(),
);

View File

@ -1,3 +1,4 @@
use rayon::prelude::*;
use serde::{Deserialize, Serialize};
use crate::field::extension_field::target::ExtensionTarget;
@ -66,7 +67,7 @@ impl<F: Extendable<D>, const D: usize> OpeningSet<F, D> {
) -> Self {
let eval_commitment = |z: F::Extension, c: &PolynomialBatchCommitment<F>| {
c.polynomials
.iter()
.par_iter()
.map(|p| p.to_extension().eval(z))
.collect::<Vec<_>>()
};