diff options
author | Matias Elo <matias.elo@nokia.com> | 2024-06-05 13:51:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 13:51:39 +0300 |
commit | 616034b9c9c789923f7ebe7f1c6d014c4ce8a5d2 (patch) | |
tree | dd1b579c93404d2d98b78944bbdf8313ec499bee /include/odp/api/spec/cpu.h | |
parent | 8063101c4fac56e16c5a2bb9843f2fd9c5acbfd7 (diff) | |
parent | 87913e636da621d47a8d3bc91fbe131abc09c294 (diff) |
Merge ODP v1.45.0.0HEADv1.45.0.0_DPDK_22.11master
Merge ODP linux-generic v1.45.0.0 into linux-dpdk.
Diffstat (limited to 'include/odp/api/spec/cpu.h')
-rw-r--r-- | include/odp/api/spec/cpu.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/include/odp/api/spec/cpu.h b/include/odp/api/spec/cpu.h index 9550354fa..63f313ef3 100644 --- a/include/odp/api/spec/cpu.h +++ b/include/odp/api/spec/cpu.h @@ -176,6 +176,100 @@ uint64_t odp_cpu_cycles_resolution(void); void odp_cpu_pause(void); /** + * Prefetch into data cache + * + * Hints CPU to prefetch data into all data cache levels. Depending on implementation, this + * function may be equal to odp_prefetch_l1(). + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch(const void *addr); + +/** + * Prefetch into L1 data cache + * + * Hints CPU to prefetch data into L1 data cache. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_l1(const void *addr); + +/** + * Prefetch into L2 data cache + * + * Hints CPU to prefetch data into L2 data cache. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_l2(const void *addr); + +/** + * Prefetch into L3 data cache + * + * Hints CPU to prefetch data into L3 data cache. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_l3(const void *addr); + +/** + * Prefetch into data cache for storing + * + * Hints CPU to prefetch data into all data cache levels for storing. Depending on implementation, + * this function may be equal to odp_prefetch_store_l1(). + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_store(const void *addr); + +/** + * Prefetch into L1 data cache for storing + * + * Hints CPU to prefetch data into L1 data cache for storing. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_store_l1(const void *addr); + +/** + * Prefetch into L2 data cache for storing + * + * Hints CPU to prefetch data into L2 data cache for storing. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_store_l2(const void *addr); + +/** + * Prefetch into L3 data cache for storing + * + * Hints CPU to prefetch data into L3 data cache for storing. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_store_l3(const void *addr); + +/** + * Streaming prefetch into L1 data cache + * + * Hints CPU to prefetch data of low temporal locality into L1 data cache. Streaming prefetch is + * optimal for data that will be used only once. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_strm_l1(const void *addr); + +/** + * Streaming prefetch into L1 data cache for storing + * + * Hints CPU to prefetch data of low temporal locality into L1 data cache for storing. Streaming + * prefetch is optimal for data that will be used only once. + * + * @param addr Data address to be prefetched (may be invalid) + */ +void odp_prefetch_store_strm_l1(const void *addr); + +/** * @} */ |