pub struct HybridStats { /* private fields */ }Expand description
Statistics for hybrid processing decisions.
Thread-safe via atomic operations.
Implementations§
Source§impl HybridStats
impl HybridStats
Sourcepub fn record_cpu_execution(&self, duration: Duration, elements: usize)
pub fn record_cpu_execution(&self, duration: Duration, elements: usize)
Records a CPU execution.
Sourcepub fn record_gpu_execution(&self, duration: Duration, elements: usize)
pub fn record_gpu_execution(&self, duration: Duration, elements: usize)
Records a GPU execution.
Sourcepub fn set_learned_threshold(&self, threshold: usize)
pub fn set_learned_threshold(&self, threshold: usize)
Updates the learned threshold.
Sourcepub fn learned_threshold(&self) -> usize
pub fn learned_threshold(&self) -> usize
Gets the learned threshold.
Sourcepub fn cpu_executions(&self) -> u64
pub fn cpu_executions(&self) -> u64
Gets the total CPU executions.
Sourcepub fn gpu_executions(&self) -> u64
pub fn gpu_executions(&self) -> u64
Gets the total GPU executions.
Sourcepub fn avg_cpu_time(&self) -> Duration
pub fn avg_cpu_time(&self) -> Duration
Gets the average CPU time per execution.
Sourcepub fn avg_gpu_time(&self) -> Duration
pub fn avg_gpu_time(&self) -> Duration
Gets the average GPU time per execution.
Sourcepub fn cpu_gpu_ratio(&self) -> f32
pub fn cpu_gpu_ratio(&self) -> f32
Gets the CPU/GPU execution ratio.
Sourcepub fn cpu_throughput(&self) -> f64
pub fn cpu_throughput(&self) -> f64
Gets the average CPU throughput (elements per second).
Sourcepub fn gpu_throughput(&self) -> f64
pub fn gpu_throughput(&self) -> f64
Gets the average GPU throughput (elements per second).
Sourcepub fn snapshot(&self) -> HybridStatsSnapshot
pub fn snapshot(&self) -> HybridStatsSnapshot
Creates a snapshot of the current statistics.
Trait Implementations§
Source§impl Debug for HybridStats
impl Debug for HybridStats
Source§impl Default for HybridStats
impl Default for HybridStats
Source§fn default() -> HybridStats
fn default() -> HybridStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for HybridStats
impl RefUnwindSafe for HybridStats
impl Send for HybridStats
impl Sync for HybridStats
impl Unpin for HybridStats
impl UnwindSafe for HybridStats
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.