You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
586 B
C
37 lines
586 B
C
#include <thread>
|
|
#include <inttypes.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "nvctrl.h"
|
|
#ifdef HAVE_NVML
|
|
#include "nvidia_info.h"
|
|
#endif
|
|
|
|
struct amdgpu_files
|
|
{
|
|
FILE *busy;
|
|
FILE *temp;
|
|
FILE *vram_total;
|
|
FILE *vram_used;
|
|
FILE *core_clock;
|
|
FILE *memory_clock;
|
|
FILE *power_usage;
|
|
};
|
|
|
|
extern amdgpu_files amdgpu;
|
|
|
|
struct gpuInfo{
|
|
int load;
|
|
int temp;
|
|
float memoryUsed;
|
|
float memoryTotal;
|
|
int MemClock;
|
|
int CoreClock;
|
|
int powerUsage;
|
|
};
|
|
|
|
extern struct gpuInfo gpu_info;
|
|
|
|
void getNvidiaGpuInfo(void);
|
|
void getAmdGpuInfo(void);
|