pub struct AccessPatternTracker { /* private fields */ }Expand description
Access pattern tracker for shape-based pooling decisions
Tracks how frequently different shapes are accessed to make intelligent pooling decisions.
Implementations§
Source§impl AccessPatternTracker
impl AccessPatternTracker
Sourcepub fn record_access(&mut self, shape: &[usize])
pub fn record_access(&mut self, shape: &[usize])
Record an access to a shape
Sourcepub fn get_frequency(&self, shape: &[usize]) -> usize
pub fn get_frequency(&self, shape: &[usize]) -> usize
Get access frequency for a shape
Sourcepub fn top_shapes(&self, n: usize) -> Vec<(String, usize)>
pub fn top_shapes(&self, n: usize) -> Vec<(String, usize)>
Get top N most frequently accessed shapes
Sourcepub fn num_unique_shapes(&self) -> usize
pub fn num_unique_shapes(&self) -> usize
Get total number of unique shapes accessed
Sourcepub fn total_accesses(&self) -> usize
pub fn total_accesses(&self) -> usize
Get total number of accesses
Sourcepub fn access_distribution(&self) -> HashMap<String, f64>
pub fn access_distribution(&self) -> HashMap<String, f64>
Get access distribution (shape -> frequency ratio)
Trait Implementations§
Source§impl Clone for AccessPatternTracker
impl Clone for AccessPatternTracker
Source§fn clone(&self) -> AccessPatternTracker
fn clone(&self) -> AccessPatternTracker
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccessPatternTracker
impl Debug for AccessPatternTracker
Auto Trait Implementations§
impl Freeze for AccessPatternTracker
impl RefUnwindSafe for AccessPatternTracker
impl Send for AccessPatternTracker
impl Sync for AccessPatternTracker
impl Unpin for AccessPatternTracker
impl UnwindSafe for AccessPatternTracker
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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>
Converts
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>
Converts
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