API Reference Manual 1.51.0
Loading...
Searching...
No Matches
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 * Copyright (c) 2025 Nokia
4 */
5
12#ifndef ODP_API_SPEC_CPU_H_
13#define ODP_API_SPEC_CPU_H_
14#include <odp/visibility_begin.h>
15
16#include <odp/api/std_types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
35int odp_cpu_id(void);
36
45int odp_cpu_count(void);
46
54const char *odp_cpu_model_str(void);
55
65const char *odp_cpu_model_str_id(int id);
66
76uint64_t odp_cpu_hz(void);
77
89uint64_t odp_cpu_hz_id(int id);
90
100uint64_t odp_cpu_hz_max(void);
101
113uint64_t odp_cpu_hz_max_id(int id);
114
131uint64_t odp_cpu_cycles(void);
132
144
157uint64_t odp_cpu_cycles_diff(uint64_t c2, uint64_t c1);
158
168uint64_t odp_cpu_cycles_max(void);
169
181
189void odp_cpu_pause(void);
190
199void odp_prefetch(const void *addr);
200
208void odp_prefetch_l1(const void *addr);
209
217void odp_prefetch_l2(const void *addr);
218
226void odp_prefetch_l3(const void *addr);
227
236void odp_prefetch_store(const void *addr);
237
245void odp_prefetch_store_l1(const void *addr);
246
254void odp_prefetch_store_l2(const void *addr);
255
263void odp_prefetch_store_l3(const void *addr);
264
273void odp_prefetch_strm_l1(const void *addr);
274
283void odp_prefetch_store_strm_l1(const void *addr);
284
292void odp_prefetch_l1i(const void *addr);
293
298#ifdef __cplusplus
299}
300#endif
301
302#include <odp/visibility_end.h>
303#endif
Standard C language types and definitions for ODP.
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.
const char * odp_cpu_model_str_id(int id)
CPU model name of a CPU.
void odp_prefetch_store_strm_l1(const void *addr)
Streaming prefetch into L1 data cache for storing.
void odp_prefetch_l1i(const void *addr)
Prefetch into L1 instruction cache.
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.
const char * odp_cpu_model_str(void)
CPU model name of this CPU.
uint64_t odp_cpu_cycles_strict(void)
Current CPU cycle count (strict)
void odp_prefetch_store_l3(const void *addr)
Prefetch into L3 data cache for storing.
uint64_t odp_cpu_hz_id(int id)
Current CPU frequency of a CPU (in Hz)