| The Gaudi Framework v28r2p1 (f1a77ff4)

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

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

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

`#include <src/PRGraphVisitors.h>`

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

## Public Member Functions
| RankerByTiming ()
| Constructor. More...
| ~RankerByTiming () override
| Destructor. More...
bool | visitEnter (DecisionNode &) const override
bool | visit (DecisionNode &) override
bool | visitLeave (DecisionNode &) const override
bool | visitEnter (AlgorithmNode &) const override
bool | visit (AlgorithmNode &node) override
void | reset () override
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 145 of file PRGraphVisitors.h.

## Constructor & Destructor Documentation

concurrency::RankerByTiming::RankerByTiming | ( |  | ) |
| inline

Constructor.

Definition at line 148 of file PRGraphVisitors.h.

148 {
149 m_nodesSucceeded = 0;
150 m_slotNum = -1;
151 };
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

concurrency::RankerByTiming::~RankerByTiming | ( |  | ) |
| inline override

Destructor.

Definition at line 153 of file PRGraphVisitors.h.

153 {}

## Member Function Documentation

void concurrency::RankerByTiming::reset | ( |  | ) |
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 167 of file PRGraphVisitors.h.

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

bool concurrency::RankerByTiming::visit | ( | DecisionNode & |  | ) |
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 157 of file PRGraphVisitors.h.

157 {return true;}

bool concurrency::RankerByTiming::visit | ( | AlgorithmNode & | node | ) |
| override virtual

Implements concurrency::IGraphVisitor.

Definition at line 304 of file PRGraphVisitors.cpp.

304 {
305
306 std::ifstream myfile;
307 myfile.open("InputExecutionPlan.graphml", std::ios::in);
308
309 boost::ExecPlan execPlan;
310
311 boost::dynamic_properties dp;
312 dp.property("name", boost::get(&boost::AlgoNodeStruct::m_name, execPlan));
313 dp.property("index", boost::get(&boost::AlgoNodeStruct::m_index, execPlan));
314 dp.property("dataRank", boost::get(&boost::AlgoNodeStruct::m_rank, execPlan));
315 dp.property("runtime", boost::get(&boost::AlgoNodeStruct::m_runtime, execPlan));
316
317 boost::read_graphml(myfile, execPlan, dp);
318
319 typedef boost::graph_traits<boost::ExecPlan>::vertex_iterator itV;
320 std::pair<itV, itV> vp;
321 typedef boost::graph_traits<boost::ExecPlan>::vertex_descriptor AlgoVertex;
322
323 for (vp = boost::vertices(execPlan); vp.first != vp.second; ++vp.first) {
324 AlgoVertex v = *vp.first;
325 auto index = boost::get(&boost::AlgoNodeStruct::m_name, execPlan);
326 if (index[v] == node.getNodeName()) {
327 auto index_runtime = boost::get(&boost::AlgoNodeStruct::m_runtime, execPlan);
328 float rank = index_runtime[v];
329 node.setRank(rank);
330 //std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
331 }
332 }
333 return true;
334 }
boost::AlgoNodeStruct::m_index
int m_index
Definition: PrecedenceRulesGraph.h:31
std::ifstream::open
T open(T...args)
boost::ExecPlan
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
Definition: PrecedenceRulesGraph.h:37
boost::AlgoNodeStruct::m_rank
int m_rank
Definition: PrecedenceRulesGraph.h:32
boost::AlgoNodeStruct::m_runtime
double m_runtime
Definition: PrecedenceRulesGraph.h:33
boost::AlgoVertex
graph_traits< ExecPlan >::vertex_descriptor AlgoVertex
Definition: PrecedenceRulesGraph.h:38
boost::AlgoNodeStruct::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:30
std::pair
GaudiPython.Persistency.get
def get(type_)
Definition: Persistency.py:23
std::ifstream
STL class.

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

Implements concurrency::IGraphVisitor.

Definition at line 155 of file PRGraphVisitors.h.

155 {return true;}

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

Implements concurrency::IGraphVisitor.

Definition at line 162 of file PRGraphVisitors.h.

162 {return true;}

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

Implements concurrency::IGraphVisitor.

Definition at line 159 of file PRGraphVisitors.h.

159 {return true;}

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

- GaudiHive/src/PRGraphVisitors.h
- GaudiHive/src/PRGraphVisitors.cpp