GrPPI  1.0
Generic and Reusable Parallel Pattern Interface
Classes | Namespaces | Macros | Functions
dynamic_execution.h File Reference
#include "../seq/sequential_execution.h"
#include "../native/parallel_execution_native.h"
#include "../tbb/parallel_execution_tbb.h"
#include "../omp/parallel_execution_omp.h"
#include "../ff/parallel_execution_ff.h"
#include <memory>
Include dependency graph for dynamic_execution.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  grppi::dynamic_execution
 

Namespaces

 grppi
 

Macros

#define GRPPI_TRY_PATTERN(E, PATTERN, ...)
 
#define GRPPI_PATTERN_NOT_IMPLEMENTED(PATTERN, ...)   throw std::runtime_error{"Pattern " #PATTERN " not implemented"};
 
#define GRPPI_TRY_PATTERN_OMP(PATTERN, ...)   GRPPI_TRY_PATTERN(parallel_execution_omp,PATTERN,__VA_ARGS__)
 
#define GRPPI_TRY_PATTERN_TBB(PATTERN, ...)   GRPPI_TRY_PATTERN(parallel_execution_tbb,PATTERN,__VA_ARGS__)
 
#define GRPPI_TRY_PATTERN_FF(PATTERN, ...)
 
#define GRPPI_TRY_PATTERN_ALL(...)
 
#define GRPPI_TRY_PATTERN_ALL_NOFF(...)
 

Functions

template<>
constexpr bool grppi::is_supported< dynamic_execution > ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<>
constexpr bool grppi::supports_map< dynamic_execution > ()
 Determines if an execution policy supports the map pattern. More...
 
template<>
constexpr bool grppi::supports_reduce< dynamic_execution > ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<>
constexpr bool grppi::supports_map_reduce< dynamic_execution > ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<>
constexpr bool grppi::supports_stencil< dynamic_execution > ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<>
constexpr bool grppi::supports_divide_conquer< dynamic_execution > ()
 Determines if an execution policy supports the divide/conquer pattern. More...
 
template<>
constexpr bool grppi::supports_pipeline< dynamic_execution > ()
 Determines if an execution policy supports the pipeline pattern. More...
 

Macro Definition Documentation

◆ GRPPI_PATTERN_NOT_IMPLEMENTED

#define GRPPI_PATTERN_NOT_IMPLEMENTED (   PATTERN,
  ... 
)    throw std::runtime_error{"Pattern " #PATTERN " not implemented"};

◆ GRPPI_TRY_PATTERN

#define GRPPI_TRY_PATTERN (   E,
  PATTERN,
  ... 
)
Value:
{\
if (supports_##PATTERN<E>()) {\
auto * ex = dynamic_cast<execution<E>*>(execution_.get());\
if (ex) {\
return ex->ex_.PATTERN(__VA_ARGS__);\
}\
}\
}

◆ GRPPI_TRY_PATTERN_ALL

#define GRPPI_TRY_PATTERN_ALL (   ...)
Value:
GRPPI_TRY_PATTERN(sequential_execution, __VA_ARGS__) \
GRPPI_TRY_PATTERN(parallel_execution_native, __VA_ARGS__) \
GRPPI_TRY_PATTERN_OMP(__VA_ARGS__) \
GRPPI_TRY_PATTERN_TBB(__VA_ARGS__) \
GRPPI_TRY_PATTERN_FF(__VA_ARGS__) \
GRPPI_PATTERN_NOT_IMPLEMENTED(__VA_ARGS__)\
#define GRPPI_TRY_PATTERN(E, PATTERN,...)
Definition: dynamic_execution.h:248

◆ GRPPI_TRY_PATTERN_ALL_NOFF

#define GRPPI_TRY_PATTERN_ALL_NOFF (   ...)
Value:
GRPPI_TRY_PATTERN(sequential_execution, __VA_ARGS__) \
GRPPI_TRY_PATTERN(parallel_execution_native, __VA_ARGS__) \
GRPPI_TRY_PATTERN_OMP(__VA_ARGS__) \
GRPPI_TRY_PATTERN_TBB(__VA_ARGS__) \
GRPPI_PATTERN_NOT_IMPLEMENTED(__VA_ARGS__)\

◆ GRPPI_TRY_PATTERN_FF

#define GRPPI_TRY_PATTERN_FF (   PATTERN,
  ... 
)

◆ GRPPI_TRY_PATTERN_OMP

#define GRPPI_TRY_PATTERN_OMP (   PATTERN,
  ... 
)    GRPPI_TRY_PATTERN(parallel_execution_omp,PATTERN,__VA_ARGS__)

◆ GRPPI_TRY_PATTERN_TBB

#define GRPPI_TRY_PATTERN_TBB (   PATTERN,
  ... 
)    GRPPI_TRY_PATTERN(parallel_execution_tbb,PATTERN,__VA_ARGS__)