#include <src/EFGraphVisitors.h>
Definition at line 9 of file EFGraphVisitors.h.
concurrency::RunSimulator::RunSimulator |
( |
const int & |
slotNum | ) |
|
|
inline |
concurrency::RunSimulator::~RunSimulator |
( |
| ) |
|
|
inlineoverride |
void concurrency::RunSimulator::reset |
( |
| ) |
|
|
inlineoverridevirtual |
bool concurrency::RunSimulator::visit |
( |
DecisionNode & |
node | ) |
|
|
overridevirtual |
Implements concurrency::IGraphVisitor.
Definition at line 14 of file EFGraphVisitors.cpp.
17 bool allChildDecisionsResolved =
true;
18 for (
auto child : node.getDaughters()) {
19 int& childDecision = child->m_graph->getNodeDecisions(
m_slotNum)[child->getNodeIndex()];
21 if (childDecision == 1 && node.m_modeOR && node.m_isLazy) {
22 node.m_graph->getNodeDecisions(
m_slotNum)[node.getNodeIndex()] = 1;
26 if (childDecision == -1) {
27 allChildDecisionsResolved =
false;
31 if (allChildDecisionsResolved)
32 node.m_graph->getNodeDecisions(
m_slotNum)[node.getNodeIndex()] = 1;
34 return allChildDecisionsResolved;
Implements concurrency::IGraphVisitor.
Definition at line 56 of file EFGraphVisitors.cpp.
60 int& decision = decisions[node.getNodeIndex()];
62 if (State::INITIAL == states[node.getAlgoIndex()]) {
63 states.
updateState(node.getAlgoIndex(), State::CONTROLREADY);
64 if (node.dataDependenciesSatisfied(
m_slotNum)) {
65 states.
updateState(node.getAlgoIndex(), State::DATAREADY);
66 states.
updateState(node.getAlgoIndex(), State::SCHEDULED);
67 states.
updateState(node.getAlgoIndex(), State::EVTACCEPTED);
73 }
else if (State::CONTROLREADY == states[node.getAlgoIndex()] && node.dataDependenciesSatisfied(
m_slotNum)) {
74 states.
updateState(node.getAlgoIndex(), State::DATAREADY);
75 states.
updateState(node.getAlgoIndex(), State::SCHEDULED);
76 states.
updateState(node.getAlgoIndex(), State::EVTACCEPTED);
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
StatusCode updateState(unsigned int iAlgo, State newState)
bool concurrency::RunSimulator::visitEnter |
( |
DecisionNode & |
node | ) |
const |
|
overridevirtual |
bool concurrency::RunSimulator::visitEnter |
( |
AlgorithmNode & |
node | ) |
const |
|
overridevirtual |
bool concurrency::RunSimulator::visitLeave |
( |
DecisionNode & |
node | ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: