pub struct ThunkSchedule {
pub thunks: Vec<Thunk>,
pub moe_resident: Option<Arc<[bool]>>,
pub moe_resident_layers: Option<Arc<Vec<Arc<[bool]>>>>,
pub moe_topk_capture: Option<Arc<MoeTopkCapture>>,
pub mask_threshold: f32,
pub mask_neg_inf: f32,
pub score_skip: f32,
pub compiled_fns: Vec<Arc<dyn Fn(*mut u8) + Send + Sync>>,
}Expand description
Compiled thunk schedule — the runtime hot path. Nop thunks are filtered out at compile time for zero iteration overhead.
Fields§
§thunks: Vec<Thunk>§moe_resident: Option<Arc<[bool]>>TIDE merged placement mask (union across layers).
moe_resident_layers: Option<Arc<Vec<Arc<[bool]>>>>Per MoE layer placement (layer[e]); preferred when set.
moe_topk_capture: Option<Arc<MoeTopkCapture>>MoE router TopK capture (per-layer refresh).
mask_threshold: f32Cached config values.
mask_neg_inf: f32§score_skip: f32§compiled_fns: Vec<Arc<dyn Fn(*mut u8) + Send + Sync>>Pre-compiled closure dispatch (zero match overhead). Arc (not
Box) so the schedule can be Clone — multiple parallel
executors share the same compiled closures (they’re read-only
Fn(*mut u8) so concurrent dispatch is safe; the arena pointer
they receive is the only mutable state and is per-executor).
Implementations§
Source§impl ThunkSchedule
impl ThunkSchedule
pub fn strip_nops(&mut self)
Trait Implementations§
Source§impl Clone for ThunkSchedule
impl Clone for ThunkSchedule
Source§fn clone(&self) -> ThunkSchedule
fn clone(&self) -> ThunkSchedule
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 moreAuto Trait Implementations§
impl Freeze for ThunkSchedule
impl !RefUnwindSafe for ThunkSchedule
impl Send for ThunkSchedule
impl Sync for ThunkSchedule
impl Unpin for ThunkSchedule
impl UnsafeUnpin for ThunkSchedule
impl !UnwindSafe for ThunkSchedule
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> 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