prefetch_write

Function prefetch_write 

Source
pub fn prefetch_write<T>(ptr: *mut T, locality: PrefetchLocality)
Expand description

Prefetches data for writing.

This is a hint to the processor that data at the given address will be written in the near future. This is useful for write-allocate cache policies.

§Arguments

  • ptr - Pointer to the data to prefetch
  • locality - Hint about how often the data will be reused

§Safety

The pointer doesn’t need to be valid - invalid prefetches are simply ignored.