2022-05-26 16:25:30 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2022-05-26 18:46:56 +00:00
|
|
|
#include <stdint.h>
|
2022-05-26 16:25:30 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-05-26 20:18:49 +00:00
|
|
|
struct topo_desc;
|
|
|
|
|
2022-05-26 16:25:30 +00:00
|
|
|
int
|
|
|
|
topo_num_core();
|
|
|
|
|
|
|
|
int
|
|
|
|
topo_num_numa();
|
|
|
|
|
|
|
|
int
|
|
|
|
topo_core_to_numa(int coreid);
|
|
|
|
|
|
|
|
void
|
|
|
|
topo_destroy();
|
|
|
|
|
|
|
|
int
|
2022-05-26 20:18:49 +00:00
|
|
|
topo_init(int enable_alloc, int verbose);
|
2022-05-26 16:25:30 +00:00
|
|
|
|
|
|
|
void *
|
|
|
|
topo_malloc(unsigned int node, size_t size);
|
|
|
|
|
|
|
|
void
|
|
|
|
topo_free(unsigned int node, void * addr);
|
|
|
|
|
|
|
|
uint64_t
|
|
|
|
topo_uptime_ns();
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|