concurrency::RankerByDataRealmEccentricity Class Reference

#include <src/EFGraphVisitors.h>

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

Public Member Functions

 RankerByDataRealmEccentricity ()
 Constructor. More...
 
virtual ~RankerByDataRealmEccentricity ()
 Destructor. More...
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visit (DecisionNode &)
 
virtual bool visitLeave (DecisionNode &) const
 
virtual bool visitEnter (AlgorithmNode &) const
 
virtual bool visit (AlgorithmNode &node)
 
virtual void reset ()
 
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

Constructor.

Definition at line 173 of file EFGraphVisitors.h.

virtual concurrency::RankerByDataRealmEccentricity::~RankerByDataRealmEccentricity ( )
inlinevirtual

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...
virtual void concurrency::RankerByDataRealmEccentricity::reset ( )
inlinevirtual
virtual bool concurrency::RankerByDataRealmEccentricity::visit ( DecisionNode )
inlinevirtual

Implements concurrency::IGraphVisitor.

Definition at line 184 of file EFGraphVisitors.h.

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

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...
virtual bool concurrency::RankerByDataRealmEccentricity::visitEnter ( DecisionNode ) const
inlinevirtual

Implements concurrency::IGraphVisitor.

Definition at line 182 of file EFGraphVisitors.h.

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

Implements concurrency::IGraphVisitor.

Definition at line 189 of file EFGraphVisitors.h.

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

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: