pub struct PrefetchDistance {
pub lines_ahead: usize,
}Expand description
Prefetch distance calculator for streaming access patterns.
This calculates the optimal prefetch distance (in elements) based on memory bandwidth and latency estimates.
Fields§
§lines_ahead: usizeNumber of cache lines to prefetch ahead
Implementations§
Source§impl PrefetchDistance
impl PrefetchDistance
Sourcepub const fn offset_bytes(&self) -> usize
pub const fn offset_bytes(&self) -> usize
Calculates the prefetch offset in bytes.
Sourcepub const fn offset_elements<T>(&self) -> usize
pub const fn offset_elements<T>(&self) -> usize
Calculates the prefetch offset in elements.
Trait Implementations§
Source§impl Clone for PrefetchDistance
impl Clone for PrefetchDistance
Source§fn clone(&self) -> PrefetchDistance
fn clone(&self) -> PrefetchDistance
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 PrefetchDistance
impl Debug for PrefetchDistance
Source§impl Default for PrefetchDistance
impl Default for PrefetchDistance
impl Copy for PrefetchDistance
Auto Trait Implementations§
impl Freeze for PrefetchDistance
impl RefUnwindSafe for PrefetchDistance
impl Send for PrefetchDistance
impl Sync for PrefetchDistance
impl Unpin for PrefetchDistance
impl UnwindSafe for PrefetchDistance
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