core::arch::aarch64

Function _prefetch

source
pub unsafe fn _prefetch(p: *const i8, const RW: i32, const LOCALITY: i32)
🔬This is a nightly-only experimental API. (stdarch_aarch64_prefetch #117217)
Available on AArch64 or target_arch="arm64ec" only.
Expand description

Fetch the cache line that contains address p using the given RW and LOCALITY.

The RW must be one of:

The LOCALITY must be one of:

The prefetch memory instructions signal to the memory system that memory accesses from a specified address are likely to occur in the near future. The memory system can respond by taking actions that are expected to speed up the memory access when they do occur, such as preloading the specified address into one or more caches. Because these signals are only hints, it is valid for a particular CPU to treat any or all prefetch instructions as a NOP.

Arm’s documentation