The Gaudi Framework  v32r2 (46d42edc)
concurrency::RankerByDataRealmEccentricity Class Reference

#include <src/PRGraph/Visitors/Rankers.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...
 
virtual bool visit (DecisionNode &)
 
virtual bool visit (AlgorithmNode &)
 
virtual bool visit (DataNode &)
 
virtual bool visit (ConditionNode &)
 
- 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 47 of file Rankers.h.

Member Function Documentation

◆ recursiveVisit()

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 155 of file Rankers.cpp.

155  {
156 
157  m_currentDepth += 1;
158 
159  auto& products = node.getOutputDataNodes();
160 
161  if ( products.empty() )
163 
164  for ( auto p : products )
165  for ( auto algoNode : p->getConsumers() ) recursiveVisit( *algoNode );
166 
167  m_currentDepth -= 1;
168  }
void recursiveVisit(AlgorithmNode &)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...
Definition: Rankers.cpp:155

◆ reset()

void concurrency::RankerByDataRealmEccentricity::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 53 of file Rankers.h.

◆ visit() [1/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 22 of file IGraphVisitor.h.

22 { return true; };

◆ visit() [2/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 19 of file IGraphVisitor.h.

19 { return true; };

◆ visit() [3/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 16 of file IGraphVisitor.h.

16 { return true; };

◆ visit() [4/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 25 of file IGraphVisitor.h.

25 { return true; };

◆ visit() [5/5]

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 140 of file Rankers.cpp.

140  {
141 
142  // Find eccentricity of the node (only within the data realm of the execution flow graph)
143  recursiveVisit( node );
144 
145  float rank = m_maxKnownDepth;
146  node.setRank( rank );
147 
148  // Reset visitor for next nodes, if any
149  reset();
150 
151  return true;
152  }
void recursiveVisit(AlgorithmNode &)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...
Definition: Rankers.cpp:155

Member Data Documentation

◆ m_currentDepth

uint concurrency::RankerByDataRealmEccentricity::m_currentDepth {0}

Definition at line 62 of file Rankers.h.

◆ m_maxKnownDepth

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth {0}

Definition at line 63 of file Rankers.h.


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