Enum Locality

enum Locality

The expected temporal locality of a memory prefetch operation.

Locality expresses how likely the prefetched data is to be reused soon, and therefore which level of cache it should be brought into.

The locality is just a hint, and may be ignored on some targets or by the hardware.

Used with functions like prefetch_read and prefetch_write.

Variants

L3

Data is expected to be reused eventually.

Typically prefetches into L3 cache (if the CPU supports it).

L2

Data is expected to be reused in the near future.

Typically prefetches into L2 cache.

L1

Data is expected to be reused very soon.

Typically prefetches into L1 cache.

Implementations

impl Clone for Locality

fn clone(self: &Self) -> Locality

impl Copy for Locality

impl Debug for Locality

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Eq for Locality

impl Freeze for Locality

impl Hash for Locality

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl PartialEq for Locality

fn eq(self: &Self, other: &Locality) -> bool

impl RefUnwindSafe for Locality

impl Send for Locality

impl StructuralPartialEq for Locality

impl Sync for Locality

impl Unpin for Locality

impl UnwindSafe for Locality

impl<T> Any for Locality

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Locality

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Locality

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Locality

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Locality

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for Locality

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Locality

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Locality

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>