MtpGate

Struct MtpGate 

Source
pub struct MtpGate { /* private fields */ }
Expand description

2026-09-25: The gate. The scheduler builds one when MTP is on and the gate is not forced off, and records each gated plain-decode or MTP step in it; steps run under a pin are not recorded.

Implementations§

Source§

impl MtpGate

Source

pub fn observe(&self) -> (MtpModeSnap, f32)

2026-09-25: For the scheduler snapshot: the mode (Probing during a probe) and the delivered-throughput estimate of the current mode (0.0 until measured).

Source

pub fn new(num_drafts: usize) -> Self

2026-09-25: Starts in Mtp mode. num_drafts is only logged; arbitration does not model the draft count.

Source

pub fn note_depth(&mut self, depth: usize)

Source

pub fn maybe_remeasure(&mut self, current_depth: usize) -> bool

2026-09-25: When the context depth has moved by REMEASURE_DEPTH_FACTOR since the last measurement (both floored at REMEASURE_DEPTH_FLOOR), marks both estimates stale, keeps them as they are, and brings the next probe (one WINDOW_STEPS window) forward. Returns whether it fired.

Source

pub fn take_fresh_decision(&mut self) -> Option<GateDecision>

2026-09-25: The last mode switch, returned once.

Source

pub fn next_step(&self) -> GateStep

2026-09-25: Which step the scheduler should run next.

Source

pub fn record_decode(&mut self, wall: Duration, width: usize)

2026-09-25: Records one plain decode step over width sequences. Each emits one token, so the step is charged width tokens (at least 1).

Source

pub fn record_verify_step( &mut self, wall: Duration, emitted: usize, width: usize, )

2026-09-25: Records one MTP step over width sequences: emitted is the tokens all of them committed (at least 1 is charged). Bootstrap and propose time count against Mtp mode.

Source§

impl MtpGate

Source

pub fn mtp_tps_debug(&self) -> Option<f64>

Source

pub fn serial_tps_debug(&self) -> Option<f64>

Source

pub fn in_serial_mode(&self) -> bool

Source

pub fn regime_reprobe_count(&self) -> usize

Source

pub fn is_probing(&self) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,