The Gaudi Framework  v28r3 (cc1cf868)
concurrency::RankerByDataRealmEccentricity Class Reference

#include <src/PRGraphVisitors.h>

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

Public Member Functions

 RankerByDataRealmEccentricity ()
 Constructor. More...
 
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 ()=default
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visit (DecisionNode &)
 
virtual bool visitEnter (AlgorithmNode &) const
 
virtual bool visitEnter (DataNode &) const
 
virtual bool visit (DataNode &)
 

Public Attributes

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

Detailed Description

Definition at line 115 of file PRGraphVisitors.h.

Constructor & Destructor Documentation

concurrency::RankerByDataRealmEccentricity::RankerByDataRealmEccentricity ( )
inline

Constructor.

Definition at line 118 of file PRGraphVisitors.h.

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

324  {
325 
326  m_currentDepth += 1;
327 
328  auto& products = node.getOutputDataNodes();
329 
330  if (products.empty())
331  if ( (m_currentDepth - 1) > m_maxKnownDepth)
333 
334  for (auto p : products)
335  for ( auto algoNode : p->getConsumers())
336  recursiveVisit(*algoNode);
337 
338  m_currentDepth -= 1;
339 
340  }
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 ( AlgorithmNode node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 309 of file PRGraphVisitors.cpp.

309  {
310 
311  // Find eccentricity of the node (only within the data realm of the execution flow graph)
312  recursiveVisit(node);
313 
314  float rank = m_maxKnownDepth;
315  node.setRank(rank);
316 
317  // Reset visitor for next nodes, if any
318  reset();
319 
320  return true;
321  }
void recursiveVisit(AlgorithmNode &node)
Depth-first node parser to calculate node eccentricity (only within the data realm of the precedence ...

Member Data Documentation

uint concurrency::RankerByDataRealmEccentricity::m_currentDepth

Definition at line 139 of file PRGraphVisitors.h.

uint concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth

Definition at line 140 of file PRGraphVisitors.h.


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