| 18 | using mutex = HighsMutex; |
| 19 | |
| 20 | inline void initialize_scheduler(int numThreads = 0) { |
| 21 | if (numThreads == 0) { |
| 22 | #ifdef HIGHS_NO_DEFAULT_THREADS |
| 23 | numThreads = 1; |
| 24 | #else |
| 25 | numThreads = (std::thread::hardware_concurrency() + 1) / 2; |
| 26 | #endif |
| 27 | } |
| 28 | HighsTaskExecutor::initialize(numThreads); |
| 29 | } |
| 30 | |
| 31 | inline int num_threads() { |
| 32 | return HighsTaskExecutor::getThisWorkerDeque()->getNumWorkers(); |
no test coverage detected