pub struct FractionalInputSize {
pub real_len: usize,
pub logical_len: usize,
}Fields§
§real_len: usize§logical_len: usizeImplementations§
Source§impl FractionalInputSize
impl FractionalInputSize
pub fn new(real_len: usize, logical_len: usize) -> Self
pub fn dense(len: usize) -> Self
Sourcepub fn peak_work_buffer_bytes(&self) -> usize
pub fn peak_work_buffer_bytes(&self) -> usize
Peak work-buffer bytes (excluding the S_frac * real_len layer/input buffer).
This must stay in sync with max_work_size in fractional_sumcheck_gpu and the
precompute-M EF auxiliary allocations. If the sumcheck implementation changes, this
method must be updated as well — it is the source of truth for batching budgets that
depend on the fractional-GKR peak. Also update the conservative interaction memory
estimate in openvm_stark_backend::memory_metering.
§Formula (FoldEval path, dominates for large inputs)
work_buffer = logical_len / 4 Frac entries → S_frac * L/4 bytesFor the precompute-M path (max_work_size in fractional_sumcheck_gpu):
work_buffer = max(L >> (1 + GKR_WINDOW_SIZE), 2^22) Frac entries
+ S_ef * (2^(2w) + max_window(m_partial) + 2^(w+1)) EF bytesThis method returns the maximum over both paths to give a conservative budget.
Trait Implementations§
Source§impl Clone for FractionalInputSize
impl Clone for FractionalInputSize
Source§fn clone(&self) -> FractionalInputSize
fn clone(&self) -> FractionalInputSize
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 moreimpl Copy for FractionalInputSize
Source§impl Debug for FractionalInputSize
impl Debug for FractionalInputSize
impl Eq for FractionalInputSize
Source§impl PartialEq for FractionalInputSize
impl PartialEq for FractionalInputSize
impl StructuralPartialEq for FractionalInputSize
Auto Trait Implementations§
impl Freeze for FractionalInputSize
impl RefUnwindSafe for FractionalInputSize
impl Send for FractionalInputSize
impl Sync for FractionalInputSize
impl Unpin for FractionalInputSize
impl UnsafeUnpin for FractionalInputSize
impl UnwindSafe for FractionalInputSize
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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