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<MetraleRegistry>) -> Option<Self>
pub fn from_env(registry: Arc<MetraleRegistry>) -> Option<Self>
2026-09-25: Reads TURBO_INNERQ and TURBO_INNERQ_STRENGTH. Returns
None if TURBO_INNERQ is unset, not an i32, or <= 0. A strength
outside (0, 1] or unparsable is 0.5.
Sourcepub fn start(&self) -> Result<()>
pub fn start(&self) -> Result<()>
2026-09-25: Enters calibration: zeroes d_innerq_sq_accum,
d_innerq_count and d_innerq_active, sets d_innerq_calibrating = 1,
and resets the host flags. Calling it again gives the same state.
Sourcepub fn maybe_finalize(&self, group_size: i32) -> Result<bool>
pub fn maybe_finalize(&self, group_size: i32) -> Result<bool>
2026-09-25: Polls d_innerq_count. Once it reaches target_tokens,
reads d_innerq_sq_accum, computes per-channel scale/scale_inv,
uploads them and sets d_innerq_active = 1. Returns Ok(true) on the
call that activates and Ok(false) otherwise, including when the
channels are already balanced and nothing is uploaded. Errors when
group_size is outside 1..=MAX_CHANNELS or larger than a symbol.
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