Skip to main content

TileStats

Struct TileStats 

Source
pub struct TileStats {
    pub level: TileLevel,
    pub count: u64,
    pub total_ns: u64,
    pub min_ns: u64,
    pub max_ns: u64,
    pub total_elements: u64,
    pub cache_misses: u64,
    pub total_flops: u64,
}
Expand description

Tile-level profiling statistics.

Tracks per-tile performance metrics for hierarchical cache-blocked operations. Used in conjunction with TcbGeometry and TilingConfig from the tiling module.

§Example

let mut profiler = BrickProfiler::new();
profiler.enable();

let tile_timer = profiler.start_tile(TileLevel::Macro, 0, 0);
// ... execute tile ...
profiler.stop_tile(tile_timer, 1024 * 1024);

Fields§

§level: TileLevel

Tile level (Macro/Midi/Micro)

§count: u64

Total samples collected

§total_ns: u64

Total elapsed time (nanoseconds)

§min_ns: u64

Min elapsed time (nanoseconds)

§max_ns: u64

Max elapsed time (nanoseconds)

§total_elements: u64

Total elements processed

§cache_misses: u64

Total cache misses (estimated)

§total_flops: u64

Total arithmetic operations

Implementations§

Source§

impl TileStats

Source

pub fn new(level: TileLevel) -> TileStats

Create new tile stats for a given level.

Source

pub fn add_sample(&mut self, elapsed_ns: u64, elements: u64, flops: u64)

Add a sample to statistics.

Source

pub fn avg_us(&self) -> f64

Average time in microseconds.

Source

pub fn throughput(&self) -> f64

Throughput in elements/second.

Source

pub fn gflops(&self) -> f64

Compute throughput in GFLOP/s.

Source

pub fn arithmetic_intensity(&self) -> f64

Arithmetic intensity (FLOP/byte) estimate.

Assumes 4 bytes per element (f32).

Source

pub fn cache_efficiency(&self, peak_gflops: f64) -> f64

Estimated cache efficiency (0.0-1.0).

Based on ratio of actual throughput vs theoretical peak.

Trait Implementations§

Source§

impl Clone for TileStats

Source§

fn clone(&self) -> TileStats

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TileStats

Source§

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

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

impl Default for TileStats

Source§

fn default() -> TileStats

Returns the “default value” for a type. Read more

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.