The Gaudi Framework  master (37c0b60a)
concurrency::RankerByDataRealmEccentricity Class Reference

#include </builds/gaudi/Gaudi/GaudiHive/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 57 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 168 of file Rankers.cpp.

168  {
169 
170  m_currentDepth += 1;
171 
172  auto& products = node.getOutputDataNodes();
173 
174  if ( products.empty() )
176 
177  for ( auto p : products )
178  for ( auto algoNode : p->getConsumers() ) recursiveVisit( *algoNode );
179 
180  m_currentDepth -= 1;
181  }

◆ reset()

void concurrency::RankerByDataRealmEccentricity::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 63 of file Rankers.h.

63  {
64  m_currentDepth = 0;
65  m_maxKnownDepth = 0;
66  }

◆ visit() [1/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 29 of file IGraphVisitor.h.

29 { return true; }

◆ visit() [2/5]

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 153 of file Rankers.cpp.

153  {
154 
155  // Find eccentricity of the node (only within the data realm of the execution flow graph)
156  recursiveVisit( node );
157 
158  float rank = m_maxKnownDepth;
159  node.setRank( rank );
160 
161  // Reset visitor for next nodes, if any
162  reset();
163 
164  return true;
165  }

◆ visit() [3/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 35 of file IGraphVisitor.h.

35 { return true; }

◆ visit() [4/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 32 of file IGraphVisitor.h.

32 { return true; }

◆ visit() [5/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 26 of file IGraphVisitor.h.

26 { return true; }

Member Data Documentation

◆ m_currentDepth

uint concurrency::RankerByDataRealmEccentricity::m_currentDepth { 0 }

Definition at line 72 of file Rankers.h.

◆ m_maxKnownDepth

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth { 0 }

Definition at line 73 of file Rankers.h.


The documentation for this class was generated from the following files:
concurrency::RankerByDataRealmEccentricity::reset
void reset() override
Definition: Rankers.h:63
concurrency::RankerByDataRealmEccentricity::recursiveVisit
void recursiveVisit(AlgorithmNode &)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...
Definition: Rankers.cpp:168
concurrency::RankerByDataRealmEccentricity::m_currentDepth
uint m_currentDepth
Definition: Rankers.h:72
concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth
uint m_maxKnownDepth
Definition: Rankers.h:73