ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::Sequential Class Reference

the executor of the calling thread alone, which makes the calls in their order More...

#include <ADS/parallel/Executor.h>

Public types

using lock_type = std::mutex
 the lock of the data shared by the workers

Static public member functions

static constexpr std::size_t concurrency (void)
 the number of threads, 1
template<class F>
static void bulk (std::size_t n, F &&f)
 the calls \( f( 0 ) , \ldots , f( n - 1 ) \), in this order, on the calling thread
template<class F, class G>
static void invoke (F &&f, G &&g)
 the call f() and then the call g(), on the calling thread
template<class F>
static void run (std::size_t p, F &&f)
 the call \( f( 0 ) \) on the calling thread, the only worker, if \( p = 1 \) (none if \( p = 0 \))

Detailed description

the executor of the calling thread alone, which makes the calls in their order

Member typedef documentation

◆ lock_type

using ADS::Sequential::lock_type = std::mutex

the lock of the data shared by the workers

Member function documentation

◆ bulk()

template<class F>
void ADS::Sequential::bulk ( std::size_t n,
F && f )
inlinestatic

the calls \( f( 0 ) , \ldots , f( n - 1 ) \), in this order, on the calling thread

◆ concurrency()

constexpr std::size_t ADS::Sequential::concurrency ( void )
inlinestaticnodiscardconstexpr

the number of threads, 1

◆ invoke()

template<class F, class G>
void ADS::Sequential::invoke ( F && f,
G && g )
inlinestatic

the call f() and then the call g(), on the calling thread

◆ run()

template<class F>
void ADS::Sequential::run ( std::size_t p,
F && f )
inlinestatic

the call \( f( 0 ) \) on the calling thread, the only worker, if \( p = 1 \) (none if \( p = 0 \))

Precondition
\( p \le 1 \)

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