ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::KokkosExecutor< Space > Class Template Reference

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

Detailed description

template<class Space = Kokkos::DefaultHostExecutionSpace>
class ADS::KokkosExecutor< Space >

the executor on an execution space of the host of Kokkos

Constructor and destructor documentation

◆ KokkosExecutor()

template<class Space = Kokkos::DefaultHostExecutionSpace>
ADS::KokkosExecutor< Space >::KokkosExecutor ( Space s = Space())
inlineexplicit

the executor on the instance \( s \) of the space (the default one if none is given)

Member function documentation

◆ bulk()

template<class Space = Kokkos::DefaultHostExecutionSpace>
template<class F>
void ADS::KokkosExecutor< Space >::bulk ( std::size_t n,
F && f )
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}} \]

◆ concurrency()

template<class Space = Kokkos::DefaultHostExecutionSpace>
std::size_t ADS::KokkosExecutor< Space >::concurrency ( void ) const
inlinenodiscard

the concurrency of the space


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