+
+ if (1)
+ {
+ hc_thread_mutex_lock (mux_adl);
+
+ for (uint device_id = 0; device_id < data.devices_cnt; device_id++)
+ {
+ hc_device_param_t *device_param = &data.devices_param[device_id];
+
+ if (device_param->skipped) continue;
+
+ if ((data.devices_param[device_id].device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
+
+ const int temperature = hm_get_temperature_with_device_id (device_id);
+
+ const int threshold = data.hm_device[device_id].gpu_temp_threshold_slowdown;
+
+ if (temperature >= threshold)
+ {
+ if (slowdown_warnings < 3)
+ {
+ if (data.quiet == 0) clear_prompt ();
+
+ log_info ("WARNING: Drivers temperature threshold (%dc) hit on GPU #%d, expect performance to drop...", threshold, device_id + 1);
+
+ if (slowdown_warnings == 2)
+ {
+ log_info ("");
+ }
+
+ if (data.quiet == 0) fprintf (stdout, "%s", PROMPT);
+ if (data.quiet == 0) fflush (stdout);
+
+ slowdown_warnings++;
+ }
+ }
+ else
+ {
+ slowdown_warnings = 0;
+ }
+ }
+
+ hc_thread_mutex_unlock (mux_adl);
+ }
+