mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-02 22:03:07 +00:00
More par_iter (#150)
This commit is contained in:
parent
f150f7ec09
commit
b1633dc48d
@ -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<_>>(),
|
||||
);
|
||||
|
||||
@ -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<_>>()
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user