diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-03-06 11:52:04 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-03-06 11:52:04 -0800 |
commit | f4ec8edea8a8396e1b744db9ea61de2c451bd15d (patch) | |
tree | a43428021f25ad457e71dad94d079d3615a2a3a8 /unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h | |
parent | 4d808e834ab3ad50aedf0e072b7486db39b799a2 (diff) |
Add macro EIGEN_AVOID_THREAD_LOCAL to make it possible to manually disable the use of thread_local.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h index 7229839ac..696c2d03b 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h @@ -10,6 +10,14 @@ #ifndef EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H #define EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H +#ifdef EIGEN_AVOID_THREAD_LOCAL + +#ifdef EIGEN_THREAD_LOCAL +#undef EIGEN_THREAD_LOCAL +#endif + +#else + #if EIGEN_MAX_CPP_VER >= 11 && \ ((EIGEN_COMP_GNUC && EIGEN_GNUC_AT_LEAST(4, 8)) || \ __has_feature(cxx_thread_local) || \ @@ -52,4 +60,6 @@ #endif #endif // defined(__ANDROID__) && defined(__clang__) +#endif // EIGEN_AVOID_THREAD_LOCAL + #endif // EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H |