Esempio n. 1
0
        private NvGPUThermalSettings GetThermalSettings()
        {
            NvGPUThermalSettings settings = new NvGPUThermalSettings();

            settings.Version = NVAPI.GPU_THERMAL_SETTINGS_VER;
            settings.Count   = NVAPI.MAX_THERMAL_SENSORS_PER_GPU;
            settings.Sensor  = new NvSensor[NVAPI.MAX_THERMAL_SENSORS_PER_GPU];
            if (!(NVAPI.NvAPI_GPU_GetThermalSettings != null &&
                  NVAPI.NvAPI_GPU_GetThermalSettings(handle, (int)NvThermalTarget.ALL,
                                                     ref settings) == NvStatus.OK))
            {
                settings.Count = 0;
            }
            return(settings);
        }