16 #ifndef GRPPI_COMMON_PATTERNS_H
17 #define GRPPI_COMMON_PATTERNS_H
20 #include <type_traits>
32 template <
typename E,
typename Stage,
typename ... Stages>
36 std::tuple<Stage , Stages ...>
stages;
41 template <
typename E,
class Combiner,
typename Identity>
54 template <
typename E,
class Operation>
64 template <
typename E,
class Operation>
96 template <
typename return_type,
typename ... Ts>
104 template <
typename Input,
typename Transformer>
105 using result_type =
typename std::result_of<Transformer(Input)>::type;
110 template <
typename Input,
typename Transformer>
119 template <
typename Input,
typename Transformer,
typename ... Other>
Definition: patterns.h:56
int farmtype
Definition: patterns.h:60
Operation task
Definition: patterns.h:58
farm_info(E &s, Operation f)
Definition: patterns.h:61
E & exectype
Definition: patterns.h:59
Definition: patterns.h:66
filter_info(E &s, Operation f)
Definition: patterns.h:71
Operation task
Definition: patterns.h:68
int filtertype
Definition: patterns.h:70
E & exectype
Definition: patterns.h:69
Definition: patterns.h:33
std::tuple< Stage, Stages ... > stages
Definition: patterns.h:36
pipeline_info(E &p, std::tuple< Stage, Stages ... > st)
Definition: patterns.h:38
E & exectype
Definition: patterns.h:35
pipeline_info(E &p, Stage s, Stages ... sts)
Definition: patterns.h:37
Definition: patterns.h:43
Combiner combine_op
Definition: patterns.h:45
Identity identity
Definition: patterns.h:48
int window_size
Definition: patterns.h:46
E & exectype
Definition: patterns.h:49
int offset
Definition: patterns.h:47
reduction_info(E &s, int ws, int off, Identity iden, Combiner comb)
Definition: patterns.h:50
Definition: callable_traits.h:21
constexpr bool is_no_pattern
Definition: patterns.h:75
std::enable_if_t< is_pattern< T >, int > requires_pattern
Definition: patterns.h:90
typename std::result_of< Transformer(Input)>::type result_type
Determines the return type of applying a function on a input type.
Definition: patterns.h:105
constexpr bool is_pattern
Definition: patterns.h:84
std::enable_if_t< is_no_pattern< T >, int > requires_no_pattern
Definition: patterns.h:87
Determines the return type after applying a list of transformers (stages) on a input type.
Definition: patterns.h:97
return_type type
Definition: patterns.h:98