pub struct VirtualExpander { /* private fields */ }Expand description
Declarative physical->virtual column expander for chiplets.
Built once per chiplet, generates
virtual_layout(), parse_row(),
and expand_variants() from the
same packing specification.
Implementations§
Source§impl VirtualExpander
impl VirtualExpander
pub fn new() -> Self
Sourcepub fn build(self) -> Result<Self, Error>
pub fn build(self) -> Result<Self, Error>
Finalize the builder. Returns Err if any
builder step recorded a validation error.
Sourcepub fn expand_bits(self, count: usize, storage: ColumnType) -> Self
pub fn expand_bits(self, count: usize, storage: ColumnType) -> Self
N physical columns of storage type
to N × bit_width virtual Bit columns.
Sourcepub fn pass_through(self, count: usize, storage: ColumnType) -> Self
pub fn pass_through(self, count: usize, storage: ColumnType) -> Self
N physical columns pass through 1:1 as virtual columns.
Sourcepub fn control_bits(self, count: usize) -> Self
pub fn control_bits(self, count: usize) -> Self
N physical Bit columns pass through 1:1.
Sourcepub fn reuse_pass_through(self, phy_col_start: usize, count: usize) -> Self
pub fn reuse_pass_through(self, phy_col_start: usize, count: usize) -> Self
Emit pass-through for columns already declared by a prior fresh entry. Does not advance the physical cursor.
pub fn num_virtual_columns(&self) -> usize
pub fn num_physical_columns(&self) -> usize
pub fn physical_row_bytes(&self) -> usize
pub fn virtual_layout(&self) -> &[ColumnType]
Sourcepub fn parse_row<F: TraceCompatibleField>(
&self,
bytes: &[u8],
res: &mut Vec<Flat<F>>,
) -> Result<(), Error>
pub fn parse_row<F: TraceCompatibleField>( &self, bytes: &[u8], res: &mut Vec<Flat<F>>, ) -> Result<(), Error>
Verifier-side: parse committed physical row bytes into virtual field elements.
Sourcepub fn expand_variants<'a, F, T: Trace + ?Sized>(
&self,
trace: &'a T,
phy_start_idx: usize,
) -> Result<Vec<PolyVariant<'a, F>>, Error>where
F: TraceCompatibleField + 'static,
pub fn expand_variants<'a, F, T: Trace + ?Sized>(
&self,
trace: &'a T,
phy_start_idx: usize,
) -> Result<Vec<PolyVariant<'a, F>>, Error>where
F: TraceCompatibleField + 'static,
Prover-side:
expand physical ColumnTrace
into virtual PolyVariants.
Sourcepub fn expansion_entries(&self) -> Vec<ExpansionEntry>
pub fn expansion_entries(&self) -> Vec<ExpansionEntry>
Wire-format serialization descriptor.
Trait Implementations§
Source§impl Clone for VirtualExpander
impl Clone for VirtualExpander
Source§fn clone(&self) -> VirtualExpander
fn clone(&self) -> VirtualExpander
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VirtualExpander
impl Debug for VirtualExpander
Auto Trait Implementations§
impl Freeze for VirtualExpander
impl RefUnwindSafe for VirtualExpander
impl Send for VirtualExpander
impl Sync for VirtualExpander
impl Unpin for VirtualExpander
impl UnsafeUnpin for VirtualExpander
impl UnwindSafe for VirtualExpander
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more