mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-01 01:32:00 +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
|
#endif
|
||||||
} else if (action == GetAction) {
|
} else if (action == GetAction) {
|
||||||
eigen_internal_assert(v != nullptr);
|
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;
|
*v = m_maxThreads;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
eigen_internal_assert(false);
|
eigen_internal_assert(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user