| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

ExecutionFlowManager.cpp
Go to the documentation of this file.
1 #include "ExecutionFlowManager.h"
2
3 namespace concurrency
4 {
5
6 namespace recursive_CF
7 {
8
9 //---------------------------------------------------------------------------
10 void ExecutionFlowManager::initialize( ControlFlowGraph* graph,
11 const std::unordered_map<std::string, unsigned int>& algname_index_map )
12 {
13 m_CFGraph = graph;
14 graph->initialize( algname_index_map );
15 }
16
17 void ExecutionFlowManager::updateEventState( AlgsExecutionStates& algo_states,
18 std::vector<int>& node_decisions ) const
19 {
20 m_CFGraph->updateEventState( algo_states, node_decisions );
21 }
22
23 //---------------------------------------------------------------------------
24 bool ExecutionFlowManager::rootDecisionResolved( const std::vector<int>& node_decisions ) const
25 {
26
27 return ( -1 != node_decisions[m_CFGraph->getHeadNode()->getNodeIndex()] ) ? true : false;
28 }
29 }
30 }
concurrency::recursive_CF::ExecutionFlowManager::m_CFGraph
ControlFlowGraph * m_CFGraph
the control flow graph
Definition: ExecutionFlowManager.h:55
ExecutionFlowManager.h
concurrency
Definition: ControlFlowGraph.cpp:4
concurrency::recursive_CF::ControlFlowNode::getNodeIndex
const unsigned int & getNodeIndex() const
Get node index.
Definition: ControlFlowGraph.h:43
concurrency::recursive_CF::ControlFlowGraph::updateEventState
void updateEventState(AlgsExecutionStates &states, std::vector< int > &node_decisions) const
Start revision of states and decisions.
Definition: ControlFlowGraph.cpp:233
concurrency::recursive_CF::ControlFlowGraph
Definition: ControlFlowGraph.h:144
AlgsExecutionStates
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
Definition: AlgsExecutionStates.h:28
plotSpeedupsPyRoot.graph
graph
Definition: plotSpeedupsPyRoot.py:142
std::vector< int >
concurrency::recursive_CF::ControlFlowGraph::getHeadNode
DecisionNode * getHeadNode() const
Get head node.
Definition: ControlFlowGraph.h:161
concurrency::recursive_CF::ExecutionFlowManager::initialize
void initialize(ControlFlowGraph *graph, const std::unordered_map< std::string, unsigned int > &algname_index_map)
Initialize the control flow manager It greps the topalg list and the index map for the algo names...
Definition: ExecutionFlowManager.cpp:10
concurrency::recursive_CF::ControlFlowGraph::initialize
void initialize(const std::unordered_map< std::string, unsigned int > &algname_index_map)
Initialize graph.
Definition: ControlFlowGraph.cpp:140
concurrency::recursive_CF::ExecutionFlowManager::updateEventState
void updateEventState(AlgsExecutionStates &algo_states, std::vector< int > &node_decisions) const
Update states and decisions of algorithms.
Definition: ExecutionFlowManager.cpp:17
concurrency::recursive_CF::ExecutionFlowManager::rootDecisionResolved
bool rootDecisionResolved(const std::vector< int > &node_decisions) const
Check whether root decision was resolved.
Definition: ExecutionFlowManager.cpp:24
std::unordered_map< std::string, unsigned int >