Top Up Prev Next Bottom Contents Index Search

15.7 Class DLGraph

Class DLGraph, derived from class ParGraph, is the input APEG graph to the dynamic level scheduler. It consists of DLNode objects created by redefining the following method:

EGNode* newNode(DataFlowStar* s, int i); 
This method creates a node in the APEG graph. Here, it creates a DLNode.

DLGraph has a protected member maintaining the number of unscheduled nodes.

int unschedNodes; 

We may check whether the scheduler is deadlocked or not by examining this variable when the scheduler halts. This can be manipulated by the public methods

void decreaseNodes(); 
int numUnSchedNodes();
The first method decrements unschedNodes and the second method returns it.

The DLGraph class redefines resetGraph method.

void resetGraph(); 
This makes the initial list of runnable nodes and sets the variable described above. This method internally calls the following protected method:

virtual void resetNodes(); 
This method resets the busy flag and the waitNum member of DLNodes.

There are three other public members.

DLNode* fetchNode(); 
Fetches a DLNode from the head of the list of runnable nodes.

StringList display(); 
Displays the APEG and the list of source nodes.



Top Up Prev Next Bottom Contents Index Search

ptolemy@eecs.berkeley.edu
Copyright © 1990-1997, University of California. All rights reserved.