The Gaudi Framework  v29r0 (ff2e7097)
concurrency::RankerByDataRealmEccentricity Class Reference

#include <src/PRGraphVisitors.h>

Inheritance diagram for concurrency::RankerByDataRealmEccentricity:
Collaboration diagram for concurrency::RankerByDataRealmEccentricity:

Public Member Functions

bool visit (AlgorithmNode &) override
 
void reset () override
 
void recursiveVisit (AlgorithmNode &)
 Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence rules graph) More...
 
- 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

uint m_currentDepth {0}
 
uint m_maxKnownDepth {0}
 

Detailed Description

Definition at line 114 of file PRGraphVisitors.h.

Member Function Documentation

void concurrency::RankerByDataRealmEccentricity::recursiveVisit ( AlgorithmNode node)

Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence rules graph)

Definition at line 383 of file PRGraphVisitors.cpp.

384  {
385 
386  m_currentDepth += 1;
387 
388  auto& products = node.getOutputDataNodes();
389 
390  if ( products.empty() )
392 
393  for ( auto p : products )
394  for ( auto algoNode : p->getConsumers() ) recursiveVisit( *algoNode );
395 
396  m_currentDepth -= 1;
397  }
void recursiveVisit(AlgorithmNode &)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...
void concurrency::RankerByDataRealmEccentricity::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 121 of file PRGraphVisitors.h.

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 367 of file PRGraphVisitors.cpp.

368  {
369 
370  // Find eccentricity of the node (only within the data realm of the execution flow graph)
371  recursiveVisit( node );
372 
373  float rank = m_maxKnownDepth;
374  node.setRank( rank );
375 
376  // Reset visitor for next nodes, if any
377  reset();
378 
379  return true;
380  }
void recursiveVisit(AlgorithmNode &)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...

Member Data Documentation

uint concurrency::RankerByDataRealmEccentricity::m_currentDepth {0}

Definition at line 131 of file PRGraphVisitors.h.

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth {0}

Definition at line 132 of file PRGraphVisitors.h.


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