API Reference Manual  1.45.0
api/spec/cpu.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2015-2018 Linaro Limited
3  */
4 
11 #ifndef ODP_API_SPEC_CPU_H_
12 #define ODP_API_SPEC_CPU_H_
13 #include <odp/visibility_begin.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #include <odp/api/std_types.h>
20 
34 int odp_cpu_id(void);
35 
44 int odp_cpu_count(void);
45 
53 const char *odp_cpu_model_str(void);
54 
64 const char *odp_cpu_model_str_id(int id);
65 
75 uint64_t odp_cpu_hz(void);
76 
88 uint64_t odp_cpu_hz_id(int id);
89 
99 uint64_t odp_cpu_hz_max(void);
100 
112 uint64_t odp_cpu_hz_max_id(int id);
113 
130 uint64_t odp_cpu_cycles(void);
131 
144 uint64_t odp_cpu_cycles_diff(uint64_t c2, uint64_t c1);
145 
155 uint64_t odp_cpu_cycles_max(void);
156 
168 
176 void odp_cpu_pause(void);
177 
186 void odp_prefetch(const void *addr);
187 
195 void odp_prefetch_l1(const void *addr);
196 
204 void odp_prefetch_l2(const void *addr);
205 
213 void odp_prefetch_l3(const void *addr);
214 
223 void odp_prefetch_store(const void *addr);
224 
232 void odp_prefetch_store_l1(const void *addr);
233 
241 void odp_prefetch_store_l2(const void *addr);
242 
250 void odp_prefetch_store_l3(const void *addr);
251 
260 void odp_prefetch_strm_l1(const void *addr);
261 
270 void odp_prefetch_store_strm_l1(const void *addr);
271 
276 #ifdef __cplusplus
277 }
278 #endif
279 
280 #include <odp/visibility_end.h>
281 #endif
Standard C language types and definitions for ODP.
const char * odp_cpu_model_str(void)
CPU model name of this CPU.
void odp_cpu_pause(void)
Pause CPU execution for a short while.
uint64_t odp_cpu_cycles_diff(uint64_t c2, uint64_t c1)
CPU cycle count difference.
uint64_t odp_cpu_cycles_resolution(void)
Resolution of CPU cycle count.
void odp_prefetch_store(const void *addr)
Prefetch into data cache for storing.
uint64_t odp_cpu_cycles(void)
Current CPU cycle count.
int odp_cpu_id(void)
CPU identifier.
int odp_cpu_count(void)
CPU count.
void odp_prefetch_l3(const void *addr)
Prefetch into L3 data cache.
void odp_prefetch_store_strm_l1(const void *addr)
Streaming prefetch into L1 data cache for storing.
void odp_prefetch_store_l1(const void *addr)
Prefetch into L1 data cache for storing.
void odp_prefetch_l1(const void *addr)
Prefetch into L1 data cache.
uint64_t odp_cpu_hz_max_id(int id)
Maximum CPU frequency of a CPU (in Hz)
void odp_prefetch_l2(const void *addr)
Prefetch into L2 data cache.
uint64_t odp_cpu_hz_max(void)
Maximum CPU frequency in Hz.
void odp_prefetch(const void *addr)
Prefetch into data cache.
void odp_prefetch_store_l2(const void *addr)
Prefetch into L2 data cache for storing.
uint64_t odp_cpu_cycles_max(void)
Maximum CPU cycle count.
void odp_prefetch_strm_l1(const void *addr)
Streaming prefetch into L1 data cache.
uint64_t odp_cpu_hz(void)
Current CPU frequency in Hz.
void odp_prefetch_store_l3(const void *addr)
Prefetch into L3 data cache for storing.
const char * odp_cpu_model_str_id(int id)
CPU model name of a CPU.
uint64_t odp_cpu_hz_id(int id)
Current CPU frequency of a CPU (in Hz)