| The Gaudi Framework v29r0 (ff2e7097)

- 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
bool | visit (AlgorithmNode &) override
Public Member Functions inherited from concurrency::IGraphVisitor
virtual | ~IGraphVisitor ()=default
virtual bool | visitEnter (DecisionNode &) const
virtual bool | visit (DecisionNode &)
virtual bool | visitEnter (AlgorithmNode &) const
virtual bool | visitEnter (DataNode &) const
virtual bool | visit (DataNode &)
virtual bool | visitEnter (ConditionNode &) const
virtual bool | visit (ConditionNode &)
virtual void | reset ()

## Detailed Description

Definition at line 98 of file PRGraphVisitors.h.

## Member Function Documentation

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 299 of file PRGraphVisitors.cpp.

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

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

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