Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen committed Aug 15, 2024
1 parent a067dc7 commit f75325f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions crates/prover/benches/pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ use rand::rngs::SmallRng;
use rand::{Rng, SeedableRng};
use stwo_prover::core::backend::simd::SimdBackend;
use stwo_prover::core::backend::{BackendForChannel, CpuBackend};
use stwo_prover::core::channel::{Channel, Sha256Channel};
use stwo_prover::core::channel::Sha256Channel;
use stwo_prover::core::fields::m31::BaseField;
use stwo_prover::core::pcs::CommitmentTreeProver;
use stwo_prover::core::poly::circle::{CanonicCoset, CircleEvaluation};
use stwo_prover::core::poly::twiddles::TwiddleTree;
use stwo_prover::core::poly::BitReversedOrder;
use stwo_prover::core::vcs::sha256_hash::Sha256Hash;
use stwo_prover::core::vcs::sha256_merkle::Sha256MerkleHasher;
use stwo_prover::core::vcs::sha256_merkle::Sha256MerkleChannel;

const LOG_COSET_SIZE: u32 = 20;
const LOG_BLOWUP_FACTOR: u32 = 1;
const N_POLYS: usize = 16;

fn benched_fn<B: BackendForChannel<Sha256MerkleHasher>>(
fn benched_fn<B: BackendForChannel<Sha256MerkleChannel>>(
evals: Vec<CircleEvaluation<B, BaseField, BitReversedOrder>>,
channel: &mut Sha256Channel,
twiddles: &TwiddleTree<B>,
Expand All @@ -28,10 +27,10 @@ fn benched_fn<B: BackendForChannel<Sha256MerkleHasher>>(
.map(|eval| eval.interpolate_with_twiddles(twiddles))
.collect();

CommitmentTreeProver::<B, Sha256MerkleHasher>::new(polys, LOG_BLOWUP_FACTOR, channel, twiddles);
CommitmentTreeProver::<B, Sha256MerkleChannel>::new(polys, LOG_BLOWUP_FACTOR, channel, twiddles);
}

fn bench_pcs<B: BackendForChannel<Sha256MerkleHasher>>(c: &mut Criterion, id: &str) {
fn bench_pcs<B: BackendForChannel<Sha256MerkleChannel>>(c: &mut Criterion, id: &str) {
let small_domain = CanonicCoset::new(LOG_COSET_SIZE);
let big_domain = CanonicCoset::new(LOG_COSET_SIZE + LOG_BLOWUP_FACTOR);
let twiddles = B::precompute_twiddles(big_domain.half_coset());
Expand Down
3 changes: 2 additions & 1 deletion crates/prover/src/core/backend/simd/grind.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use super::SimdBackend;
use crate::core::channel::Sha256Channel;
use crate::core::channel::Channel;
#[cfg(not(target_arch = "wasm32"))]
use crate::core::channel::{Channel, Poseidon252Channel};
use crate::core::channel::Poseidon252Channel;
use crate::core::proof_of_work::GrindOps;

impl GrindOps<Sha256Channel> for SimdBackend {
Expand Down

0 comments on commit f75325f

Please sign in to comment.