pub struct SpatialLocalityAnalyzer { /* private fields */ }Expand description
Spatial locality analyzer for tile-based data
Implementations§
Source§impl SpatialLocalityAnalyzer
impl SpatialLocalityAnalyzer
Sourcepub fn record_access(&mut self, x: usize, y: usize, z: usize)
pub fn record_access(&mut self, x: usize, y: usize, z: usize)
Records a coordinate access
Sourcepub fn predict_adjacent(&self, count: usize) -> Vec<(usize, usize, usize)>
pub fn predict_adjacent(&self, count: usize) -> Vec<(usize, usize, usize)>
Predicts adjacent tiles to prefetch
Sourcepub fn movement_direction(&self) -> Option<(i64, i64)>
pub fn movement_direction(&self) -> Option<(i64, i64)>
Gets the current movement direction
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpatialLocalityAnalyzer
impl RefUnwindSafe for SpatialLocalityAnalyzer
impl Send for SpatialLocalityAnalyzer
impl Sync for SpatialLocalityAnalyzer
impl Unpin for SpatialLocalityAnalyzer
impl UnsafeUnpin for SpatialLocalityAnalyzer
impl UnwindSafe for SpatialLocalityAnalyzer
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