The Gaudi Framework  v30r0 (c919700c)
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 388 of file PRGraphVisitors.cpp.

389  {
390 
391  m_currentDepth += 1;
392 
393  auto& products = node.getOutputDataNodes();
394 
395  if ( products.empty() )
397 
398  for ( auto p : products )
399  for ( auto algoNode : p->getConsumers() ) recursiveVisit( *algoNode );
400 
401  m_currentDepth -= 1;
402  }
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 372 of file PRGraphVisitors.cpp.

373  {
374 
375  // Find eccentricity of the node (only within the data realm of the execution flow graph)
376  recursiveVisit( node );
377 
378  float rank = m_maxKnownDepth;
379  node.setRank( rank );
380 
381  // Reset visitor for next nodes, if any
382  reset();
383 
384  return true;
385  }
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: