pub struct InnerQDriver {
pub target_tokens: i32,
pub strength: f32,
pub calibrating: AtomicBool,
pub finalized: AtomicBool,
/* private fields */
}Fields§
§target_tokens: i32§strength: f32§calibrating: AtomicBool§finalized: AtomicBoolImplementations§
Source§impl InnerQDriver
impl InnerQDriver
Sourcepub fn from_env(registry: Arc<AtlasRegistry>) -> Option<Self>
pub fn from_env(registry: Arc<AtlasRegistry>) -> Option<Self>
Reads TURBO_INNERQ and TURBO_INNERQ_STRENGTH env vars. Returns
None if TURBO_INNERQ is unset, unparsable, or <= 0.
Sourcepub fn start(&self) -> Result<()>
pub fn start(&self) -> Result<()>
Enter calibration phase: zero d_innerq_sq_accum / d_innerq_count
/ d_innerq_active, set d_innerq_calibrating = 1. Idempotent.
Sourcepub fn maybe_finalize(&self, group_size: i32) -> Result<bool>
pub fn maybe_finalize(&self, group_size: i32) -> Result<bool>
Poll d_innerq_count. When it crosses target_tokens, pull
d_innerq_sq_accum, compute per-channel scale/scale_inv, upload,
and flip d_innerq_active = 1. Returns Ok(true) on the call
that activates, Ok(false) on every other call (including
auto-disable when channels are already balanced).
Auto Trait Implementations§
impl !Freeze for InnerQDriver
impl RefUnwindSafe for InnerQDriver
impl Send for InnerQDriver
impl Sync for InnerQDriver
impl Unpin for InnerQDriver
impl UnwindSafe for InnerQDriver
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