pub struct CacheInfo;
Expand description
Architecture-specific cache line size detection.
Implementations§
Source§impl CacheInfo
impl CacheInfo
Sourcepub const fn cache_line_size() -> usize
pub const fn cache_line_size() -> usize
Get the cache line size for the current architecture.
Sourcepub const fn align_to_cache_line(size: usize) -> usize
pub const fn align_to_cache_line(size: usize) -> usize
Align a size to cache line boundaries.
Sourcepub fn is_cache_line_aligned(addr: *const u8) -> bool
pub fn is_cache_line_aligned(addr: *const u8) -> bool
Check if an address is cache-line aligned.
Auto Trait Implementations§
impl Freeze for CacheInfo
impl RefUnwindSafe for CacheInfo
impl Send for CacheInfo
impl Sync for CacheInfo
impl Unpin for CacheInfo
impl UnwindSafe for CacheInfo
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