| 60 | } |
| 61 | |
| 62 | inline int get_max_threads() { |
| 63 | #if defined(_OPENMP) |
| 64 | return omp_get_max_threads(); |
| 65 | #else |
| 66 | unsigned hc = std::thread::hardware_concurrency(); |
| 67 | return hc == 0 ? 1 : int(hc); |
| 68 | #endif |
| 69 | } |
| 70 | |
| 71 | inline int adjust_num_threads(int m) { |
| 72 | int actual_nth = get_max_threads(); |
no outgoing calls
no test coverage detected