pub struct RuntimePolicy {
pub determinism: Determinism,
pub numeric_mode: NumericMode,
pub thermal_mode: ThermalMode,
pub max_threads: usize,
pub batch_size: usize,
pub audit_mode: AuditMode,
pub adaptive: bool,
}Expand description
A fully-resolved runtime execution policy.
max_threads == 0 means “auto” — resolve the effective cap from
ThermalMode and the detected core count via effective_threads.
Fields§
§determinism: Determinism§numeric_mode: NumericMode§thermal_mode: ThermalMode§max_threads: usizeHard thread cap; 0 = auto (derive from thermal_mode).
batch_size: usizeAdvisory batch size for chunked workloads (training, ABNG, TidyView).
audit_mode: AuditMode§adaptive: boolRace-to-idle scheduling: when true, parallel work runs at full width
for a short burst and only throttles to the thermal cap once load is
sustained (see run_parallel). Recovers burst performance while
keeping the sustained thermal bound. When false, the cap applies
uniformly (a fixed, reproducible schedule). Moot when the cap equals the
core count (max-perf). Never affects results — only the schedule.
Implementations§
Source§impl RuntimePolicy
impl RuntimePolicy
Sourcepub fn for_thermal_mode(mode: ThermalMode) -> Self
pub fn for_thermal_mode(mode: ThermalMode) -> Self
Build the policy implied by a thermal profile: the profile sets the
thermal mode, its preset batch size, its preset audit depth, and leaves
the thread count on auto (0). Determinism stays Strict and the
numeric mode stays Kahan — those are orthogonal to thermal behavior.
Trait Implementations§
Source§impl Clone for RuntimePolicy
impl Clone for RuntimePolicy
Source§fn clone(&self) -> RuntimePolicy
fn clone(&self) -> RuntimePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RuntimePolicy
impl Debug for RuntimePolicy
Source§impl Default for RuntimePolicy
impl Default for RuntimePolicy
Source§impl PartialEq for RuntimePolicy
impl PartialEq for RuntimePolicy
Source§fn eq(&self, other: &RuntimePolicy) -> bool
fn eq(&self, other: &RuntimePolicy) -> bool
self and other values to be equal, and is used by ==.impl Copy for RuntimePolicy
impl Eq for RuntimePolicy
impl StructuralPartialEq for RuntimePolicy
Auto Trait Implementations§
impl Freeze for RuntimePolicy
impl RefUnwindSafe for RuntimePolicy
impl Send for RuntimePolicy
impl Sync for RuntimePolicy
impl Unpin for RuntimePolicy
impl UnsafeUnpin for RuntimePolicy
impl UnwindSafe for RuntimePolicy
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
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>
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>
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