at.dms.kjc.sir.lowering.partition
Class PartitionDot

java.lang.Object
  extended by at.dms.kjc.StreamItDot
      extended by at.dms.kjc.sir.lowering.partition.PartitionDot
All Implemented Interfaces:
AttributeStreamVisitor

public class PartitionDot
extends StreamItDot

This class extends the main streamit dot printer to annotate the dot graphs with partitioning information.


Nested Class Summary
 
Nested classes/interfaces inherited from class at.dms.kjc.StreamItDot
StreamItDot.NamePair
 
Constructor Summary
PartitionDot(SIRStream str, PrintStream outputstream, HashMap<SIROperator,Object> partitions, String prefixLabel, boolean simple, boolean markStateful, boolean markIO)
          PrefixLabel is a prefix for each node.
 
Method Summary
 String getClusterString(SIRStream self)
          Override to show partitions.
static void printPartitionGraph(SIRStream str, String filename, HashMap<SIROperator,Object> partitions)
          Prints dot graph of 'str' to 'filename'.
static void printScheduleGraph(SIRStream str, String filename, HashMap[] execCounts)
          For printing execution counts.
 Object visitFilter(SIRFilter self, JFieldDeclaration[] fields, JMethodDeclaration[] methods, JMethodDeclaration init, JMethodDeclaration work, CType inputType, CType outputType)
           
 Object visitJoiner(SIRJoiner self, SIRJoinType type, JExpression[] expWeights)
           
 Object visitSplitter(SIRSplitter self, SIRSplitType type, JExpression[] expWeights)
           
 
Methods inherited from class at.dms.kjc.StreamItDot
compile, getName, makeFilterLabel, makeLabelledNode, print, printGraph, printGraph, processWorkFunction, visitFeedbackLoop, visitPhasedFilter, visitPipeline, visitSplitJoin, visitStructure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionDot

public PartitionDot(SIRStream str,
                    PrintStream outputstream,
                    HashMap<SIROperator,Object> partitions,
                    String prefixLabel,
                    boolean simple,
                    boolean markStateful,
                    boolean markIO)
PrefixLabel is a prefix for each node. If 'simple' is true, then filter names are simple idents (not unique).

Method Detail

visitFilter

public Object visitFilter(SIRFilter self,
                          JFieldDeclaration[] fields,
                          JMethodDeclaration[] methods,
                          JMethodDeclaration init,
                          JMethodDeclaration work,
                          CType inputType,
                          CType outputType)
Specified by:
visitFilter in interface AttributeStreamVisitor
Overrides:
visitFilter in class StreamItDot

visitSplitter

public Object visitSplitter(SIRSplitter self,
                            SIRSplitType type,
                            JExpression[] expWeights)
Specified by:
visitSplitter in interface AttributeStreamVisitor
Overrides:
visitSplitter in class StreamItDot

visitJoiner

public Object visitJoiner(SIRJoiner self,
                          SIRJoinType type,
                          JExpression[] expWeights)
Specified by:
visitJoiner in interface AttributeStreamVisitor
Overrides:
visitJoiner in class StreamItDot

getClusterString

public String getClusterString(SIRStream self)
Override to show partitions.

Overrides:
getClusterString in class StreamItDot

printPartitionGraph

public static void printPartitionGraph(SIRStream str,
                                       String filename,
                                       HashMap<SIROperator,Object> partitions)
Prints dot graph of 'str' to 'filename'.


printScheduleGraph

public static void printScheduleGraph(SIRStream str,
                                      String filename,
                                      HashMap[] execCounts)
For printing execution counts. here 'execCounts' is in the format returned by SIRScheduler.getExecutionCounts