Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::mock_circuits Namespace Reference

Functions

template<typename Builder >
void generate_basic_arithmetic_circuit_with_target_gates (Builder &builder, size_t target_gate_count)
 Generate test circuit with basic arithmetic operations, targeting a specific gate count.
 
template<typename Builder >
void generate_basic_arithmetic_circuit (Builder &builder, size_t log2_num_gates)
 Generate test circuit with basic arithmetic operations, using log2 of gate count.
 
template<typename Prover >
Prover get_prover (void(*test_circuit_function)(typename Prover::Flavor::CircuitBuilder &, size_t), size_t num_iterations)
 
template<typename Prover >
void construct_proof_with_specified_num_iterations (benchmark::State &state, void(*test_circuit_function)(typename Prover::Flavor::CircuitBuilder &, size_t), size_t num_iterations)
 Performs proof constuction for benchmarks based on a provided circuit function.
 

Function Documentation

◆ construct_proof_with_specified_num_iterations()

template<typename Prover >
void bb::mock_circuits::construct_proof_with_specified_num_iterations ( benchmark::State &  state,
void(*)(typename Prover::Flavor::CircuitBuilder &, size_t)  test_circuit_function,
size_t  num_iterations 
)

Performs proof constuction for benchmarks based on a provided circuit function.

This function assumes state.range refers to num_iterations which is the number of times to perform a given basic operation in the circuit, e.g. number of hashes

Template Parameters
Builder
Parameters
state
test_circuit_function

Definition at line 89 of file mock_circuits.hpp.

◆ generate_basic_arithmetic_circuit()

template<typename Builder >
void bb::mock_circuits::generate_basic_arithmetic_circuit ( Builder builder,
size_t  log2_num_gates 
)

Generate test circuit with basic arithmetic operations, using log2 of gate count.

Parameters
builderThe circuit builder
log2_num_gatesLog2 of the target number of gates

Definition at line 56 of file mock_circuits.hpp.

◆ generate_basic_arithmetic_circuit_with_target_gates()

template<typename Builder >
void bb::mock_circuits::generate_basic_arithmetic_circuit_with_target_gates ( Builder builder,
size_t  target_gate_count 
)

Generate test circuit with basic arithmetic operations, targeting a specific gate count.

Parameters
builderThe circuit builder
target_gate_countThe target number of gates to create

Definition at line 20 of file mock_circuits.hpp.

◆ get_prover()

template<typename Prover >
Prover bb::mock_circuits::get_prover ( void(*)(typename Prover::Flavor::CircuitBuilder &, size_t)  test_circuit_function,
size_t  num_iterations 
)

Definition at line 62 of file mock_circuits.hpp.