Trait halo2_proofs::plonk::FloorPlanner
source · [−]pub trait FloorPlanner {
fn synthesize<F: Field, CS: Assignment<F>, C: Circuit<F>>(
cs: &mut CS,
circuit: &C,
config: C::Config,
constants: Vec<Column<Fixed>>
) -> Result<(), Error>;
}
Expand description
A floor planning strategy for a circuit.
The floor planner is chip-agnostic and applies its strategy to the circuit it is used within.
Required Methods
sourcefn synthesize<F: Field, CS: Assignment<F>, C: Circuit<F>>(
cs: &mut CS,
circuit: &C,
config: C::Config,
constants: Vec<Column<Fixed>>
) -> Result<(), Error>
fn synthesize<F: Field, CS: Assignment<F>, C: Circuit<F>>(
cs: &mut CS,
circuit: &C,
config: C::Config,
constants: Vec<Column<Fixed>>
) -> Result<(), Error>
Given the provided cs
, synthesize the given circuit.
constants
is the list of fixed columns that the layouter may use to assign
global constant values. These columns will all have been equality-enabled.
Internally, a floor planner will perform the following operations:
- Instantiate a
Layouter
for this floor planner. - Perform any necessary setup or measurement tasks, which may involve one or more
calls to
Circuit::default().synthesize(config, &mut layouter)
. - Call
circuit.synthesize(config, &mut layouter)
exactly once.