GrPPI  0.2
Generic and Reusable Parallel Pattern Interface
patterns.h
Go to the documentation of this file.
1 
21 #ifndef GRPPI_COMMON_PATTERNS_H
22 #define GRPPI_COMMON_PATTERNS_H
23 
24 #include <tuple>
25 
26 namespace grppi{
27 
28 template <typename E,typename Stage, typename ... Stages>
30  public:
31  E & exectype;
32  std::tuple<Stage , Stages ...> stages;
33  pipeline_info(E &p, Stage s, Stages ... sts) : exectype{p}, stages{std::make_tuple(s, sts...)} {}
34  pipeline_info(E &p, std::tuple<Stage,Stages ...> st) : exectype{p} , stages{st} {}
35 };
36 
37 template <typename E,class Combiner, typename Identity>
39 {
40  public:
41  Combiner combine_op;
43  int offset;
44  Identity identity;
45  E & exectype;
46  reduction_info(E &s,int ws, int off, Identity iden, Combiner comb) :
47  exectype{s}, window_size{ws}, offset{off}, identity{iden}, combine_op{comb} {}
48 };
49 
50 template <typename E,class Operation>
51 class farm_info
52 {
53  public:
54  Operation task;
55  E & exectype;
56  int farmtype;
57  farm_info(E &s,Operation f) : task{f}, exectype{s}, farmtype{} {};
58 };
59 
60 template <typename E,class Operation>
62 {
63  public:
64  Operation task;
65  E & exectype;
67  filter_info(E &s,Operation f) : task{f}, exectype{s}, filtertype{} {};
68 };
69 
70 } // end namespace grppi
71 
72 #endif
Definition: callable_traits.h:24
Operation task
Definition: patterns.h:54
Definition: patterns.h:61
E & exectype
Definition: patterns.h:55
Definition: patterns.h:38
Identity identity
Definition: patterns.h:44
Combiner combine_op
Definition: patterns.h:41
Definition: patterns.h:29
farm_info(E &s, Operation f)
Definition: patterns.h:57
E & exectype
Definition: patterns.h:31
std::tuple< Stage, Stages... > stages
Definition: patterns.h:32
E & exectype
Definition: patterns.h:65
int farmtype
Definition: patterns.h:56
Definition: patterns.h:51
int filtertype
Definition: patterns.h:66
pipeline_info(E &p, Stage s, Stages...sts)
Definition: patterns.h:33
int window_size
Definition: patterns.h:42
filter_info(E &s, Operation f)
Definition: patterns.h:67
pipeline_info(E &p, std::tuple< Stage, Stages... > st)
Definition: patterns.h:34
Operation task
Definition: patterns.h:64
E & exectype
Definition: patterns.h:45
int offset
Definition: patterns.h:43
reduction_info(E &s, int ws, int off, Identity iden, Combiner comb)
Definition: patterns.h:46