13 #ifndef EIGEN_CXX11_THREADPOOL_BARRIER_H
14 #define EIGEN_CXX11_THREADPOOL_BARRIER_H
26 unsigned int v =
state_.fetch_sub(2, std::memory_order_acq_rel) - 2;
34 std::unique_lock<std::mutex>
l(
mu_);
41 unsigned int v =
state_.fetch_or(1, std::memory_order_acq_rel);
42 if ((
v >> 1) == 0)
return;
43 std::unique_lock<std::mutex>
l(
mu_);
51 std::condition_variable
cv_;
67 #endif // EIGEN_CXX11_THREADPOOL_BARRIER_H