Enum Locality
#[non_exhaustive]
pub 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 Locality
const fn to_llvm(self) -> i32Convert to the constant that LLVM associates with a locality.
Trait Implementations
impl Clone for Locality
fn clone(&self) -> Locality
impl Copy for Locality
impl Debug for Locality
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Locality
fn assert_fields_are_eq(&self)
impl Hash for Locality
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for Locality
fn eq(&self, other: &Locality) -> bool
impl StructuralPartialEq for Locality
impl TrivialClone for Locality
Auto Trait Implementations
impl Freeze for Locality
impl RefUnwindSafe for Locality
impl Send for Locality
impl Sync for Locality
impl Unpin for Locality
impl UnsafeUnpin for Locality
impl UnwindSafe for Locality
Blanket Implementations
impl<T> Any for Locality
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Locality
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Locality
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Locality
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Locality
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for Locality
where
T: Copy + Debug,
impl<T> SizeHint for Locality
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Locality
impl<T, U> Into<U> for Locality
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Locality
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Locality
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>