Function validate_thread_count¶
Defined in File omp_config.h
Function Documentation¶
-
inline std::string validate_thread_count(int requested, int physical_cores, int scheduler_cpus, int &actual, bool &user_override)¶
Validate and clamp the requested thread count.
Logic:
requested <= 0 : auto mode, use half of physical cores
requested > physical_cores : clamp to default (half), warn user
otherwise : respect the explicit user request
- Parameters:
requested – User-requested thread count (0 = auto)
physical_cores – Detected physical cores
actual – [out] Actual thread count to use
user_override – [out] Whether the user explicitly requested threads
- Returns:
Notification/warning message for the user