HMLP: High-performance Machine Learning Primitives
|
Public Member Functions | |
void | Barrier (int size) |
Public Attributes | |
void * | buffer = NULL |
volatile bool | barrier_sense = false |
volatile int | barrier_threads_arrived = 0 |
void hmlp::tci::Context::Barrier | ( | int | size | ) |
Early return if there is only one thread.
Get my barrier sense.
Check how many threads in the communicator have arrived.
If I am the last thread to arrive, then reset.
Otherwise, wait until barrier_sense is changed.