Fix OPENMP ifdefs.

This commit is contained in:
Atgeirr Flø Rasmussen 2023-06-16 08:46:18 +02:00
parent 630f620b18
commit 8c79af321a

View File

@ -99,12 +99,14 @@ public:
#endif
#ifdef _OPENMP
// actually limit the number of threads and get the number of threads which are
// used in the end.
// actually limit the number of threads
if (numThreads_ > 0)
omp_set_num_threads(numThreads_);
#endif
}
#ifdef _OPENMP
// get the number of threads which are used in the end.
numThreads_ = omp_get_max_threads();
#endif
}