Skip to content

Commit

Permalink
Fix benchmark build
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleiserson committed Nov 20, 2024
1 parent 5f9675a commit 6f339dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ipa-core/benches/dzkp_convert_prover.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Benchmark for the convert_prover function in dzkp_field.rs.
//! Benchmark for the table_indices_prover function in dzkp_field.rs.
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use ipa_core::protocol::context::dzkp_validator::MultiplicationInputsBlock;
Expand All @@ -9,7 +9,7 @@ fn convert_prover_benchmark(c: &mut Criterion) {
group.bench_function("convert", |b| {
b.iter_batched_ref(
|| thread_rng().gen(),
|input| input.table_indices_prover(),
|input: &mut MultiplicationInputsBlock| input.table_indices_prover(),
BatchSize::SmallInput,
)
});
Expand Down
2 changes: 1 addition & 1 deletion ipa-core/src/protocol/context/dzkp_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl MultiplicationInputsBlock {
}
}

#[cfg(test)]
#[cfg(any(test, feature = "enable-benches"))]
impl rand::prelude::Distribution<MultiplicationInputsBlock> for rand::distributions::Standard {
fn sample<R: rand::Rng + ?Sized>(&self, rng: &mut R) -> MultiplicationInputsBlock {
// Generate a random valid block of muliplication intermediates. "Valid" means
Expand Down

0 comments on commit 6f339dd

Please sign in to comment.