Skip to main content

ExecutionCostModel

Struct ExecutionCostModel 

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

Online EWMA-calibrated cost model parameters for AdaptiveExecutionRouter (all durations in microseconds).

Implementations§

Source§

impl ExecutionCostModel

Analytical cost evaluation and online EWMA calibration for ExecutionCostModel.

Source

pub fn parallel_speedup(item_count: usize, worker_threads: usize) -> f64

Computes the Amdahl-bounded parallel speedup factor S_par(n, W).

§Arguments
  • usize - Number of independent work items (N).
  • usize - Available worker threads (W).
§Returns
  • f64 - Effective parallel speedup factor >= 1.0.
Source

pub fn estimate( &self, workload: ExecutionWorkloadFeatures, ) -> ExecutionCostEstimate

Evaluates predicted execution costs in microseconds across all 4 ExecutionLane modes.

§Arguments
  • ExecutionWorkloadFeatures - Current frame scene workload features.
§Returns
  • ExecutionCostEstimate - Predicted microsecond costs and optimal eligible lane.
Source

pub fn cost_for_lane( estimate: ExecutionCostEstimate, lane: ExecutionLane, ) -> f64

Returns the estimated cost in microseconds for a specific lane.

§Arguments
  • ExecutionCostEstimate - Precomputed 4-lane cost estimate.
  • ExecutionLane - Lane to query.
§Returns
  • f64 - Predicted execution duration in microseconds.
Source

pub fn assimilate_ewma( &mut self, lane: ExecutionLane, observed_cpu_us: f64, observed_gpu_compute_us: f64, workload: ExecutionWorkloadFeatures, )

Assimilates an observed frame execution measurement using EWMA smoothing (alpha = 0.15).

§Arguments
  • ExecutionLane - Lane that actually executed.
  • f64 - Observed CPU execution duration in microseconds.
  • f64 - Observed GPU compute duration in microseconds.
  • ExecutionWorkloadFeatures - Workload metrics for the observed frame.
Source§

impl ExecutionCostModel

Implements impl #impl_generics #name #ty_generics #where_clause.

Source

pub fn get_c_node_us(&self) -> f64

Source

pub fn get_mut_c_node_us(&mut self) -> &mut f64

Source

pub fn set_c_node_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_c_text_us(&self) -> f64

Source

pub fn get_mut_c_text_us(&mut self) -> &mut f64

Source

pub fn set_c_text_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_c_pack_us(&self) -> f64

Source

pub fn get_mut_c_pack_us(&mut self) -> &mut f64

Source

pub fn set_c_pack_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_tau_sched_us(&self) -> f64

Source

pub fn get_mut_tau_sched_us(&mut self) -> &mut f64

Source

pub fn set_tau_sched_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_tau_disp_us(&self) -> f64

Source

pub fn get_mut_tau_disp_us(&mut self) -> &mut f64

Source

pub fn set_tau_disp_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_tau_lvl_us(&self) -> f64

Source

pub fn get_mut_tau_lvl_us(&mut self) -> &mut f64

Source

pub fn set_tau_lvl_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_g_node_us(&self) -> f64

Source

pub fn get_mut_g_node_us(&mut self) -> &mut f64

Source

pub fn set_g_node_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_bw_up_bytes_per_us(&self) -> f64

Source

pub fn get_mut_bw_up_bytes_per_us(&mut self) -> &mut f64

Source

pub fn set_bw_up_bytes_per_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_tau_merge_us(&self) -> f64

Source

pub fn get_mut_tau_merge_us(&mut self) -> &mut f64

Source

pub fn set_tau_merge_us(&mut self, val: f64) -> &mut Self

Source

pub fn get_ewma_alpha(&self) -> f64

Source

pub fn get_mut_ewma_alpha(&mut self) -> &mut f64

Source

pub fn set_ewma_alpha(&mut self, val: f64) -> &mut Self

Source

pub fn get_observed_samples(&self) -> u64

Source

pub fn get_mut_observed_samples(&mut self) -> &mut u64

Source

pub fn set_observed_samples(&mut self, val: u64) -> &mut Self

Trait Implementations§

Source§

impl Clone for ExecutionCostModel

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ExecutionCostModel

Source§

impl Debug for ExecutionCostModel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExecutionCostModel

Default EWMA-calibrated cost model baselines matching Apple Silicon / modern desktop profiles.

Source§

fn default() -> Self

Creates calibrated default microsecond cost parameters with ewma_alpha = 0.15.

§Returns
  • Self - Default ExecutionCostModel.
Source§

impl PartialEq for ExecutionCostModel

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExecutionCostModel

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.