class barrier
Declaration
class barrier { /* full declaration omitted */ };Description
//////////////////////////////////////////////////////////////////////// A barrier can be used to synchronize a specific number of threads, blocking all of the entering threads until all of the threads have entered the barrier.
Declared at: libs/pika/synchronization/include/pika/synchronization/barrier.hpp:242
Method Overview
- public barrier(std::size_t number_of_threads)
- public void count_up()
- public void reset(std::size_t number_of_threads)
- public void wait()
- public ~barrier()
Methods
barrier(std::size_t number_of_threads)
barrier(std::size_t number_of_threads)Declared at: libs/pika/synchronization/include/pika/synchronization/barrier.hpp:251
Parameters
- std::size_t number_of_threads
void count_up()
void count_up()Description
The function \awill increase the number of \ato be waited in \afunction.
Declared at: libs/pika/synchronization/include/pika/synchronization/barrier.hpp:262
void reset(std::size_t number_of_threads)
void reset(std::size_t number_of_threads)Description
The function \awill reset the number of \aas given by the function parameter \athe newer coming \aexecuting the function\awill be waiting until \ais equal to \aThe last \aexiting the \afunction will notify the newer \awaiting and the newer \awill get the reset \aThe function \acan be executed while previous \aexecuting waiting after they have been waken up. Thus \acan not be reset to \awhich will break the comparison condition under the function \a
Declared at: libs/pika/synchronization/include/pika/synchronization/barrier.hpp:275
Parameters
- std::size_t number_of_threads
void wait()
void wait()Description
The function \awill block the number of entering \a(as given by the constructor parameter \areleasing all waiting threads as soon as the last \aentered this function.
Declared at: libs/pika/synchronization/include/pika/synchronization/barrier.hpp:258
~barrier()
~barrier()Declared at: libs/pika/synchronization/include/pika/synchronization/barrier.hpp:252