mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-31 01:03:38 +08:00
use omp_get_max_threads if setNbThreads is not set
This commit is contained in:
parent
a32db43966
commit
24e0c2a125
@ -153,7 +153,14 @@ inline void manage_multi_threading(Action action, int* v) {
|
||||
#endif
|
||||
} else if (action == GetAction) {
|
||||
eigen_internal_assert(v != nullptr);
|
||||
#if defined(EIGEN_HAS_OPENMP)
|
||||
if (m_maxThreads > 0)
|
||||
*v = m_maxThreads;
|
||||
else
|
||||
*v = omp_get_max_threads();
|
||||
#else
|
||||
*v = m_maxThreads;
|
||||
#endif
|
||||
} else {
|
||||
eigen_internal_assert(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user