pub struct DataLocalityInfo {
pub accesses: Vec<MemoryAccess>,
pub working_set_bytes: u64,
pub best_cache_level: CacheLevel,
pub reuse_distance: f64,
}Expand description
Summary of data locality characteristics for a function or loop body.
Fields§
§accesses: Vec<MemoryAccess>All memory accesses captured for this scope.
working_set_bytes: u64Estimated working set size in bytes.
best_cache_level: CacheLevelThe cache level that best accommodates the working set.
reuse_distance: f64Estimated average reuse distance (in number of intervening accesses).
Implementations§
Source§impl DataLocalityInfo
impl DataLocalityInfo
Sourcepub fn fits_in_l1(&self) -> bool
pub fn fits_in_l1(&self) -> bool
Returns true if the working set fits in L1 cache.
Sourcepub fn fits_in_l2(&self) -> bool
pub fn fits_in_l2(&self) -> bool
Returns true if the working set fits in L2 cache.
Sourcepub fn cache_friendly_fraction(&self) -> f64
pub fn cache_friendly_fraction(&self) -> f64
Returns the fraction of accesses that are cache-friendly.
Trait Implementations§
Source§impl Clone for DataLocalityInfo
impl Clone for DataLocalityInfo
Source§fn clone(&self) -> DataLocalityInfo
fn clone(&self) -> DataLocalityInfo
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 moreAuto Trait Implementations§
impl Freeze for DataLocalityInfo
impl RefUnwindSafe for DataLocalityInfo
impl Send for DataLocalityInfo
impl Sync for DataLocalityInfo
impl Unpin for DataLocalityInfo
impl UnsafeUnpin for DataLocalityInfo
impl UnwindSafe for DataLocalityInfo
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