|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.util.Utils
at.dms.kjc.flatgraph.GraphFlattener
public class GraphFlattener
This class will create a graph of FlatNode
that represents the underlying SIR graph of the application. It is basically
the SIR graph without containers.
The constructed graph of FlatNodes, the Flat graph, will have one node for each SIROperator in the SIR graph (except when --sync is enabled), but there will exist no containers, FlatNodes directly connect to/from their downstream/upstream nodes.
Each SIROperator will be converted to a FlatNode: SIRFilter into a FlatNode with at most one input/one output, SIRSplitter into a multiple output/one input, SIRJoiner into multiple input/one output.
If --sync is enabled, it will attempt to coalesce multiple splitters or joiners into a single FlatNode.
Field Summary | |
---|---|
static LinkedList<FlatNode> |
needsToBeSched
Used by --sync (synch removal) to reschedule the flat graph |
FlatNode |
top
the toplevel, entry, FlatNode of the constructed Flat graph |
Fields inherited from class at.dms.util.Utils |
---|
EMPTY_LIST, getForLoopCallers |
Constructor Summary | |
---|---|
GraphFlattener(SIROperator toplevel)
Create a graph of FlatNodes that represents the SIR graph of the application rooted at toplevel. |
Method Summary | |
---|---|
static boolean |
countMe(SIRFilter filter)
Return true if this filter should be mapped to a tile, meaning it is not a predefined filter. |
FlatNode |
getFlatNode(SIROperator key)
Given an SIROperator, key, return the FlatNode that was created to represent key, or null if one was not created. |
static CType |
getJoinerType(FlatNode joiner)
Return the data type of items that flow through joiner. |
static int |
getMult(FlatNode node,
boolean init,
HashMap<FlatNode,Integer> initExecutionCounts,
HashMap<FlatNode,Integer> steadyExecutionCounts)
Return the multiplicity of node in the schedule determined by init. |
int |
getNumTiles()
Returns the number of tiles that would be needed to execute this graph. |
static CType |
getOutputType(FlatNode node)
Return the output type of the FlatNode node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public FlatNode top
public static LinkedList<FlatNode> needsToBeSched
Constructor Detail |
---|
public GraphFlattener(SIROperator toplevel)
toplevel
- The toplevel SIR container of the application.Method Detail |
---|
public int getNumTiles()
public FlatNode getFlatNode(SIROperator key)
key
-
public static CType getOutputType(FlatNode node)
node
- The FlatNode in question.
public static boolean countMe(SIRFilter filter)
filter
- The SIRFilter is question.
public static CType getJoinerType(FlatNode joiner)
joiner
- The joiner
public static int getMult(FlatNode node, boolean init, HashMap<FlatNode,Integer> initExecutionCounts, HashMap<FlatNode,Integer> steadyExecutionCounts)
node
- init
- If true use initExecutionCounts, else use steadyExecutionCountsinitExecutionCounts
- HashMap of FlatNode->Integer for init multiplicitiessteadyExecutionCounts
- HashMap of FlatNode->Integer for steadyx multiplicities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |