The Gaudi Framework  v30r3 (a5ef0a68)
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 512 of file PRGraphVisitors.cpp.

513  {
514 
515  m_currentDepth += 1;
516 
517  auto& products = node.getOutputDataNodes();
518 
519  if ( products.empty() )
521 
522  for ( auto p : products )
523  for ( auto algoNode : p->getConsumers() ) recursiveVisit( *algoNode );
524 
525  m_currentDepth -= 1;
526  }
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 496 of file PRGraphVisitors.cpp.

497  {
498 
499  // Find eccentricity of the node (only within the data realm of the execution flow graph)
500  recursiveVisit( node );
501 
502  float rank = m_maxKnownDepth;
503  node.setRank( rank );
504 
505  // Reset visitor for next nodes, if any
506  reset();
507 
508  return true;
509  }
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: