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.
|
#include "nvctrl.h"
|
|
Display *display = XOpenDisplay(NULL);
|
|
|
|
int nvidiaMemUsed(){
|
|
int ret;
|
|
XNVCTRLQueryTargetAttribute(display,
|
|
NV_CTRL_TARGET_TYPE_GPU,
|
|
0,
|
|
0,
|
|
NV_CTRL_USED_DEDICATED_GPU_MEMORY,
|
|
&ret);
|
|
return ret;
|
|
} |