| MADNESS
    version 0.9
    | 
#include <worldmutex.h>
| Public Member Functions | |
| Barrier (int nthread) | |
| void | register_thread (int id, volatile bool *pflag) | 
| Each thread calls this once before first use.  More... | |
| bool | enter (const int id) | 
| Each thread calls this with its id (0,..,nthread-1) to enter the barrier.  More... | |
| 
 | inline | 
| 
 | inline | 
Each thread calls this with its id (0,..,nthread-1) to enter the barrier.
The thread last to enter the barrier returns true. Others return false.
All calls to the barrier must use the same value of nthread.
References madness::cpu_relax(), madness::AtomicInt::dec_and_test(), and MADNESS_EXCEPTION.
Referenced by madness::TaskThreadEnv::barrier().
| 
 | inline | 
Each thread calls this once before first use.
id should be the thread id (0,..,nthread-1) and pflag a pointer to thread-local bool (probably in the thread's stack)
References MADNESS_EXCEPTION.
 1.8.8
 1.8.8