at.dms.kjc.flatgraph
Class ScheduledStaticStreamGraph

java.lang.Object
  extended by at.dms.kjc.flatgraph.StaticStreamGraph
      extended by at.dms.kjc.flatgraph.ScheduledStaticStreamGraph
Direct Known Subclasses:
ClusterStaticStreamGraph, SpdStaticStreamGraph

public class ScheduledStaticStreamGraph
extends StaticStreamGraph

A StaticStreamGraph represents a subgraph of the application's StreamGraph where communication within the SSG is over static rate channels. The input/output (if either exists) of an SSG is dynamic, but the sources and sinks have their input/output rates zeroed, repectively. This extension allows scheduling of a StaticStreamGraph


Field Summary
protected  boolean executionCountsValid
           
protected  HashMap<FlatNode,Integer> initExecutionCounts
           
protected  HashMap<FlatNode,Integer> steadyExecutionCounts
           
 
Fields inherited from class at.dms.kjc.flatgraph.StaticStreamGraph
flatNodes, graphFlattener, id, inputs, nexts, nextSSGs, outputs, prevs, topLevel, topLevelSIR
 
Constructor Summary
ScheduledStaticStreamGraph(StreamGraph sg, FlatNode realTop)
          create a static stream graph with realTop as the first node.
 
Method Summary
 void accept(StreamGraphVisitor s, HashSet<StaticStreamGraph> visited, boolean newHash)
          accept a stream graph visitor
protected  void createExecutionCounts()
          given the multiplicities created by the scheduler, put them into a format that is more easily used
 void createSIRGraph()
          Given the current toplevel flatnode, create the SIR graph, also regenerating the flatgraph *
protected  void dumpFlatGraph()
          dump a dot rep of the flat graph *
 HashMap<FlatNode,Integer> getExecutionCounts(boolean init)
          get the multiplicity map for the give stage as FlatNode -> int
 HashMap<FlatNode,int[]> getFlatNodeExecutions(boolean init)
          get the multiplicity map for a given stage as FlatNode -> int[]
 int getMult(FlatNode node, boolean init)
          get the multiplicity for
 HashMap<SIROperator,int[]> getSIRExecutions(boolean init)
          get the multiplicity map for the give stage as SIROperator -> int[]
 void scheduleAndCreateMults()
          call the scheduler on the toplevel SIR node and create the execution counts
 void setTopLevelSIR(SIRStream topLevelStream)
          set a new TopLevelSIR stream and flatten it, can only be called before layout!
 
Methods inherited from class at.dms.kjc.flatgraph.StaticStreamGraph
addNext, addPrev, check, filterCount, getFlatNodes, getGraphFlattener, getInputNum, getInputType, getIOFilters, getNext, getOutputNum, getOutputs, getOutputType, getParentMap, getPrev, getStreamGraph, getTopLevel, getTopLevelSIR, hasOutput, isInput, isOutput, printCounts, reconnectOutputs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initExecutionCounts

protected HashMap<FlatNode,Integer> initExecutionCounts

steadyExecutionCounts

protected HashMap<FlatNode,Integer> steadyExecutionCounts

executionCountsValid

protected boolean executionCountsValid
Constructor Detail

ScheduledStaticStreamGraph

public ScheduledStaticStreamGraph(StreamGraph sg,
                                  FlatNode realTop)
create a static stream graph with realTop as the first node.

Method Detail

createSIRGraph

public void createSIRGraph()
Given the current toplevel flatnode, create the SIR graph, also regenerating the flatgraph *

Overrides:
createSIRGraph in class StaticStreamGraph

setTopLevelSIR

public void setTopLevelSIR(SIRStream topLevelStream)
Description copied from class: StaticStreamGraph
set a new TopLevelSIR stream and flatten it, can only be called before layout!

Overrides:
setTopLevelSIR in class StaticStreamGraph

scheduleAndCreateMults

public void scheduleAndCreateMults()
call the scheduler on the toplevel SIR node and create the execution counts


dumpFlatGraph

protected void dumpFlatGraph()
dump a dot rep of the flat graph *


createExecutionCounts

protected void createExecutionCounts()
given the multiplicities created by the scheduler, put them into a format that is more easily used


getExecutionCounts

public HashMap<FlatNode,Integer> getExecutionCounts(boolean init)
get the multiplicity map for the give stage as FlatNode -> int


getSIRExecutions

public HashMap<SIROperator,int[]> getSIRExecutions(boolean init)
get the multiplicity map for the give stage as SIROperator -> int[]


getFlatNodeExecutions

public HashMap<FlatNode,int[]> getFlatNodeExecutions(boolean init)
get the multiplicity map for a given stage as FlatNode -> int[]


getMult

public int getMult(FlatNode node,
                   boolean init)
get the multiplicity for
node
in the given stage, if
init
then init stage


accept

public void accept(StreamGraphVisitor s,
                   HashSet<StaticStreamGraph> visited,
                   boolean newHash)
accept a stream graph visitor

Overrides:
accept in class StaticStreamGraph