21 #ifndef GRPPI_COMMON_PATTERNS_H 22 #define GRPPI_COMMON_PATTERNS_H 25 #include <type_traits> 37 template <
typename E,
typename Stage,
typename ... Stages>
41 std::tuple<Stage , Stages ...>
stages;
46 template <
typename E,
class Combiner,
typename Identity>
56 exectype{s}, window_size{ws}, offset{off}, identity{iden}, combine_op{comb} {}
59 template <
typename E,
class Operation>
66 farm_info(E &s,Operation f) : task{f}, exectype{s}, farmtype{} {};
69 template <
typename E,
class Operation>
76 filter_info(E &s,Operation f) : task{f}, exectype{s}, filtertype{} {};
101 template <
typename return_type,
typename ... Ts>
109 template <
typename Input,
typename Transformer>
110 using result_type =
typename std::result_of<Transformer(Input)>::type;
115 template <
typename Input,
typename Transformer>
124 template <
typename Input,
typename Transformer,
typename ... Other>
Definition: callable_traits.h:26
Operation task
Definition: patterns.h:63
Definition: patterns.h:70
E & exectype
Definition: patterns.h:64
Definition: patterns.h:47
Identity identity
Definition: patterns.h:53
Combiner combine_op
Definition: patterns.h:50
Definition: patterns.h:38
std::enable_if_t< is_pattern< T >, int > requires_pattern
Definition: patterns.h:95
farm_info(E &s, Operation f)
Definition: patterns.h:66
E & exectype
Definition: patterns.h:40
Determines the return type after appliying a list of transformers (stages) on a input type...
Definition: patterns.h:102
std::tuple< Stage, Stages... > stages
Definition: patterns.h:41
E & exectype
Definition: patterns.h:74
std::enable_if_t< is_no_pattern< T >, int > requires_no_pattern
Definition: patterns.h:92
constexpr bool is_pattern
Definition: patterns.h:89
int farmtype
Definition: patterns.h:65
return_type type
Definition: patterns.h:103
constexpr bool is_no_pattern
Definition: patterns.h:80
Definition: patterns.h:60
int filtertype
Definition: patterns.h:75
pipeline_info(E &p, Stage s, Stages...sts)
Definition: patterns.h:42
typename std::result_of< Transformer(Input)>::type result_type
Determines the return type of appliying a function on a input type.
Definition: patterns.h:110
int window_size
Definition: patterns.h:51
filter_info(E &s, Operation f)
Definition: patterns.h:76
pipeline_info(E &p, std::tuple< Stage, Stages... > st)
Definition: patterns.h:43
Operation task
Definition: patterns.h:73
E & exectype
Definition: patterns.h:54
int offset
Definition: patterns.h:52
reduction_info(E &s, int ws, int off, Identity iden, Combiner comb)
Definition: patterns.h:55