pub struct KernelStats {
pub executions: u64,
pub total_duration: Duration,
pub min_duration: Option<Duration>,
pub max_duration: Option<Duration>,
pub total_memory_bytes: u64,
pub total_compute_units: u64,
}Expand description
Statistics for a specific kernel
Fields§
§executions: u64Number of executions
total_duration: DurationTotal execution time
min_duration: Option<Duration>Minimum execution time
max_duration: Option<Duration>Maximum execution time
total_memory_bytes: u64Total memory accessed
total_compute_units: u64Total compute units used
Implementations§
Source§impl KernelStats
impl KernelStats
Sourcepub fn average_duration(&self) -> Option<Duration>
pub fn average_duration(&self) -> Option<Duration>
Calculate average duration
Sourcepub fn bandwidth_gbs(&self) -> Option<f64>
pub fn bandwidth_gbs(&self) -> Option<f64>
Calculate bandwidth in GB/s
Trait Implementations§
Source§impl Clone for KernelStats
impl Clone for KernelStats
Source§fn clone(&self) -> KernelStats
fn clone(&self) -> KernelStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelStats
impl Debug for KernelStats
Source§impl Default for KernelStats
impl Default for KernelStats
Source§fn default() -> KernelStats
fn default() -> KernelStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KernelStats
impl RefUnwindSafe for KernelStats
impl Send for KernelStats
impl Sync for KernelStats
impl Unpin for KernelStats
impl UnsafeUnpin for KernelStats
impl UnwindSafe for KernelStats
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