Mojo function
prefetch
prefetch[type: DType, //, params: PrefetchOptions = {0, 3, 1}](addr: UnsafePointer[SIMD[type, 1], address_space, exclusive, alignment])
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:
- type (
DType
): The DType of value stored in addr. - params (
PrefetchOptions
): Configuration options for the prefect intrinsic.
Args:
- addr (
UnsafePointer[SIMD[type, 1], address_space, exclusive, alignment]
): The data pointer to prefetch.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?