20 #ifndef __DYNPARALOOP_HXX__
21 #define __DYNPARALOOP_HXX__
67 static const char NAME_OF_SPLITTED_SEQ_OUT[];
68 static const char OLD_NAME_OF_SPLITTED_SEQ_OUT[];
70 DynParaLoop(
const std::string& name,
TypeCode *typeOfDataSplitted, std::unique_ptr<NbBranchesAbstract>&& branchManager);
75 Node *edRemoveInitNode();
76 Node *edRemoveFinalizeNode();
79 Node *edSetInitNode(
Node *DISOWNnode);
80 Node *edSetFinalizeNode(
Node *DISOWNnode);
82 void init(
bool start=
true);
84 int getNumberOfInputPorts()
const;
85 int getNumberOfOutputPorts()
const;
87 int getBranchIDOfNode(
Node *node)
const;
88 std::list<OutputPort *> getSetOfOutputPort()
const;
89 std::list<OutputPort *> getLocalOutputPorts()
const;
91 OutPort *getOutPort(
const std::string& name)
const ;
92 InputPort *getInputPort(
const std::string& name)
const ;
93 OutputPort *getOutputPort(
const std::string& name)
const ;
95 bool isPlacementPredictableB4Run()
const;
96 void edRemoveChild(
Node *node) ;
97 bool isLoop()
const override {
return true; }
98 virtual bool edAddChild(
Node *DISOWNnode) ;
99 std::list<Node *> edGetDirectDescendants()
const;
100 std::list<InputPort *> getSetOfInputPort()
const;
101 std::list<InputPort *> getLocalInputPorts()
const;
102 unsigned getNumberOfBranchesCreatedDyn()
const ;
103 Node *getChildByShortName(
const std::string& name)
const ;
104 Node *getChildByNameExec(
const std::string& name,
unsigned id)
const ;
105 std::vector<Node *>
getNodes()
const {
return _execNodes; }
107 void setWeight(
double loopWeight);
109 bool isMultiplicitySpecified(
unsigned& value)
const;
110 void forceMultiplicity(
unsigned value);
111 virtual void checkBasicConsistency()
const ;
112 virtual std::string getErrorReport();
114 Node * getInitNode();
115 Node * getExecNode();
116 Node * getFinalizeNode();
117 int getMaxLevelOfParallelism()
const;
119 virtual void cleanDynGraph();
121 void buildDelegateOf(
InPort * & port,
OutPort *initialStart,
const std::list<ComposedNode *>& pointsOfView);
122 void buildDelegateOf(std::pair<OutPort *, OutPort *>& port,
InPort *finalTarget,
const std::list<ComposedNode *>& pointsOfView);
123 void checkCFLinks(
const std::list<OutPort *>& starts,
InputPort *end,
unsigned char& alreadyFed,
bool direction,
LinkInfo& info)
const;
124 void checkControlDependancy(
OutPort *start,
InPort *end,
bool cross,
125 std::map <
ComposedNode *, std::list < OutPort * >, SortHierarc >& fw,
126 std::vector<OutPort *>& fwCross,
127 std::map<
ComposedNode *, std::list < OutPort *>, SortHierarc >& bw,
129 virtual void checkLinkPossibility(
OutPort *start,
const std::list<ComposedNode *>& pointsOfViewStart,
130 InPort *end,
const std::list<ComposedNode *>& pointsOfViewEnd) ;
132 void prepareInputsFromOutOfScope(
int branchNb);
133 void putValueOnBranch(
Any *val,
unsigned branchId,
bool first);
134 TypeOfNode getIdentityOfNotifyerNode(
const Node *node,
unsigned&
id);
135 InputPort *getDynInputPortByAbsName(
int branchNb,
const std::string& name,
bool initNodeAdmitted);
136 virtual void forwardExecStateToOriginalBody(
Node *execNode);
138 std::vector<Node *> cloneAndPlaceNodesCoherently(
const std::vector<Node *> & origNodes);
139 Node * checkConsistencyAndSetNode(
Node* &nodeToReplace,
Node* DISOWNnode);
140 Node * removeNode(
Node* &nodeToRemove);
141 virtual void shutdown(
int level);
#define YACSLIBENGINE_EXPORT
: Interface for management of storage of data formated dynamically in its TypeCode....
void addWeight(const ComplexWeight *other)
Base class for all composed nodes.
Base class for dynamically (fully or semifully) built graphs.
bool isLoop() const override
OutputPort * edGetSamplePort()
InputPort * edGetNbOfBranchesPort()
std::unique_ptr< NbBranchesAbstract > _nbOfBranches
std::vector< Node * > _execNodes
std::vector< Node * > getNodes() const
unsigned _nbOfEltConsumed
std::vector< int > _execIds
void getWeightRegardingDPL(ComplexWeight *weight)
std::vector< Node * > _execFinalizeNodes
unsigned getNumberOfEltsConsumed() const
AnyOutputPort _splittedPort
std::vector< Node * > _execInitNodes
Class that deal with list of semantics links for high level analysis.
Base class for all nodes.
Base class for all type objects.