The Gaudi Framework  master (37c0b60a)
concurrency::RankerByTiming Class Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/Visitors/Rankers.h>

Inheritance diagram for concurrency::RankerByTiming:
Collaboration diagram for concurrency::RankerByTiming:

Public Member Functions

bool visit (AlgorithmNode &) override
 
virtual bool visit (DecisionNode &)
 
virtual bool visit (AlgorithmNode &)
 
virtual bool visit (DataNode &)
 
virtual bool visit (ConditionNode &)
 
- 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 41 of file Rankers.h.

Member Function Documentation

◆ visit() [1/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 29 of file IGraphVisitor.h.

29 { return true; }

◆ visit() [2/5]

bool concurrency::RankerByTiming::visit ( AlgorithmNode node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 87 of file Rankers.cpp.

87  {
88 
89  std::ifstream myfile;
90  myfile.open( "InputExecutionPlan.graphml", std::ios::in );
91 
92  precedence::PrecTrace execPlan;
93  using boost::get;
95 
96  boost::dynamic_properties dp;
97  dp.property( "name", get( &AlgoTraceProps::m_name, execPlan ) );
98  dp.property( "index", get( &AlgoTraceProps::m_index, execPlan ) );
99  dp.property( "dataRank", get( &AlgoTraceProps::m_rank, execPlan ) );
100  dp.property( "runtime", get( &AlgoTraceProps::m_runtime, execPlan ) );
101 
102  boost::read_graphml( myfile, execPlan, dp );
103 
104  typedef boost::graph_traits<precedence::PrecTrace>::vertex_iterator itV;
106 
107  for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) {
108  precedence::AlgoTraceVertex v = *vp.first;
109  auto index = get( &AlgoTraceProps::m_name, execPlan );
110  if ( index[v] == node.name() ) {
111  auto index_runtime = get( &AlgoTraceProps::m_runtime, execPlan );
112  float rank = index_runtime[v];
113  node.setRank( rank );
114  // std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
115  }
116  }
117  return true;
118  }

◆ visit() [3/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 35 of file IGraphVisitor.h.

35 { return true; }

◆ visit() [4/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 32 of file IGraphVisitor.h.

32 { return true; }

◆ visit() [5/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 26 of file IGraphVisitor.h.

26 { return true; }

The documentation for this class was generated from the following files:
std::pair
GaudiPartProp.decorators.get
get
decorate the vector of properties
Definition: decorators.py:283
precedence::PrecTrace
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
Definition: PrecedenceRulesGraph.h:62
std::ifstream::open
T open(T... args)
precedence::AlgoTraceProps
Definition: PrecedenceRulesGraph.h:49
Properties.v
v
Definition: Properties.py:122
precedence::AlgoTraceVertex
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex
Definition: PrecedenceRulesGraph.h:63
Gaudi::ParticleProperties::index
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...
Definition: IParticlePropertySvc.cpp:39
std::ifstream
STL class.