The Gaudi Framework  master (37c0b60a)
Rankers.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef RANKERS_H_
12 #define RANKERS_H_
13 
14 #include "../PrecedenceRulesGraph.h"
15 #include "IGraphVisitor.h"
16 
17 namespace concurrency {
18 
19  //--------------------------------------------------------------------------
21  public:
23 
24  bool visit( AlgorithmNode& ) override;
25  };
26 
27  //--------------------------------------------------------------------------
29  public:
31 
32  bool visit( AlgorithmNode& ) override;
33  void reset() override { m_nodesSucceeded = 0; }
34 
35  void runThroughAdjacents( boost::graph_traits<precedence::PrecTrace>::vertex_descriptor, precedence::PrecTrace );
36 
37  int m_nodesSucceeded{ 0 };
38  };
39 
40  //--------------------------------------------------------------------------
41  class RankerByTiming : public IGraphVisitor {
42  public:
44 
45  bool visit( AlgorithmNode& ) override;
46  };
47 
48  //--------------------------------------------------------------------------
50  public:
52 
53  bool visit( AlgorithmNode& ) override;
54  };
55 
56  //--------------------------------------------------------------------------
58  public:
60 
61  bool visit( AlgorithmNode& ) override;
62 
63  void reset() override {
64  m_currentDepth = 0;
65  m_maxKnownDepth = 0;
66  }
67 
71 
72  uint m_currentDepth{ 0 };
73  uint m_maxKnownDepth{ 0 };
74  };
75 
76 } // namespace concurrency
77 
78 #endif /* RANKERS_H_ */
concurrency::RankerByDataRealmEccentricity::reset
void reset() override
Definition: Rankers.h:63
concurrency::RankerByProductConsumption
Definition: Rankers.h:20
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::IGraphVisitor
Definition: IGraphVisitor.h:21
concurrency::AlgorithmNode
Definition: PrecedenceRulesGraph.h:484
concurrency::RankerByDataRealmEccentricity::m_currentDepth
uint m_currentDepth
Definition: Rankers.h:72
concurrency::RankerByDataRealmEccentricity::visit
bool visit(AlgorithmNode &) override
Definition: Rankers.cpp:153
IGraphVisitor.h
concurrency::RankerByEccentricity
Definition: Rankers.h:49
concurrency::RankerByCummulativeOutDegree::visit
bool visit(AlgorithmNode &) override
Definition: Rankers.cpp:38
concurrency::IGraphVisitor::visit
virtual bool visit(DecisionNode &)
Definition: IGraphVisitor.h:26
concurrency::RankerByCummulativeOutDegree::reset
void reset() override
Definition: Rankers.h:33
precedence::PrecTrace
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
Definition: PrecedenceRulesGraph.h:62
concurrency
Definition: PrecedenceRulesGraph.cpp:38
concurrency::RankerByEccentricity::visit
bool visit(AlgorithmNode &) override
Definition: Rankers.cpp:121
concurrency::RankerByCummulativeOutDegree::runThroughAdjacents
void runThroughAdjacents(boost::graph_traits< precedence::PrecTrace >::vertex_descriptor, precedence::PrecTrace)
Definition: Rankers.cpp:75
concurrency::RankerByTiming::visit
bool visit(AlgorithmNode &) override
Definition: Rankers.cpp:87
concurrency::RankerByCummulativeOutDegree
Definition: Rankers.h:28
concurrency::RankerByProductConsumption::visit
bool visit(AlgorithmNode &) override
Definition: Rankers.cpp:19
concurrency::RankerByCummulativeOutDegree::m_nodesSucceeded
int m_nodesSucceeded
Definition: Rankers.h:37
concurrency::RankerByDataRealmEccentricity::m_maxKnownDepth
uint m_maxKnownDepth
Definition: Rankers.h:73
concurrency::RankerByTiming
Definition: Rankers.h:41
concurrency::RankerByDataRealmEccentricity
Definition: Rankers.h:57