40 #ifndef __BASE_BARRIER_HH__
41 #define __BASE_BARRIER_HH__
43 #include <condition_variable>
82 #endif // __BASE_BARRIER_HH__
unsigned numLeft
Number of threads remaining for the current generation.
unsigned generation
Generation of this barrier.
unsigned numWaiting
Number of threads we should be waiting for before completing the barrier.
std::mutex bMutex
Mutex to protect access to numLeft and generation.
std::condition_variable bCond
Condition variable for waiting on barrier.
Barrier(unsigned _numWaiting)