mirror of
https://github.com/arnaucube/hyperplonk.git
synced 2026-01-10 16:11:29 +01:00
fix bench code
This commit is contained in:
committed by
chancharles92
parent
4fdbec33a6
commit
cf49741b7e
@@ -16,20 +16,21 @@ use subroutines::{
|
|||||||
poly_iop::PolyIOP,
|
poly_iop::PolyIOP,
|
||||||
};
|
};
|
||||||
|
|
||||||
const SUPPORTED_SIZE: usize = 20;
|
const SUPPORTED_SIZE: usize = 15;
|
||||||
const MIN_NUM_VARS: usize = 8;
|
const MIN_NUM_VARS: usize = 8;
|
||||||
const MAX_NUM_VARS: usize = 15;
|
const MAX_NUM_VARS: usize = 15;
|
||||||
const MIN_CUSTOM_DEGREE: usize = 1;
|
const MIN_CUSTOM_DEGREE: usize = 1;
|
||||||
const MAX_CUSTOM_DEGREE: usize = 32;
|
const MAX_CUSTOM_DEGREE: usize = 32;
|
||||||
|
const MAX_NUM_THREADS: usize = 24;
|
||||||
|
|
||||||
fn main() -> Result<(), HyperPlonkErrors> {
|
fn main() -> Result<(), HyperPlonkErrors> {
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
let thread = args[1].parse().unwrap_or(24);
|
let thread = args[1].parse().unwrap_or(MAX_NUM_THREADS);
|
||||||
let mut rng = test_rng();
|
let mut rng = test_rng();
|
||||||
let pcs_srs = MultilinearKzgPCS::<Bls12_381>::gen_srs_for_testing(&mut rng, SUPPORTED_SIZE)?;
|
let pcs_srs = MultilinearKzgPCS::<Bls12_381>::gen_srs_for_testing(&mut rng, SUPPORTED_SIZE)?;
|
||||||
ThreadPoolBuilder::new()
|
ThreadPoolBuilder::new()
|
||||||
.num_threads(thread)
|
.num_threads(thread)
|
||||||
.build_global()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
bench_vanilla_plonk(&pcs_srs, thread)?;
|
bench_vanilla_plonk(&pcs_srs, thread)?;
|
||||||
for degree in MIN_CUSTOM_DEGREE..MAX_CUSTOM_DEGREE {
|
for degree in MIN_CUSTOM_DEGREE..MAX_CUSTOM_DEGREE {
|
||||||
|
|||||||
Reference in New Issue
Block a user