33 pthread_cond_t
sem[2];
45 unsigned long long now = getElapsedTime();
48 cout <<
"time: " << (now -
start_time)/1e9 <<
" "
50 <<
" (" << s <<
")\n";
54 VERIFY(pthread_cond_broadcast(&
sem[my_parity]));
56 while (!
count[my_parity] == 0) {
76 #endif // BARRIER_HPP__
int count[2]
Definition: barrier.hpp:32
unsigned long long start_time
Definition: mesh.cpp:34
pthread_cond_t sem[2]
Definition: barrier.hpp:33
bool verbose
Definition: mesh.cpp:44
pthread_mutex_t mutex
Definition: barrier.hpp:31
#define VERIFY(E)
Definition: macros.hpp:25
~barrier()
Definition: barrier.hpp:69
void wait(string s)
Definition: barrier.hpp:35
Definition: barrier.hpp:28
d_lock io_lock
Definition: mesh.cpp:33
int parity
Definition: barrier.hpp:30
barrier(int n)
Definition: barrier.hpp:62
int participants
Definition: barrier.hpp:29
unsigned long long last_time
Definition: mesh.cpp:35