| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

EFGraphVisitors.h
Go to the documentation of this file.
1 #ifndef EFGRAPHVISITORS_H_
2 #define EFGRAPHVISITORS_H_
3
4 #include "IGraphVisitor.h"
5 #include "ExecutionFlowGraph.h"
6
7 namespace concurrency {
8
9 class RunSimulator : public IGraphVisitor {
10 public:
12 RunSimulator(const int& slotNum) {
13 m_nodesSucceeded = 0;
14 m_slotNum = slotNum;
15 };
17 virtual ~RunSimulator() {};
18
19 virtual bool visitEnter(DecisionNode& node) const;
20
21 virtual bool visit(DecisionNode& node);
22
23 virtual bool visitLeave(DecisionNode& node) const;
24
25
26 virtual bool visitEnter(AlgorithmNode& node) const;
27
28 virtual bool visit(AlgorithmNode& node);
29
30
31 virtual void reset() { m_nodesSucceeded = 0; }
32
33 };
34
38 class Trigger : public IGraphVisitor {
39 public:
41 Trigger(const int& slotNum) {
42 m_nodesSucceeded = 0;
43 m_slotNum = slotNum;
44 };
46 virtual ~Trigger() {};
47
48 virtual bool visitEnter(DecisionNode& node) const;
49
50 virtual bool visit(DecisionNode& node);
51
52 virtual bool visitLeave(DecisionNode& node) const;
53
54
55 virtual bool visitEnter(AlgorithmNode& node) const;
56
57 virtual bool visit(AlgorithmNode& node);
58
59
60 virtual void reset() { m_nodesSucceeded = 0; }
61
62 };
63
64 class RankerByProductConsumption : public IGraphVisitor {
65 public:
67 RankerByProductConsumption() {
68 m_nodesSucceeded = 0;
69 m_slotNum = -1;
70 };
72 virtual ~RankerByProductConsumption() {};
73
74 virtual bool visitEnter(DecisionNode&) const {return true;};
75
76 virtual bool visit(DecisionNode&) {return true;};
77
78 virtual bool visitLeave(DecisionNode&) const {return true;};
79
80
81 virtual bool visitEnter(AlgorithmNode&) const {return true;};
82
83 virtual bool visit(AlgorithmNode& node);
84
85
86 virtual void reset() { m_nodesSucceeded = 0; }
87
88 };
89
90 class RankerByCummulativeOutDegree : public IGraphVisitor {
91 public:
93 RankerByCummulativeOutDegree() {
94 m_nodesSucceeded = 0;
95 m_slotNum = -1;
96 };
98 virtual ~RankerByCummulativeOutDegree() {};
99
100 virtual bool visitEnter(DecisionNode&) const {return true;};
101
102 virtual bool visit(DecisionNode&) {return true;};
103
104 virtual bool visitLeave(DecisionNode&) const {return true;};
105
106
107 virtual bool visitEnter(AlgorithmNode&) const {return true;};
108
109 virtual bool visit(AlgorithmNode& node);
110
111
112 virtual void reset() { m_nodesSucceeded = 0; }
113
114 void runThroughAdjacents(boost::graph_traits<boost::ExecPlan>::vertex_descriptor vertex, boost::ExecPlan graph);
115
116 };
117
118 class RankerByTiming : public IGraphVisitor {
119 public:
121 RankerByTiming() {
122 m_nodesSucceeded = 0;
123 m_slotNum = -1;
124 };
126 virtual ~RankerByTiming() {};
127
128 virtual bool visitEnter(DecisionNode&) const {return true;};
129
130 virtual bool visit(DecisionNode&) {return true;};
131
132 virtual bool visitLeave(DecisionNode&) const {return true;};
133
134
135 virtual bool visitEnter(AlgorithmNode&) const {return true;};
136
137 virtual bool visit(AlgorithmNode& node);
138
139
140 virtual void reset() { m_nodesSucceeded = 0; }
141
142 };
143
144 class RankerByEccentricity : public IGraphVisitor {
145 public:
147 RankerByEccentricity() {
148 m_nodesSucceeded = 0;
149 m_slotNum = -1;
150 };
152 virtual ~RankerByEccentricity() {};
153
154 virtual bool visitEnter(DecisionNode&) const {return true;};
155
156 virtual bool visit(DecisionNode&) {return true;};
157
158 virtual bool visitLeave(DecisionNode&) const {return true;};
159
160
161 virtual bool visitEnter(AlgorithmNode&) const {return true;};
162
163 virtual bool visit(AlgorithmNode& node);
164
165
166 virtual void reset() { m_nodesSucceeded = 0; }
167
168 };
169
170 class RankerByDataRealmEccentricity : public IGraphVisitor {
171 public:
173 RankerByDataRealmEccentricity() {
174 m_nodesSucceeded = 0;
175 m_slotNum = -1;
176 m_currentDepth = 0;
177 m_maxKnownDepth = 0;
178 };
180 virtual ~RankerByDataRealmEccentricity() {};
181
182 virtual bool visitEnter(DecisionNode&) const {return true;};
183
184 virtual bool visit(DecisionNode&) {return true;};
185
186 virtual bool visitLeave(DecisionNode&) const {return true;};
187
188
189 virtual bool visitEnter(AlgorithmNode&) const {return true;};
190
191 virtual bool visit(AlgorithmNode& node);
192
193
194 virtual void reset() {
195 m_nodesSucceeded = 0;
196 m_currentDepth = 0;
197 m_maxKnownDepth = 0;
198 }
199
202 void recursiveVisit(AlgorithmNode& node);
203
204 uint m_currentDepth;
205 uint m_maxKnownDepth;
206
207 };
208
209 }
210
211
212
213 #endif /* EFGRAPHVISITORS_H_ */
concurrency::Trigger::visitEnter
virtual bool visitEnter(DecisionNode &node) const
Definition: EFGraphVisitors.cpp:89
concurrency::RunSimulator::~RunSimulator
virtual ~RunSimulator()
Destructor.
Definition: EFGraphVisitors.h:17
concurrency::Trigger::visitLeave
virtual bool visitLeave(DecisionNode &node) const
Definition: EFGraphVisitors.cpp:121
concurrency::RankerByCummulativeOutDegree::visitEnter
virtual bool visitEnter(AlgorithmNode &) const
Definition: EFGraphVisitors.h:107
concurrency::RankerByEccentricity::~RankerByEccentricity
virtual ~RankerByEccentricity()
Destructor.
Definition: EFGraphVisitors.h:152
concurrency::RankerByProductConsumption::~RankerByProductConsumption
virtual ~RankerByProductConsumption()
Destructor.
Definition: EFGraphVisitors.h:72
concurrency::DecisionNode
Definition: ExecutionFlowGraph.h:86
concurrency::Trigger::reset
virtual void reset()
Definition: EFGraphVisitors.h:60
concurrency::RankerByTiming::visitEnter
virtual bool visitEnter(AlgorithmNode &) const
Definition: EFGraphVisitors.h:135
concurrency::RankerByDataRealmEccentricity::reset
virtual void reset()
Definition: EFGraphVisitors.h:194
concurrency::RunSimulator
Definition: EFGraphVisitors.h:9
boost::ExecPlan
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
Definition: ExecutionFlowGraph.h:37
concurrency
Definition: EFGraphVisitors.cpp:3
concurrency::RunSimulator::visit
virtual bool visit(DecisionNode &node)
Definition: EFGraphVisitors.cpp:14
concurrency::RankerByDataRealmEccentricity::m_currentDepth
uint m_currentDepth
Definition: EFGraphVisitors.h:204
concurrency::RankerByDataRealmEccentricity::visitEnter
virtual bool visitEnter(AlgorithmNode &) const
Definition: EFGraphVisitors.h:189
concurrency::RankerByDataRealmEccentricity::recursiveVisit
void recursiveVisit(AlgorithmNode &node)
Depth-first node parser to calculate node eccentricity (only within the data realm of the execution f...
Definition: EFGraphVisitors.cpp:301
concurrency::RunSimulator::visitLeave
virtual bool visitLeave(DecisionNode &node) const
Definition: EFGraphVisitors.cpp:38
concurrency::RunSimulator::RunSimulator
RunSimulator(const int &slotNum)
Constructor.
Definition: EFGraphVisitors.h:12
concurrency::RankerByProductConsumption::visit
virtual bool visit(DecisionNode &)
Definition: EFGraphVisitors.h:76
concurrency::Trigger
A visitor, performing full top-down traversals of a graph.
Definition: EFGraphVisitors.h:38
concurrency::RankerByTiming::visitLeave
virtual bool visitLeave(DecisionNode &) const
Definition: EFGraphVisitors.h:132
concurrency::RankerByCummulativeOutDegree::~RankerByCummulativeOutDegree
virtual ~RankerByCummulativeOutDegree()
Destructor.
Definition: EFGraphVisitors.h:98
concurrency::RankerByProductConsumption::reset
virtual void reset()
Definition: EFGraphVisitors.h:86
concurrency::RankerByProductConsumption::visitLeave
virtual bool visitLeave(DecisionNode &) const
Definition: EFGraphVisitors.h:78
concurrency::RankerByCummulativeOutDegree::reset
virtual void reset()
Definition: EFGraphVisitors.h:112
concurrency::RankerByCummulativeOutDegree::visitEnter
virtual bool visitEnter(DecisionNode &) const
Definition: EFGraphVisitors.h:100
concurrency::RankerByProductConsumption::visitEnter
virtual bool visitEnter(AlgorithmNode &) const
Definition: EFGraphVisitors.h:81
concurrency::RankerByEccentricity::visit
virtual bool visit(DecisionNode &)
Definition: EFGraphVisitors.h:156
plotSpeedupsPyRoot.graph
tuple graph
Definition: plotSpeedupsPyRoot.py:134
concurrency::RankerByCummulativeOutDegree::RankerByCummulativeOutDegree
RankerByCummulativeOutDegree()
Constructor.
Definition: EFGraphVisitors.h:93
concurrency::RankerByDataRealmEccentricity::visit
virtual bool visit(DecisionNode &)
Definition: EFGraphVisitors.h:184
concurrency::RankerByTiming
Definition: EFGraphVisitors.h:118
concurrency::RankerByDataRealmEccentricity
Definition: EFGraphVisitors.h:170
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::RankerByEccentricity::visitEnter
virtual bool visitEnter(AlgorithmNode &) const
Definition: EFGraphVisitors.h:161
concurrency::RankerByEccentricity::reset
virtual void reset()
Definition: EFGraphVisitors.h:166
concurrency::RankerByDataRealmEccentricity::~RankerByDataRealmEccentricity
virtual ~RankerByDataRealmEccentricity()
Destructor.
Definition: EFGraphVisitors.h:180
concurrency::RankerByEccentricity::RankerByEccentricity
RankerByEccentricity()
Constructor.
Definition: EFGraphVisitors.h:147
concurrency::RankerByEccentricity
Definition: EFGraphVisitors.h:144
concurrency::RunSimulator::reset
virtual void reset()
Definition: EFGraphVisitors.h:31
concurrency::IGraphVisitor
Definition: IGraphVisitor.h:9
concurrency::RankerByDataRealmEccentricity::visitEnter
virtual bool visitEnter(DecisionNode &) const
Definition: EFGraphVisitors.h:182
concurrency::RunSimulator::visitEnter
virtual bool visitEnter(DecisionNode &node) const
Definition: EFGraphVisitors.cpp:6
concurrency::Trigger::visit
virtual bool visit(DecisionNode &node)
Definition: EFGraphVisitors.cpp:97
concurrency::RankerByEccentricity::visitEnter
virtual bool visitEnter(DecisionNode &) const
Definition: EFGraphVisitors.h:154
concurrency::RankerByTiming::RankerByTiming
RankerByTiming()
Constructor.
Definition: EFGraphVisitors.h:121
concurrency::RankerByEccentricity::visitLeave
virtual bool visitLeave(DecisionNode &) const
Definition: EFGraphVisitors.h:158
concurrency::Trigger::~Trigger
virtual ~Trigger()
Destructor.
Definition: EFGraphVisitors.h:46
concurrency::RankerByTiming::visit
virtual bool visit(DecisionNode &)
Definition: EFGraphVisitors.h:130
concurrency::RankerByTiming::~RankerByTiming
virtual ~RankerByTiming()
Destructor.
Definition: EFGraphVisitors.h:126
concurrency::RankerByProductConsumption::visitEnter
virtual bool visitEnter(DecisionNode &) const
Definition: EFGraphVisitors.h:74
concurrency::RankerByCummulativeOutDegree::runThroughAdjacents
void runThroughAdjacents(boost::graph_traits< boost::ExecPlan >::vertex_descriptor vertex, boost::ExecPlan graph)
Definition: EFGraphVisitors.cpp:209
concurrency::RankerByProductConsumption
Definition: EFGraphVisitors.h:64
concurrency::RankerByTiming::reset
virtual void reset()
Definition: EFGraphVisitors.h:140
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23
concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth
uint m_maxKnownDepth
Definition: EFGraphVisitors.h:205
concurrency::RankerByCummulativeOutDegree::visit
virtual bool visit(DecisionNode &)
Definition: EFGraphVisitors.h:102
concurrency::AlgorithmNode
Definition: ExecutionFlowGraph.h:137
IGraphVisitor.h
concurrency::Trigger::Trigger
Trigger(const int &slotNum)
Constructor.
Definition: EFGraphVisitors.h:41
concurrency::RankerByTiming::visitEnter
virtual bool visitEnter(DecisionNode &) const
Definition: EFGraphVisitors.h:128
concurrency::RankerByDataRealmEccentricity::RankerByDataRealmEccentricity
RankerByDataRealmEccentricity()
Constructor.
Definition: EFGraphVisitors.h:173
concurrency::RankerByCummulativeOutDegree::visitLeave
virtual bool visitLeave(DecisionNode &) const
Definition: EFGraphVisitors.h:104
concurrency::RankerByProductConsumption::RankerByProductConsumption
RankerByProductConsumption()
Constructor.
Definition: EFGraphVisitors.h:67
ExecutionFlowGraph.h
concurrency::RankerByCummulativeOutDegree
Definition: EFGraphVisitors.h:90
concurrency::RankerByDataRealmEccentricity::visitLeave
virtual bool visitLeave(DecisionNode &) const
Definition: EFGraphVisitors.h:186