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

java.lang.Object
  extended by at.dms.kjc.sir.lowering.partition.Partitioner

public class Partitioner
extends Object


Constructor Summary
Partitioner()
           
 
Method Summary
static int countFilters(SIRStream str)
          Returns the number of filters in the graph.
static int countTilesNeeded(SIRStream str, boolean joinersNeedTiles)
          Return number of tiles needed for 'str'.
static SIRStream doit(SIRStream str, int targetCount, boolean joinersNeedTiles, boolean limitICode, boolean strict)
          Tries to adjust 'str' into 'targetCount' pieces of equal work, and return new stream.
static SIRStream doit(SIRStream str, int curCount, int targetCount, boolean joinersNeedTiles, boolean limitICode, boolean strict)
          As above, with 'curCount' indicating the number of tiles that 'str' currently requires.
static SIRStream doit(SIRStream str, int curCount, int targetCount, boolean joinersNeedTiles, boolean limitICode, boolean strict, HashSet noHorizFuse)
          As above, with denoting a set of SIRFilters that cannot be fused horizontally.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Partitioner

public Partitioner()
Method Detail

doit

public static SIRStream doit(SIRStream str,
                             int targetCount,
                             boolean joinersNeedTiles,
                             boolean limitICode,
                             boolean strict)
Tries to adjust 'str' into 'targetCount' pieces of equal work, and return new stream. Indicate whether or not 'joinersNeedTiles' in the graph, or if they count for free. If 'strict' is true, we will fail with an error message if we can't succeed in fusing down to the target count; otherwise we may produce more than filters if it improves the load balancing (e.g., on a multicore, additional threads might help breakup the bottleneck)


doit

public static SIRStream doit(SIRStream str,
                             int curCount,
                             int targetCount,
                             boolean joinersNeedTiles,
                             boolean limitICode,
                             boolean strict)
As above, with 'curCount' indicating the number of tiles that 'str' currently requires.


doit

public static SIRStream doit(SIRStream str,
                             int curCount,
                             int targetCount,
                             boolean joinersNeedTiles,
                             boolean limitICode,
                             boolean strict,
                             HashSet noHorizFuse)
As above, with denoting a set of SIRFilters that cannot be fused horizontally.


countTilesNeeded

public static int countTilesNeeded(SIRStream str,
                                   boolean joinersNeedTiles)
Return number of tiles needed for 'str'.


countFilters

public static int countFilters(SIRStream str)
Returns the number of filters in the graph.