int createMe(Galaxy& g, int selfLoopFlag = 0);Is the main routine to create and initialize the APEG of the argument Galaxy. Using
createMe
method of the ExpandedGraph class, it creates an APEG. After that, it resets the busy flags of the ParNodes, and calls
virtual int initializeGraph();This is a protected method. It performs 4 main tasks as follows. (1) Call a protected method
removeArcsWithDelay
to remove the arcs with delays, and to store the source and the destination nodes of each removed arc into the list of NodePairs . The list is a protected member, named nodePairs
of SequentialList class.
void removeArcsWithDelay();(2) For each node, compute the static level (
SequentialList nodePairs;
StaticLevel)
by calling a protected method SetNodeSL.
int SetNodeSL(ParNode* n);(3) Sum the execution times of all nodes and save the total execution time to a protected member
ExecTotal.
int ExecTotal;(4) Assign the larger static level than any other nodes to the nodes at the wormhole boundary. This let the parallel scheduler schedules the nodes at the wormhole boundary first.
EGNode* newNode(DataFlowStar*, int);Redefines the virtual method to create a ParNode associated with the given invocation of the argument star.
ostream* logstrm;This is a stream object for logging information.
EGNodeList runnableNodes;The list of runnable (or fireable) nodes are stored in
void findRunnableNodes();
runnableNodes.
The above method is to initialize the list with all root ParNodes.
int getExecTotal();Returns the total execution time of the graph and the original graph.
Galaxy* myGalaxy();
void setLog(ostream* l);Sets the stream object
logstrm.
void replenish(int flag);This method initialize the temporary ancestor list and descendant list of all ParNodes in the graph.
void sortedInsert(EGNodeList& l, ParNode* n, int flag);Insert a ParNode,
n,
into the EGNodeList, l,
in sorted order. It sorts nodes of highest StaticLevel
first if flag
= 1, or lowest StaticLevel
first if flag
= 0.
void restoreHiddenGates();This method restores the hidden EGGates from
removeArcsWithDelay
method to the initial list, either ancestors
or descendants
of the parent node.
int pairDistance();After scheduling is completed, it is supposed to return the maximum scheduling distance between node pairs in
nodePairs
list. Currently, however, it just returns -1, indicating the information is not available.
~ParGraph();The destructor initializes the
nodePairs
list.
NodePair(ParNode* src, ParNode* dest);The constructor requires two arguments of the source and the destination nodes, while the next two methods return the node.
ParNode* getStart();
ParNode* getDest();