concurrency::RankerByDataRealmEccentricity Class Reference

#include <src/PRGraphVisitors.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 precedence rules 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 197 of file PRGraphVisitors.h.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 207 of file PRGraphVisitors.h.

207 {}

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 383 of file PRGraphVisitors.cpp.

383  {
384 
385  m_currentDepth += 1;
386 
387  auto& products = node.getOutputDataNodes();
388 
389  if (products.empty())
390  if ( (m_currentDepth - 1) > m_maxKnownDepth)
392 
393  for (auto p : products)
394  for ( auto algoNode : p->getConsumers())
395  recursiveVisit(*algoNode);
396 
397  m_currentDepth -= 1;
398 
399  }
void recursiveVisit(AlgorithmNode &node)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...
void concurrency::RankerByDataRealmEccentricity::reset ( )
inlineoverridevirtual
bool concurrency::RankerByDataRealmEccentricity::visit ( DecisionNode )
inlineoverridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 211 of file PRGraphVisitors.h.

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

Implements concurrency::IGraphVisitor.

Definition at line 368 of file PRGraphVisitors.cpp.

368  {
369 
370  // Find eccentricity of the node (only within the data realm of the execution flow graph)
371  recursiveVisit(node);
372 
373  float rank = m_maxKnownDepth;
374  node.setRank(rank);
375 
376  // Reset visitor for next nodes, if any
377  reset();
378 
379  return true;
380  }
void recursiveVisit(AlgorithmNode &node)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...
bool concurrency::RankerByDataRealmEccentricity::visitEnter ( DecisionNode ) const
inlineoverridevirtual

Implements concurrency::IGraphVisitor.

Definition at line 209 of file PRGraphVisitors.h.

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

Implements concurrency::IGraphVisitor.

Definition at line 216 of file PRGraphVisitors.h.

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

Implements concurrency::IGraphVisitor.

Definition at line 213 of file PRGraphVisitors.h.

213 {return true;}

Member Data Documentation

uint concurrency::RankerByDataRealmEccentricity::m_currentDepth

Definition at line 231 of file PRGraphVisitors.h.

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth

Definition at line 232 of file PRGraphVisitors.h.


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