Make it possible to override the synchonization primitives used by the threadpool using macros.

This commit is contained in:
Rasmus Munk Larsen
2023-05-09 19:36:17 +00:00
parent 1321821e86
commit 96c42771d6
6 changed files with 27 additions and 17 deletions

View File

@@ -248,7 +248,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
EventCount ec_;
#ifndef EIGEN_THREAD_LOCAL
std::unique_ptr<Barrier> init_barrier_;
std::mutex per_thread_map_mutex_; // Protects per_thread_map_.
EIGEN_MUTEX per_thread_map_mutex_; // Protects per_thread_map_.
std::unordered_map<uint64_t, std::unique_ptr<PerThread>> per_thread_map_;
#endif