MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / initialize_scheduler

Function initialize_scheduler

highs/parallel/HighsParallel.h:20–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18using mutex = HighsMutex;
19
20inline 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
31inline int num_threads() {
32 return HighsTaskExecutor::getThisWorkerDeque()->getNumWorkers();

Callers 3

TestIpx.cppFile · 0.85

Calls 1

initializeFunction · 0.50

Tested by

no test coverage detected