pub struct TableWitnessSegment<'a, P = PackedType<OptimalUnderlier, B128>>{ /* private fields */ }
Expand description
A vertical segment of a table witness index.
This provides runtime-checked access to slices of the witness columns. This is used separately
from TableWitnessIndex
so that witness population can be parallelized over segments.
Implementations§
Source§impl<'a, P> TableWitnessSegment<'a, P>
impl<'a, P> TableWitnessSegment<'a, P>
Source§impl<'a, F: TowerField, P: PackedField<Scalar = F>> TableWitnessSegment<'a, P>
impl<'a, F: TowerField, P: PackedField<Scalar = F>> TableWitnessSegment<'a, P>
pub fn get<FSub: TowerField, const V: usize>(
&self,
col: Col<FSub, V>,
) -> Result<Ref<'_, [PackedSubfield<P, FSub>]>, Error>where
P: PackedExtension<FSub>,
pub fn get_mut<FSub: TowerField, const V: usize>(
&self,
col: Col<FSub, V>,
) -> Result<RefMut<'_, [PackedSubfield<P, FSub>]>, Error>where
P: PackedExtension<FSub>,
F: ExtensionField<FSub>,
pub fn get_scalars<FSub: TowerField, const V: usize>(
&self,
col: Col<FSub, V>,
) -> Result<Ref<'_, [FSub]>, Error>where
P: PackedExtension<FSub>,
F: ExtensionField<FSub>,
PackedSubfield<P, FSub>: PackedFieldIndexable,
pub fn get_scalars_mut<FSub: TowerField, const V: usize>(
&self,
col: Col<FSub, V>,
) -> Result<RefMut<'_, [FSub]>, Error>where
P: PackedExtension<FSub>,
F: ExtensionField<FSub>,
PackedSubfield<P, FSub>: PackedFieldIndexable,
pub fn get_as<T: Pod, FSub: TowerField, const V: usize>( &self, col: Col<FSub, V>, ) -> Result<Ref<'_, [T]>, Error>
pub fn get_mut_as<T: Pod, FSub: TowerField, const V: usize>( &self, col: Col<FSub, V>, ) -> Result<RefMut<'_, [T]>, Error>
Sourcepub fn eval_expr<FSub: TowerField, const V: usize>(
&self,
expr: &Expr<FSub, V>,
) -> Result<impl Iterator<Item = PackedSubfield<P, FSub>>, Error>where
P: PackedExtension<FSub>,
pub fn eval_expr<FSub: TowerField, const V: usize>(
&self,
expr: &Expr<FSub, V>,
) -> Result<impl Iterator<Item = PackedSubfield<P, FSub>>, Error>where
P: PackedExtension<FSub>,
Evaluate an expression over columns that are assumed to be already populated.
This function evaluates an expression over the columns in the segment and returns an iterator over the packed elements. This borrows the columns segments it reads from, so they must not be borrowed mutably elsewhere (which is possible due to runtime-checked column borrowing).
pub fn size(&self) -> usize
Trait Implementations§
Source§impl<'a, P> Debug for TableWitnessSegment<'a, P>
impl<'a, P> Debug for TableWitnessSegment<'a, P>
Auto Trait Implementations§
impl<'a, P> Freeze for TableWitnessSegment<'a, P>where
<P as PackedField>::Scalar: Sized,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
impl<'a, P = <M128 as PackScalar<BinaryField128b>>::Packed> !RefUnwindSafe for TableWitnessSegment<'a, P>
impl<'a, P> Send for TableWitnessSegment<'a, P>where
<P as PackedField>::Scalar: Sized,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
impl<'a, P = <M128 as PackScalar<BinaryField128b>>::Packed> !Sync for TableWitnessSegment<'a, P>
impl<'a, P> Unpin for TableWitnessSegment<'a, P>where
<P as PackedField>::Scalar: Sized,
<<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
impl<'a, P = <M128 as PackScalar<BinaryField128b>>::Packed> !UnwindSafe for TableWitnessSegment<'a, P>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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