![]() |
The Gaudi Framework
v28r2p1 (f1a77ff4)
|
#include <src/PrecedenceRulesGraph.h>
Public Member Functions | |
AlgorithmNode (PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &algoName, bool inverted, bool allPass, bool IOBound) | |
Constructor. More... | |
~AlgorithmNode () | |
Destructor. More... | |
void | initialize (const std::unordered_map< std::string, unsigned int > &algname_index_map) override |
Initialize. More... | |
bool | accept (IGraphVisitor &visitor) override |
void | addParentNode (DecisionNode *node) |
XXX: CF tests. Method to add a parent node. More... | |
void | addSupplierNode (AlgorithmNode *node) |
Associate an AlgorithmNode, which is a data supplier for this one. More... | |
void | addConsumerNode (AlgorithmNode *node) |
Associate an AlgorithmNode, which is a data consumer of this one. More... | |
void | attachAlgorithm (IAlgorithm *ialgo) |
Attach Algorithm representative. More... | |
const std::vector< IAlgorithm * > & | getAlgorithmRepresentatives () const |
get Algorithm representatives More... | |
const std::vector< AlgorithmNode * > & | getSupplierNodes () const |
Get all supplier nodes. More... | |
const std::vector< AlgorithmNode * > & | getConsumerNodes () const |
Get all consumer nodes. More... | |
void | addOutputDataNode (DataNode *node) |
Associate an AlgorithmNode, which is a data supplier for this one. More... | |
void | addInputDataNode (DataNode *node) |
Associate an AlgorithmNode, which is a data consumer of this one. More... | |
const std::vector< DataNode * > & | getOutputDataNodes () const |
Get all supplier nodes. More... | |
const std::vector< DataNode * > & | getInputDataNodes () const |
Get all consumer nodes. More... | |
void | setRank (float &rank) |
Set Algorithm rank. More... | |
const float & | getRank () const |
Get Algorithm rank. More... | |
const unsigned int & | getAlgoIndex () const |
XXX: CF tests. More... | |
void | setIOBound (bool value) |
Set the I/O-boundness flag. More... | |
bool | isIOBound () const |
Check if algorithm is I/O-bound. More... | |
bool | dataDependenciesSatisfied (const int &slotNum) const |
Method to check whether the Algorithm has its all data dependency satisfied. More... | |
bool | dataDependenciesSatisfied (AlgsExecutionStates &states) const |
int | updateState (AlgsExecutionStates &states, std::vector< int > &node_decisions) const override |
Method to set algos to CONTROLREADY, if possible. More... | |
bool | promoteToControlReadyState (const int &slotNum, AlgsExecutionStates &states, std::vector< int > &node_decisions) const override |
XXX: CF tests. More... | |
bool | promoteToDataReadyState (const int &slotNum, const AlgorithmNode *requestor=nullptr) const |
void | updateDecision (const int &slotNum, AlgsExecutionStates &states, std::vector< int > &node_decisions, const AlgorithmNode *requestor=nullptr) const override |
XXX: CF tests. More... | |
void | printState (std::stringstream &output, AlgsExecutionStates &states, const std::vector< int > &node_decisions, const unsigned int &recursionLevel) const override |
Print a string representing the control flow state. More... | |
![]() | |
ControlFlowNode (PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name) | |
Constructor. More... | |
virtual | ~ControlFlowNode () |
Destructor. More... | |
const unsigned int & | getNodeIndex () const |
XXX: CF tests. More... | |
const std::string & | getNodeName () const |
Private Attributes | |
unsigned int | m_algoIndex |
The index of the algorithm. More... | |
std::string | m_algoName |
The name of the algorithm. More... | |
bool | m_inverted |
Whether the selection result is negated or not. More... | |
bool | m_allPass |
Whether the selection result is relevant or always "pass". More... | |
std::vector< DecisionNode * > | m_parents |
XXX: CF tests. More... | |
std::vector< AlgorithmNode * > | m_suppliers |
Vectors, used in data dependencies realm AlgorithmNodes that represent algorithms producing an input needed for the algorithm. More... | |
std::vector< AlgorithmNode * > | m_consumers |
AlgorithmNodes that represent algorithms which need the output of the algorithm. More... | |
std::vector< DataNode * > | m_outputs |
Vectors, used in augmented data dependencies realm Outputs of the algorithm, represented as DataNode's. More... | |
std::vector< DataNode * > | m_inputs |
Inputs of the algorithm, represented as DataNode's. More... | |
float | m_rank |
Algorithm rank of any kind. More... | |
std::vector< IAlgorithm * > | m_representatives |
Representatives (including clones) of the node. More... | |
bool | m_isIOBound |
If an algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck) More... | |
Additional Inherited Members | |
![]() | |
PrecedenceRulesGraph * | m_graph |
![]() | |
std::string | stateToString (const int &stateId) const |
Translation between state id and name. More... | |
![]() | |
unsigned int | m_nodeIndex |
std::string | m_nodeName |
Definition at line 140 of file PrecedenceRulesGraph.h.
|
inline |
Constructor.
Definition at line 143 of file PrecedenceRulesGraph.h.
concurrency::AlgorithmNode::~AlgorithmNode | ( | ) |
Destructor.
Definition at line 221 of file PrecedenceRulesGraph.cpp.
|
overridevirtual |
Implements concurrency::ControlFlowNode.
Definition at line 406 of file PrecedenceRulesGraph.cpp.
|
inline |
Associate an AlgorithmNode, which is a data consumer of this one.
Definition at line 159 of file PrecedenceRulesGraph.h.
void concurrency::AlgorithmNode::addInputDataNode | ( | DataNode * | node | ) |
Associate an AlgorithmNode, which is a data consumer of this one.
Definition at line 432 of file PrecedenceRulesGraph.cpp.
void concurrency::AlgorithmNode::addOutputDataNode | ( | DataNode * | node | ) |
Associate an AlgorithmNode, which is a data supplier for this one.
Definition at line 425 of file PrecedenceRulesGraph.cpp.
void concurrency::AlgorithmNode::addParentNode | ( | DecisionNode * | node | ) |
XXX: CF tests. Method to add a parent node.
Definition at line 418 of file PrecedenceRulesGraph.cpp.
|
inline |
Associate an AlgorithmNode, which is a data supplier for this one.
Definition at line 157 of file PrecedenceRulesGraph.h.
|
inline |
Attach Algorithm representative.
Definition at line 161 of file PrecedenceRulesGraph.h.
bool concurrency::AlgorithmNode::dataDependenciesSatisfied | ( | const int & | slotNum | ) | const |
Method to check whether the Algorithm has its all data dependency satisfied.
Definition at line 292 of file PrecedenceRulesGraph.cpp.
bool concurrency::AlgorithmNode::dataDependenciesSatisfied | ( | AlgsExecutionStates & | states | ) | const |
Definition at line 315 of file PrecedenceRulesGraph.cpp.
|
inline |
XXX: CF tests.
Definition at line 183 of file PrecedenceRulesGraph.h.
|
inline |
get Algorithm representatives
Definition at line 163 of file PrecedenceRulesGraph.h.
|
inline |
Get all consumer nodes.
Definition at line 167 of file PrecedenceRulesGraph.h.
|
inline |
Get all consumer nodes.
Definition at line 176 of file PrecedenceRulesGraph.h.
|
inline |
Get all supplier nodes.
Definition at line 174 of file PrecedenceRulesGraph.h.
|
inline |
Get Algorithm rank.
Definition at line 180 of file PrecedenceRulesGraph.h.
|
inline |
Get all supplier nodes.
Definition at line 165 of file PrecedenceRulesGraph.h.
|
overridevirtual |
Initialize.
Implements concurrency::ControlFlowNode.
Definition at line 230 of file PrecedenceRulesGraph.cpp.
|
inline |
Check if algorithm is I/O-bound.
Definition at line 187 of file PrecedenceRulesGraph.h.
|
overridevirtual |
Print a string representing the control flow state.
Implements concurrency::ControlFlowNode.
Definition at line 335 of file PrecedenceRulesGraph.cpp.
|
overridevirtual |
XXX: CF tests.
Implements concurrency::ControlFlowNode.
Definition at line 237 of file PrecedenceRulesGraph.cpp.
bool concurrency::AlgorithmNode::promoteToDataReadyState | ( | const int & | slotNum, |
const AlgorithmNode * | requestor = nullptr |
||
) | const |
Definition at line 256 of file PrecedenceRulesGraph.cpp.
|
inline |
Set the I/O-boundness flag.
Definition at line 185 of file PrecedenceRulesGraph.h.
|
inline |
Set Algorithm rank.
Definition at line 178 of file PrecedenceRulesGraph.h.
|
overridevirtual |
XXX: CF tests.
Implements concurrency::ControlFlowNode.
Definition at line 371 of file PrecedenceRulesGraph.cpp.
|
overridevirtual |
Method to set algos to CONTROLREADY, if possible.
Implements concurrency::ControlFlowNode.
Definition at line 345 of file PrecedenceRulesGraph.cpp.
|
private |
The index of the algorithm.
Definition at line 212 of file PrecedenceRulesGraph.h.
|
private |
The name of the algorithm.
Definition at line 214 of file PrecedenceRulesGraph.h.
|
private |
Whether the selection result is relevant or always "pass".
Definition at line 218 of file PrecedenceRulesGraph.h.
|
private |
AlgorithmNodes that represent algorithms which need the output of the algorithm.
Definition at line 226 of file PrecedenceRulesGraph.h.
|
private |
Inputs of the algorithm, represented as DataNode's.
Definition at line 232 of file PrecedenceRulesGraph.h.
|
private |
Whether the selection result is negated or not.
Definition at line 216 of file PrecedenceRulesGraph.h.
|
private |
If an algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)
Definition at line 238 of file PrecedenceRulesGraph.h.
|
private |
Vectors, used in augmented data dependencies realm Outputs of the algorithm, represented as DataNode's.
Definition at line 230 of file PrecedenceRulesGraph.h.
|
private |
XXX: CF tests.
Definition at line 220 of file PrecedenceRulesGraph.h.
|
private |
Algorithm rank of any kind.
Definition at line 234 of file PrecedenceRulesGraph.h.
|
private |
Representatives (including clones) of the node.
Definition at line 236 of file PrecedenceRulesGraph.h.
|
private |
Vectors, used in data dependencies realm AlgorithmNodes that represent algorithms producing an input needed for the algorithm.
Definition at line 224 of file PrecedenceRulesGraph.h.