pub fn simple_pipeliner<T>(
circuit: Circuit<T>,
depth_in_stage: usize,
) -> (Circuit<T>, usize)Expand description
Generates pipelined version of circuit.
Function generates pipelined version of circuit including depth of any stage of
circuit evaluation. A depth_in_stage determines maximal depth of any stage.
It returns pipelined circuit and number of stages (N).
Pipelined circuit have inputs in form:
[stage1_state,stage2_state,..,stage(n-1)_state,original_inputs].
A stageX_state is state for Xth stage (Xth execution of pipelined circuit).
original_inputs are original inputs.
Pipelined circuit have outputs in form:
[stage1_state,stage2_state,..,stage(n-1)_state,original_outputs].
A stageX_state is state for Xth stage (Xth execution of pipelined circuit).
original_outputs are original outputs.
The execution of pipelined circuit is simple. For every execution put to original_inputs
next input data and after Nth execution before first execution get results
from original_outputs.