Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Dune::Fufem::Barrier Class Reference

A barrier primitive for multi-threaded code. More...

#include <dune/fufem/parallel/barrier.hh>

Public Member Functions

 Barrier (std::size_t count)
 
void arrive_and_wait ()
 

Detailed Description

A barrier primitive for multi-threaded code.

This implements a subset of C++20's std::barrier interface which provides a simple synchronization barrier. It's created with a counter. Each thread calling arrive_and_wait() will decrement the counter and wait until it reached zero. Once this has happened, the counter is reset for the next phase.

Constructor & Destructor Documentation

◆ Barrier()

Dune::Fufem::Barrier::Barrier ( std::size_t  count)
inline

Member Function Documentation

◆ arrive_and_wait()

void Dune::Fufem::Barrier::arrive_and_wait ( )
inline

The documentation for this class was generated from the following file: