mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-21 18:52:49 +00:00
Remove redundant dlsyms
This commit is contained in:
parent
5a4b11c659
commit
436cef255a
1 changed files with 0 additions and 7 deletions
|
@ -108,9 +108,6 @@ namespace NvidiaGPU
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUUtilization util;
|
GPUUtilization util;
|
||||||
typedef int (*PFN_nvmlDeviceGetUtilizationRates)(void*, GPUUtilization*);
|
|
||||||
auto nvmlDeviceGetUtilizationRates = (PFN_nvmlDeviceGetUtilizationRates)dlsym(nvmldl, "nvmlDeviceGetUtilizationRates");
|
|
||||||
|
|
||||||
int res = nvmlDeviceGetUtilizationRates(nvmlGPUHandle, &util);
|
int res = nvmlDeviceGetUtilizationRates(nvmlGPUHandle, &util);
|
||||||
ASSERT(res == 0, "Failed getting utilization (Error: " << res << ")!");
|
ASSERT(res == 0, "Failed getting utilization (Error: " << res << ")!");
|
||||||
return util;
|
return util;
|
||||||
|
@ -124,8 +121,6 @@ namespace NvidiaGPU
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef int (*PFN_nvmlDeviceGetTemperature)(void*, uint32_t, uint32_t*);
|
|
||||||
auto nvmlDeviceGetTemperature = (PFN_nvmlDeviceGetTemperature)dlsym(nvmldl, "nvmlDeviceGetTemperature");
|
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
int res = nvmlDeviceGetTemperature(nvmlGPUHandle, 0, &temp);
|
int res = nvmlDeviceGetTemperature(nvmlGPUHandle, 0, &temp);
|
||||||
ASSERT(res == 0, "Failed getting temperature (Error: " << res << ")!");
|
ASSERT(res == 0, "Failed getting temperature (Error: " << res << ")!");
|
||||||
|
@ -140,8 +135,6 @@ namespace NvidiaGPU
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef int (*PFN_nvmlDeviceGetMemoryInfo)(void*, VRAM*);
|
|
||||||
auto nvmlDeviceGetMemoryInfo = (PFN_nvmlDeviceGetMemoryInfo)dlsym(nvmldl, "nvmlDeviceGetMemoryInfo");
|
|
||||||
VRAM mem;
|
VRAM mem;
|
||||||
int res = nvmlDeviceGetMemoryInfo(nvmlGPUHandle, &mem);
|
int res = nvmlDeviceGetMemoryInfo(nvmlGPUHandle, &mem);
|
||||||
ASSERT(res == 0, "Failed getting memory (Error: " << res << ")!");
|
ASSERT(res == 0, "Failed getting memory (Error: " << res << ")!");
|
||||||
|
|
Loading…
Reference in a new issue