TraceFiller

Trait TraceFiller 

Source
pub trait TraceFiller<F>: Send + Sync {
    // Provided methods
    fn fill_trace(
        &self,
        mem_helper: &MemoryAuxColsFactory<'_, F>,
        trace: &mut RowMajorMatrix<F>,
        rows_used: usize,
    )
       where F: Send + Sync + Clone { ... }
    fn fill_trace_row(
        &self,
        _mem_helper: &MemoryAuxColsFactory<'_, F>,
        _row_slice: &mut [F],
    ) { ... }
    fn fill_dummy_trace_row(&self, _row_slice: &mut [F]) { ... }
    fn generate_public_values(&self) -> Vec<F> { ... }
}
Expand description

Helper trait for CPU tracegen.

Provided Methods§

Source

fn fill_trace( &self, mem_helper: &MemoryAuxColsFactory<'_, F>, trace: &mut RowMajorMatrix<F>, rows_used: usize, )
where F: Send + Sync + Clone,

Populates trace. This function will always be called after [TraceExecutor::execute], so the trace should already contain the records necessary to fill in the rest of it.

Source

fn fill_trace_row( &self, _mem_helper: &MemoryAuxColsFactory<'_, F>, _row_slice: &mut [F], )

Populates row_slice. This function will always be called after [TraceExecutor::execute], so the row_slice should already contain context necessary to fill in the rest of the row. This function will be called for each row in the trace which is being used, and for all other rows in the trace see fill_dummy_trace_row.

The provided row_slice will have length equal to the width of the AIR.

Source

fn fill_dummy_trace_row(&self, _row_slice: &mut [F])

Populates row_slice. This function will be called on dummy rows. By default the trace is padded with empty (all 0) rows to make the height a power of 2.

The provided row_slice will have length equal to the width of the AIR.

Source

fn generate_public_values(&self) -> Vec<F>

Returns a list of public values to publish.

Implementors§

Source§

impl<F, A> TraceFiller<F> for PublicValuesFiller<F, A>
where F: PrimeField32, A: 'static + AdapterTraceFiller<F>,

Source§

impl<F: Field> TraceFiller<F> for PhantomFiller