| The Gaudi Framework v29r1 (5cd95fa2)

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

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

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

`#include <src/PRGraphVisitors.h>`

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

## Public Member Functions
bool | visit (AlgorithmNode &) override
void | reset () override
void | runThroughAdjacents (boost::graph_traits< precedence::PrecTrace >::vertex_descriptor, precedence::PrecTrace)
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 &)

## Public Attributes
int | m_nodesSucceeded {0}

## Detailed Description

Definition at line 85 of file PRGraphVisitors.h.

## Member Function Documentation

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 91 of file PRGraphVisitors.h.

91 { m_nodesSucceeded = 0; };
concurrency::RankerByCummulativeOutDegree::m_nodesSucceeded
int m_nodesSucceeded
Definition: PRGraphVisitors.h:95

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

Definition at line 286 of file PRGraphVisitors.cpp.

288 {
289 typename boost::graph_traits<precedence::PrecTrace>::adjacency_iterator itVB;
290 typename boost::graph_traits<precedence::PrecTrace>::adjacency_iterator itVE;
291
292 for ( boost::tie( itVB, itVE ) = adjacent_vertices( vertex, graph ); itVB != itVE; ++itVB ) {
293 m_nodesSucceeded += 1;
294 runThroughAdjacents( *itVB, graph );
295 }
296 }
concurrency::RankerByCummulativeOutDegree::m_nodesSucceeded
int m_nodesSucceeded
Definition: PRGraphVisitors.h:95
concurrency::RankerByCummulativeOutDegree::runThroughAdjacents
void runThroughAdjacents(boost::graph_traits< precedence::PrecTrace >::vertex_descriptor, precedence::PrecTrace)
Definition: PRGraphVisitors.cpp:286
plotSpeedupsPyRoot.graph
graph
Definition: plotSpeedupsPyRoot.py:142

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 248 of file PRGraphVisitors.cpp.

249 {
250
251 std::ifstream myfile;
252 myfile.open( "InputExecutionPlan.graphml", std::ios::in );
253
254 precedence::PrecTrace execPlan;
255
256 using precedence::AlgoTraceProps;
257 using boost::get;
258
259 boost::dynamic_properties dp;
260 dp.property( "name", get( &AlgoTraceProps::m_name, execPlan ) );
261 dp.property( "index", get( &AlgoTraceProps::m_index, execPlan ) );
262 dp.property( "dataRank", get( &AlgoTraceProps::m_rank, execPlan ) );
263 dp.property( "runtime", get( &AlgoTraceProps::m_runtime, execPlan ) );
264
265 boost::read_graphml( myfile, execPlan, dp );
266
267 typedef boost::graph_traits<precedence::PrecTrace>::vertex_iterator itV;
268 std::pair<itV, itV> vp;
269
270 for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) {
271 precedence::AlgoTraceVertex v = *vp.first;
272 auto index = get( &AlgoTraceProps::m_name, execPlan );
273 if ( index[v] == node.getNodeName() ) {
274 runThroughAdjacents( v, execPlan );
275 float rank = m_nodesSucceeded;
276 node.setRank( rank );
277 reset();
278 // std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
279 }
280 }
281
282 return true;
283 }
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
concurrency::RankerByCummulativeOutDegree::m_nodesSucceeded
int m_nodesSucceeded
Definition: PRGraphVisitors.h:95
concurrency::RankerByCummulativeOutDegree::reset
void reset() override
Definition: PRGraphVisitors.h:91
concurrency::RankerByCummulativeOutDegree::runThroughAdjacents
void runThroughAdjacents(boost::graph_traits< precedence::PrecTrace >::vertex_descriptor, precedence::PrecTrace)
Definition: PRGraphVisitors.cpp:286
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.

## Member Data Documentation

int concurrency::RankerByCummulativeOutDegree::m_nodesSucceeded {0}

Definition at line 95 of file PRGraphVisitors.h.

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

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