mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-05-21 17:29:52 +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(
|
let tree = MerkleTree::new(
|
||||||
values
|
values
|
||||||
.values
|
.values
|
||||||
.chunks(arity)
|
.par_chunks(arity)
|
||||||
.map(|chunk: &[F::Extension]| flatten(chunk))
|
.map(|chunk: &[F::Extension]| flatten(chunk))
|
||||||
.collect(),
|
.collect(),
|
||||||
false,
|
false,
|
||||||
@ -91,7 +91,7 @@ fn fri_committed_trees<F: Field + Extendable<D>, const D: usize>(
|
|||||||
coeffs = PolynomialCoeffs::new(
|
coeffs = PolynomialCoeffs::new(
|
||||||
coeffs
|
coeffs
|
||||||
.coeffs
|
.coeffs
|
||||||
.chunks_exact(arity)
|
.par_chunks_exact(arity)
|
||||||
.map(|chunk| reduce_with_powers(chunk, beta))
|
.map(|chunk| reduce_with_powers(chunk, beta))
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
use rayon::prelude::*;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::field::extension_field::target::ExtensionTarget;
|
use crate::field::extension_field::target::ExtensionTarget;
|
||||||
@ -66,7 +67,7 @@ impl<F: Extendable<D>, const D: usize> OpeningSet<F, D> {
|
|||||||
) -> Self {
|
) -> Self {
|
||||||
let eval_commitment = |z: F::Extension, c: &PolynomialBatchCommitment<F>| {
|
let eval_commitment = |z: F::Extension, c: &PolynomialBatchCommitment<F>| {
|
||||||
c.polynomials
|
c.polynomials
|
||||||
.iter()
|
.par_iter()
|
||||||
.map(|p| p.to_extension().eval(z))
|
.map(|p| p.to_extension().eval(z))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user