Mojo function
prefetch
prefetch[dtype: DType, //, params: PrefetchOptions = PrefetchOptions()](addr: UnsafePointer[Scalar[dtype], address_space=address_space, mut=mut, origin=origin])
Prefetches an instruction or data into cache before it is used.
The prefetch function provides prefetching hints for the target to prefetch instruction or data into cache before they are used.
Parameters:
- โdtype (
DType
): The DType of value stored in addr. - โparams (
PrefetchOptions
): Configuration options for the prefect intrinsic.
Args:
- โaddr (
UnsafePointer
): The data pointer to prefetch.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!