|
ADS
Algorithms and Data Structures
|
the executor on an execution space of the host of Kokkos More...
#include <ADS/interop/parallel/KokkosExecutor.h>
Public member functions | |
| KokkosExecutor (Space s=Space()) | |
| the executor on the instance \( s \) of the space (the default one if none is given) | |
| std::size_t | concurrency (void) const |
| the concurrency of the space | |
| template<class F> | |
| void | bulk (std::size_t n, F &&f) |
| the calls \( f( 0 ) , \ldots , f( n - 1 ) \) by a parallel_for of the space, in order on the calling thread inside a call | |
the executor on an execution space of the host of Kokkos
|
inlineexplicit |
the executor on the instance \( s \) of the space (the default one if none is given)
|
inline |
the calls \( f( 0 ) , \ldots , f( n - 1 ) \) by a parallel_for of the space, 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 or a kernel of the space}\ \textbf{then} \cr 3 & \qquad \textbf{for}\ i \gets 0\ \textbf{to}\ n - 1\ \textbf{do} \ f( i ) \cr 4 & \quad \textbf{else}\ \mathrm{parallelFor}( \mathrm{RangePolicy}( 0 , n , \text{chunks of 1} ) , i \mapsto f( i ) \text{ marked } \text{inside} );\ \mathrm{fence}() \cr 5 & \quad \text{throw again the first exception of the calls, if any} \end{array}} \]
|
inlinenodiscard |
the concurrency of the space