Skip to main content

prefetch_read_data

Function prefetch_read_data 

Source
pub fn prefetch_read_data<T, const LOCALITY: i32>(addr: *const T)
Expand description

Prefetches data for reading into the cache.

This function hints to the CPU that the data at the given address will be read soon, allowing the CPU to load the data into the cache in advance. This can improve performance by reducing cache misses.

ยงArguments

  • addr - A pointer to the data to prefetch.
  • LOCALITY - The cache locality to prefetch into.