int listSchedule(ParGraph* graph);This method performs the list scheduling with the input argument APEG. It should be called after all nodes are assigned to the processors. It is the last routine to be called for all parallel schedulers. It adds communication nodes to the APEG (
findCommNodes)and schedule them with the regular ParNodes. It returns the makespan of the schedule.
void findCommNodes(ParGraph* graph);This method puts a pair of communication ParNodes, a send node and a receive node, on the arc between two nodes assigned to the different processors. Note that we use
tempDescslist of ParNode class to insert these nodes instead of modifying the APEG. We store the newly created communication ParNodes in
SCommNodes.The procedure consists of two stages. In the first stage, all regular arcs in the APEG are considered. The
StaticLevelof the send node is assigned to that of the source node plus one to ensure that the send node is scheduled right after the source node. The static level of the receive node is assigned to the same value as the destination node. In the second stage, all hidden arcs are considered. In this case, the
StaticLevelof communication nodes are assigned to 1, the minimum value since they may be scheduled at the end of the schedule. The number of interprocessor requirements are saved in a protected member,
int getMakespan();Returns the longest scheduled time among all UniProcessors.
int numProcs;These members specify the number of processors, the pointer to the multiprocessor target class, and the list of communication nodes added during
IntArray pIndex;Is used to access the processors in the order of available time.
void scheduleParNode(ParNode* node);This method schedules a parallel node (a wormhole or a data-parallel star) inside the
listSchedulemethod. Note that the processors are already assigned for the node.
virtual ParNode* createCommNode(int i);Is a virtual method to create a ParNode with type given as an argument. It is virtual since the derived scheduler may want to create a node of derived class of ParNode.
void removeCommNodes();Clears the
void sortWithAvailTime(int guard);Sort the processors with their available times unless no node is assigned to the processor. All idle processors are appended after the processors that are available at
guardtime and before the processor busy at
guardtime. Store the results to
FALSE, based on whether all invocations of a star are enforced to be scheduled on the same processor or not.
ParProcessors(int, MultiTarget*);The constructor has two arguments: the number of processors and the target pointer. It creates
pIndexarray and initialize other data structures. The destructor clears
void mapTargets(IntArray* array);The above methods perform the actual action defined in the ParScheduler class. For description, refer to class ParScheduler. The last method deliver the generate code from each processor to the target class.
int size();returns the number of processors.
virtual UniProcessor* getProc(int num);This method returns the UniProcessor with a given index. It is virtual since the derived class wants to return it own specific class derived from UniProcessor class.
StringList display(NamedObj* gal);These methods return the StringList contains the scheduling result and the sub-universe description.
ParNode* matchCommNodes(DataFlowStar*, EGGate*, PortHole);This method is used in sub-universe generation. The first argument is a communication star, either a send star or a receive star, that the system automatically inserts for interprocessor communication. The second argument is the EGGate that the interprocessor communication (IPC) occurs. If the second argument is
NULL, the third argument indicates the porthole that the IPC occurs. In case all invocations of any star are assigned to the same processor, the sub-universe creation procedure is greatly simplified: we do not need to look at the APEG, rather look at the original SDF graph to create the sub-universe. It is the case when the second argument becomes
NULL. This method sets the pointer of the communication star to the corresponding ParNode that are inserted during