The Gaudi Framework  v31r0 (aeb156f0)
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 106 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 490 of file PRGraphVisitors.cpp.

490  {
491 
492  m_currentDepth += 1;
493 
494  auto& products = node.getOutputDataNodes();
495 
496  if ( products.empty() )
498 
499  for ( auto p : products )
500  for ( auto algoNode : p->getConsumers() ) recursiveVisit( *algoNode );
501 
502  m_currentDepth -= 1;
503  }
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 112 of file PRGraphVisitors.h.

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 475 of file PRGraphVisitors.cpp.

475  {
476 
477  // Find eccentricity of the node (only within the data realm of the execution flow graph)
478  recursiveVisit( node );
479 
480  float rank = m_maxKnownDepth;
481  node.setRank( rank );
482 
483  // Reset visitor for next nodes, if any
484  reset();
485 
486  return true;
487  }
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 121 of file PRGraphVisitors.h.

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth {0}

Definition at line 122 of file PRGraphVisitors.h.


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