Class ConcurrentBarrier

Class Documentation

class uitsl::ConcurrentBarrier

Block until all threads reach the barrier or a timeout is exceeded.

Adapted from https://stackoverflow.com/a/24777186.

Template Parameters
  • Timer_T: class to manage timeout check.

Public Functions

ConcurrentBarrier(const size_t expected_threads, const MPI_Comm &comm_ = MPI_COMM_WORLD)
void ArriveAndWait()
template<typename Timer>
void ArriveAndWaitWhile(const Timer &timer)

Blocks until all threads have called WaitFor, or timer expires.