interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / tests / cabi / golden / ombrfx.h

40 lines · 1500 bytes Raw Blame History
1#ifndef OMBR_OMBRFX_H
2#define OMBR_OMBRFX_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6#ifndef NVML_NO_UNVERSIONED_FUNC_DEFS
7#define nvmlDeviceGetCount nvmlDeviceGetCount_v2
8#define nvmlDeviceGetHandleByIndex nvmlDeviceGetHandleByIndex_v2
9#endif
10#define NVML_DEVICE_NAME_BUFFER_SIZE 64
11typedef enum nvmlReturn_enum {
12 NVML_SUCCESS = 0,
13 NVML_ERROR_INVALID_ARGUMENT = 2,
14 NVML_ERROR_INSUFFICIENT_SIZE = 7,
15 NVML_ERROR_UNKNOWN = 999
16} nvmlReturn_t;
17typedef struct nvmlDevice_st *nvmlDevice_t;
18typedef struct nvmlMemory_st {
19 unsigned long long total;
20 unsigned long long free;
21 unsigned long long used;
22} nvmlMemory_t;
23typedef struct nvmlProcessInfo_v2_st {
24 unsigned int pid;
25 unsigned long long usedGpuMemory;
26 unsigned int gpuInstanceId;
27 unsigned int computeInstanceId;
28} nvmlProcessInfo_v2_t, nvmlProcessInfo_t;
29nvmlReturn_t nvmlDeviceGetCount_v2(unsigned int *deviceCount);
30nvmlReturn_t nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t *device);
31nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length);
32nvmlReturn_t nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t *memory);
33nvmlReturn_t nvmlDeviceGetComputeRunningProcesses_v2(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_v2_t *infos);
34const char *nvmlErrorString(nvmlReturn_t result);
35nvmlReturn_t ombrFxBump(unsigned long long *value);
36nvmlReturn_t ombrFxSum(unsigned long long seed, unsigned long long *sum);
37#ifdef __cplusplus
38}
39#endif
40#endif