Struct winter_prover::ExecutionTraceFragment [−][src]
pub struct ExecutionTraceFragment<'a, B: StarkField> { /* fields omitted */ }Expand description
A set of consecutive rows of an execution trace.
An execution trace fragment is a “view” into the specific execution trace. Updating data in the fragment, directly updates the data in the underlying execution trace.
A fragment cannot be instantiated directly but is created by executing ExecutionTrace::fragments() method.
A fragment always contains contiguous rows, and the number of rows is guaranteed to be a power of two.
Implementations
Returns the step at which the fragment starts in the context of the original execution trace.
Returns the width of the fragment (same as the width of the underlying execution trace).
Fills all rows in the fragment.
The rows are filled by executing the provided closures as follows:
initclosure is used to initialize the first row of the fragment; it receives a mutable reference to the first state initialized to all zeros. Contents of the state are copied into the first row of the fragment after the closure returns.updateclosure is used to populate all subsequent rows of the fragment; it receives two parameters:- index of the last updated row (starting with 0).
- a mutable reference to the last updated state; the contents of the state are copied into the next row of the fragment after the closure returns.
Updates a single row in the fragment with provided data.