at.dms.kjc.sir.lowering.partition.dynamicprog
Class DynamicProgPartitioner

java.lang.Object
  extended by at.dms.kjc.sir.lowering.partition.ListPartitioner
      extended by at.dms.kjc.sir.lowering.partition.dynamicprog.DynamicProgPartitioner

public class DynamicProgPartitioner
extends ListPartitioner


Field Summary
 
Fields inherited from class at.dms.kjc.sir.lowering.partition.ListPartitioner
first, last, nodes, numTiles, str, work
 
Constructor Summary
DynamicProgPartitioner(SIRStream str, WorkEstimate work, int numTiles, boolean joinersNeedTiles, boolean limitICode, boolean strict)
          As above, without noHorizFuse.
DynamicProgPartitioner(SIRStream str, WorkEstimate work, int numTiles, boolean joinersNeedTiles, boolean limitICode, boolean strict, HashSet noHorizFuse)
          joinersNeedTiles
 
Method Summary
 SIRStream calcPartitions(Map<SIROperator,Integer> partitionMap)
          The toplevel call for calculating partitions without fusing anything in the stream.
 SIRStream fuseall(SIRStream str)
           
 int getBottleneck()
           
 at.dms.kjc.sir.lowering.partition.dynamicprog.DPConfig getConfig(SIRStream str)
           
 HashSet getNoHorizFuse()
          Set of filters that should not be fused horizontally.
 boolean joinersNeedTiles()
          Whether or not joiners in this need a tile.
 boolean limitICode()
          Whether or not to limit icode of fused parts.
static void saveScalingStatistics(SIRStream str, WorkEstimate work, int maxTiles)
          Collect scaling statistics for all partitions 1...
 SIRStream toplevel()
          This is the toplevel call for doing partitioning.
 
Methods inherited from class at.dms.kjc.sir.lowering.partition.ListPartitioner
equivStructure, getNumTiles, getWorkEstimate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicProgPartitioner

public DynamicProgPartitioner(SIRStream str,
                              WorkEstimate work,
                              int numTiles,
                              boolean joinersNeedTiles,
                              boolean limitICode,
                              boolean strict,
                              HashSet noHorizFuse)
joinersNeedTiles
indicates whether or not joiners in the graph require a tile in the allocation. If false, joiners will be counted as free. If true, a tile will be allocated to each joiner, though adjacent joiners will be considered as collapsed into one.
limitICode
indicates whether or not we are considering an instruction code size limit, and factoring that into the work function.
strict
indicates if we are absolutely required to produce at most filters. If it is false, then we might produce more filters if the load balancing improves (e.g., on a multicore, might benefit from more threads if additional threads breakup the bottleneck.)


DynamicProgPartitioner

public DynamicProgPartitioner(SIRStream str,
                              WorkEstimate work,
                              int numTiles,
                              boolean joinersNeedTiles,
                              boolean limitICode,
                              boolean strict)
As above, without noHorizFuse.

Method Detail

saveScalingStatistics

public static void saveScalingStatistics(SIRStream str,
                                         WorkEstimate work,
                                         int maxTiles)
Collect scaling statistics for all partitions 1...
maxTiles
, assuming joiners need tiles.


toplevel

public SIRStream toplevel()
This is the toplevel call for doing partitioning. Returns the partitioned stream.


calcPartitions

public SIRStream calcPartitions(Map<SIROperator,Integer> partitionMap)
The toplevel call for calculating partitions without fusing anything in the stream. Note that the stream might be re-arranged if the partitioner couldn't undo the canonicalization that it used; that's why a new stream is returned. The hashmap that is passed in is cleared and filled with a mapping from SIROperator to String denoting list of partition numbers that a given SIROperator is assigned to.
implicit parameter str from class constructor.

Parameters:
partitionMap - The partition map to fill in.
Returns:
the (possibly munged) stream

joinersNeedTiles

public boolean joinersNeedTiles()
Whether or not joiners in this need a tile.


limitICode

public boolean limitICode()
Whether or not to limit icode of fused parts.


getNoHorizFuse

public HashSet getNoHorizFuse()
Set of filters that should not be fused horizontally.


getBottleneck

public int getBottleneck()

getConfig

public at.dms.kjc.sir.lowering.partition.dynamicprog.DPConfig getConfig(SIRStream str)

fuseall

public SIRStream fuseall(SIRStream str)