concurrency::RankerByDataRealmEccentricity Class Reference

#include <src/EFGraphVisitors.h>

Inheritance diagram for concurrency::RankerByDataRealmEccentricity:
Collaboration diagram for concurrency::RankerByDataRealmEccentricity:

Public Member Functions

 RankerByDataRealmEccentricity ()
 Constructor. More...
 
 ~RankerByDataRealmEccentricity () override
 Destructor. More...
 
bool visitEnter (DecisionNode &) const override
 
bool visit (DecisionNode &) override
 
bool visitLeave (DecisionNode &) const override
 
bool visitEnter (AlgorithmNode &) const override
 
bool visit (AlgorithmNode &node) override
 
void reset () override
 
void recursiveVisit (AlgorithmNode &node)
 Depth-first node parser to calculate node eccentricity (only within the data realm of the execution flow graph) More...
 
- Public Member Functions inherited from concurrency::IGraphVisitor
virtual ~IGraphVisitor ()
 

Public Attributes

uint m_currentDepth
 
uint m_maxKnownDepth
 
- Public Attributes inherited from concurrency::IGraphVisitor
int m_nodesSucceeded
 
int m_slotNum
 

Detailed Description

Definition at line 170 of file EFGraphVisitors.h.

Constructor & Destructor Documentation

concurrency::RankerByDataRealmEccentricity::RankerByDataRealmEccentricity ( )
inline
concurrency::RankerByDataRealmEccentricity::~RankerByDataRealmEccentricity ( )
inlineoverride

Destructor.

Definition at line 180 of file EFGraphVisitors.h.

180 {}

Member Function Documentation

void concurrency::RankerByDataRealmEccentricity::recursiveVisit ( AlgorithmNode node)

Depth-first node parser to calculate node eccentricity (only within the data realm of the execution flow graph)

Definition at line 301 of file EFGraphVisitors.cpp.

301  {
302 
303  m_currentDepth += 1;
304 
305  auto& products = node.getOutputDataNodes();
306 
307  if (products.empty())
308  if ( (m_currentDepth - 1) > m_maxKnownDepth)
310 
311  for (auto p : products)
312  for ( auto algoNode : p->getConsumers())
313  recursiveVisit(*algoNode);
314 
315  m_currentDepth -= 1;
316 
317  }
void recursiveVisit(AlgorithmNode &node)
Depth-first node parser to calculate node eccentricity (only within the data realm of the execution f...
void concurrency::RankerByDataRealmEccentricity::reset ( )
inlineoverridevirtual
bool concurrency::RankerByDataRealmEccentricity::visit ( DecisionNode )
inlineoverridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 184 of file EFGraphVisitors.h.

184 {return true;}
bool concurrency::RankerByDataRealmEccentricity::visit ( AlgorithmNode node)
overridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 286 of file EFGraphVisitors.cpp.

286  {
287 
288  // Find eccentricity of the node (only within the data realm of the execution flow graph)
289  recursiveVisit(node);
290 
291  float rank = m_maxKnownDepth;
292  node.setRank(rank);
293 
294  // Reset visitor for next nodes, if any
295  reset();
296 
297  return true;
298  }
void recursiveVisit(AlgorithmNode &node)
Depth-first node parser to calculate node eccentricity (only within the data realm of the execution f...
bool concurrency::RankerByDataRealmEccentricity::visitEnter ( DecisionNode ) const
inlineoverridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 182 of file EFGraphVisitors.h.

182 {return true;}
bool concurrency::RankerByDataRealmEccentricity::visitEnter ( AlgorithmNode ) const
inlineoverridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 189 of file EFGraphVisitors.h.

189 {return true;}
bool concurrency::RankerByDataRealmEccentricity::visitLeave ( DecisionNode ) const
inlineoverridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 186 of file EFGraphVisitors.h.

186 {return true;}

Member Data Documentation

uint concurrency::RankerByDataRealmEccentricity::m_currentDepth

Definition at line 204 of file EFGraphVisitors.h.

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth

Definition at line 205 of file EFGraphVisitors.h.


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