GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
execution_traits.h
Go to the documentation of this file.
1 
21 #ifndef GRPPI_COMMON_EXECUTION_TRAITS_H
22 #define GRPPI_COMMON_EXECUTION_TRAITS_H
23 
24 #include <type_traits>
25 
26 namespace grppi {
27 
32 template <typename E>
33 constexpr bool is_supported() { return false; }
34 
35 template <typename E>
37  std::enable_if_t<is_supported<E>(), int>;
38 
39 template <typename E>
41  std::enable_if_t<!is_supported<E>(), int>;
42 
47 template <typename E>
48 constexpr bool supports_map() { return false; }
49 
54 template <typename E>
55 constexpr bool supports_reduce() { return false; }
56 
61 template <typename E>
62 constexpr bool supports_map_reduce() { return false; }
63 
68 template <typename E>
69 constexpr bool supports_stencil() { return false; }
70 
75 template <typename E>
76 constexpr bool supports_divide_conquer() { return false; }
77 
82 template <typename E>
83 constexpr bool supports_pipeline() { return false; }
84 
85 } // end namespace grppi
86 
87 #endif
Definition: callable_traits.h:26
constexpr bool supports_divide_conquer()
Determines if an execution policy supports the divide-conquer pattern.
Definition: execution_traits.h:76
constexpr bool supports_map_reduce()
Determines if an execution policy supports the map-reduce pattern.
Definition: execution_traits.h:62
std::enable_if_t< is_supported< E >(), int > requires_execution_supported
Definition: execution_traits.h:37
constexpr bool is_supported()
Determines if an execution policy is supported in the current compilation.
Definition: execution_traits.h:33
constexpr bool supports_map()
Determines if an execution policy supports the map pattern.
Definition: execution_traits.h:48
constexpr bool supports_stencil()
Determines if an execution policy supports the stencil pattern.
Definition: execution_traits.h:69
constexpr bool supports_reduce()
Determines if an execution policy supports the reduce pattern.
Definition: execution_traits.h:55
std::enable_if_t<!is_supported< E >(), int > requires_execution_not_supported
Definition: execution_traits.h:41
constexpr bool supports_pipeline()
Determines if an execution policy supports the pipeline pattern.
Definition: execution_traits.h:83