|
ADS
Algorithms and Data Structures
|
the executor on a scheduler of the senders More...
#include <ADS/interop/parallel/SenderExecutor.h>
Public member functions | |
| SenderExecutor (Sch s, std::size_t p) | |
| the executor of the scheduler \( s \), which tells the algorithms of ADS that it has \( p \) threads | |
| std::size_t | concurrency (void) const |
| the number of threads given to the constructor | |
| const Sch & | scheduler (void) const |
| the scheduler | |
| template<class F> | |
| void | bulk (std::size_t n, F &&f) |
| the calls \( f( 0 ) , \ldots , f( n - 1 ) \) by a bulk sender on the scheduler, in order on the calling thread inside a call | |
the executor on a scheduler of the senders
|
inline |
the executor of the scheduler \( s \), which tells the algorithms of ADS that it has \( p \) threads
|
inline |
the calls \( f( 0 ) , \ldots , f( n - 1 ) \) by a bulk sender on the scheduler, in order on the calling thread inside a call
In pseudocode (beyond the book):
\[\class{pseudocode}{\begin{array}{r@{\quad}l} 1 & \textbf{procedure}\ \mathrm{bulk}( n , f ) \cr 2 & \quad \textbf{if}\ n \le 1\ \textbf{or}\ p = 1\ \textbf{or} \ \text{inside a call of the executor}\ \textbf{then} \cr 3 & \qquad \textbf{for}\ i \gets 0\ \textbf{to}\ n - 1\ \textbf{do} \ f( i ) \cr 4 & \quad \textbf{else}\ \mathrm{syncWait}( \mathrm{schedule}( s ) \mid \mathrm{bulk}( \mathit{par} , n , i \mapsto f( i ) \text{ marked inside} ) ) \cr 5 & \quad \text{throw again the first exception of the calls, if any} \end{array}} \]
|
inlinenodiscard |
the number of threads given to the constructor
|
inlinenodiscard |
the scheduler