HC_LOAD_FUNC(nvml, nvmlDeviceGetFanSpeed, NVML_DEVICE_GET_FAN_SPEED, NVML, 0)
HC_LOAD_FUNC(nvml, nvmlDeviceGetPowerUsage, NVML_DEVICE_GET_POWER_USAGE, NVML, 0)
HC_LOAD_FUNC(nvml, nvmlDeviceGetUtilizationRates, NVML_DEVICE_GET_UTILIZATION_RATES, NVML, 0)
+ HC_LOAD_FUNC(nvml, nvmlDeviceGetClockInfo, NVML_DEVICE_GET_CLOCKINFO, NVML, 0)
return 0;
}
return nvml_rc;
}
+
+nvmlReturn_t hm_NVML_nvmlDeviceGetClockInfo (NVML_PTR *nvml, nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock)
+{
+ if (!nvml) return -1;
+
+ nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetClockInfo (device, type, clock);
+
+ if (nvml_rc != NVML_SUCCESS)
+ {
+ *clock = -1;
+
+ //const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc);
+
+ //log_info ("WARN: %s %d %s\n", "nvmlDeviceGetUtilizationRates()", nvml_rc, string);
+ }
+
+ return nvml_rc;
+}
+