| The Gaudi Framework v27r1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
concurrency::RankerByCummulativeOutDegree Class Reference

`#include <src/EFGraphVisitors.h>`

Inheritance diagram for concurrency::RankerByCummulativeOutDegree:
[legend]
Collaboration diagram for concurrency::RankerByCummulativeOutDegree:
[legend]

## Public Member Functions
| RankerByCummulativeOutDegree ()
| Constructor. More...
virtual | ~RankerByCummulativeOutDegree ()
| Destructor. More...
virtual bool | visitEnter (DecisionNode &) const
virtual bool | visit (DecisionNode &)
virtual bool | visitLeave (DecisionNode &) const
virtual bool | visitEnter (AlgorithmNode &) const
virtual bool | visit (AlgorithmNode &node)
virtual void | reset ()
void | runThroughAdjacents (boost::graph_traits< boost::ExecPlan >::vertex_descriptor vertex, boost::ExecPlan graph)
Public Member Functions inherited from concurrency::IGraphVisitor
virtual | ~IGraphVisitor ()

## Additional Inherited Members
Public Attributes inherited from concurrency::IGraphVisitor
int | m_nodesSucceeded
int | m_slotNum

## Detailed Description

Definition at line 90 of file EFGraphVisitors.h.

## Constructor & Destructor Documentation

concurrency::RankerByCummulativeOutDegree::RankerByCummulativeOutDegree | ( |  | ) |
| inline

Constructor.

Definition at line 93 of file EFGraphVisitors.h.

93 {
94 m_nodesSucceeded = 0;
95 m_slotNum = -1;
96 };
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

virtual concurrency::RankerByCummulativeOutDegree::~RankerByCummulativeOutDegree | ( |  | ) |
| inline virtual

Destructor.

Definition at line 98 of file EFGraphVisitors.h.

98 {};

## Member Function Documentation

virtual void concurrency::RankerByCummulativeOutDegree::reset | ( |  | ) |
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 112 of file EFGraphVisitors.h.

112 { m_nodesSucceeded = 0; }
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

void concurrency::RankerByCummulativeOutDegree::runThroughAdjacents | ( | boost::graph_traits< boost::ExecPlan >::vertex_descriptor | vertex,
|  | boost::ExecPlan | graph
| ) |  |

Definition at line 209 of file EFGraphVisitors.cpp.

210 {
211 typename boost::graph_traits<boost::ExecPlan>::adjacency_iterator itVB;
212 typename boost::graph_traits<boost::ExecPlan>::adjacency_iterator itVE;
213
214 for (boost::tie(itVB, itVE) = adjacent_vertices(vertex, graph); itVB != itVE; ++itVB) {
215 m_nodesSucceeded += 1;
216 runThroughAdjacents(*itVB, graph);
217 }
218
219 }
plotSpeedupsPyRoot.graph
tuple graph
Definition: plotSpeedupsPyRoot.py:134
concurrency::RankerByCummulativeOutDegree::runThroughAdjacents
void runThroughAdjacents(boost::graph_traits< boost::ExecPlan >::vertex_descriptor vertex, boost::ExecPlan graph)
Definition: EFGraphVisitors.cpp:209
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

virtual bool concurrency::RankerByCummulativeOutDegree::visit | ( | DecisionNode & |  | ) |
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 102 of file EFGraphVisitors.h.

102 {return true;};

bool concurrency::RankerByCummulativeOutDegree::visit | ( | AlgorithmNode & | node | ) |
| virtual

Implements concurrency::IGraphVisitor.

Definition at line 174 of file EFGraphVisitors.cpp.

174 {
175
176 std::ifstream myfile;
177 myfile.open("InputExecutionPlan.graphml", std::ios::in);
178
179 boost::ExecPlan execPlan;
180
181 boost::dynamic_properties dp;
182 dp.property("name", boost::get(&boost::AlgoNodeStruct::m_name, execPlan));
183 dp.property("index", boost::get(&boost::AlgoNodeStruct::m_index, execPlan));
184 dp.property("dataRank", boost::get(&boost::AlgoNodeStruct::m_rank, execPlan));
185 dp.property("runtime", boost::get(&boost::AlgoNodeStruct::m_runtime, execPlan));
186
187 boost::read_graphml(myfile, execPlan, dp);
188
189 typedef boost::graph_traits<boost::ExecPlan>::vertex_iterator itV;
190 std::pair<itV, itV> vp;
191 typedef boost::graph_traits<boost::ExecPlan>::vertex_descriptor AlgoVertex;
192
193 for (vp = boost::vertices(execPlan); vp.first != vp.second; ++vp.first) {
194 AlgoVertex v = *vp.first;
195 auto index = boost::get(&boost::AlgoNodeStruct::m_name, execPlan);
196 if (index[v] == node.getNodeName()) {
197 runThroughAdjacents(v,execPlan);
198 float rank = m_nodesSucceeded;
199 node.setRank(rank);
200 reset();
201 //std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
202 }
203 }
204
205 return true;
206 }
boost::AlgoNodeStruct::m_index
int m_index
Definition: ExecutionFlowGraph.h:31
std::ifstream::open
T open(T...args)
boost::ExecPlan
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
Definition: ExecutionFlowGraph.h:37
boost::AlgoNodeStruct::m_rank
int m_rank
Definition: ExecutionFlowGraph.h:32
boost::AlgoNodeStruct::m_runtime
double m_runtime
Definition: ExecutionFlowGraph.h:33
concurrency::RankerByCummulativeOutDegree::reset
virtual void reset()
Definition: EFGraphVisitors.h:112
boost::AlgoVertex
graph_traits< ExecPlan >::vertex_descriptor AlgoVertex
Definition: ExecutionFlowGraph.h:38
boost::AlgoNodeStruct::m_name
std::string m_name
Definition: ExecutionFlowGraph.h:30
std::pair
GaudiPython.Persistency.get
def get(type_)
Definition: Persistency.py:23
concurrency::RankerByCummulativeOutDegree::runThroughAdjacents
void runThroughAdjacents(boost::graph_traits< boost::ExecPlan >::vertex_descriptor vertex, boost::ExecPlan graph)
Definition: EFGraphVisitors.cpp:209
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23
std::ifstream
STL class.

virtual bool concurrency::RankerByCummulativeOutDegree::visitEnter | ( | DecisionNode & |  | ) | const
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 100 of file EFGraphVisitors.h.

100 {return true;};

virtual bool concurrency::RankerByCummulativeOutDegree::visitEnter | ( | AlgorithmNode & |  | ) | const
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 107 of file EFGraphVisitors.h.

107 {return true;};

virtual bool concurrency::RankerByCummulativeOutDegree::visitLeave | ( | DecisionNode & |  | ) | const
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 104 of file EFGraphVisitors.h.

104 {return true;};

The documentation for this class was generated from the following files:

- GaudiHive/src/EFGraphVisitors.h
- GaudiHive/src/EFGraphVisitors.cpp