at.dms.kjc.sir.lowering.partition.cache
Class CachePartitioner

java.lang.Object
  extended by at.dms.kjc.sir.lowering.partition.ListPartitioner
      extended by at.dms.kjc.sir.lowering.partition.cache.CachePartitioner

public class CachePartitioner
extends ListPartitioner


Field Summary
 
Fields inherited from class at.dms.kjc.sir.lowering.partition.ListPartitioner
first, last, nodes, numTiles, str, work
 
Constructor Summary
CachePartitioner(SIRStream str, WorkEstimate work, int numTiles, int code_cache_size, int data_cache_size)
           
 
Method Summary
 SIRStream calcPartitions(Map<SIROperator,Integer> partitionMap)
          The toplevel call for calculating partitions without fusing anything in the stream.
static SIRStream doit(SIRStream str, int code_cache, int data_cache)
          Toplevel call.
static int getCodeCacheSize()
           
 at.dms.kjc.sir.lowering.partition.cache.CConfig getConfig(SIRStream str)
           
static int getDataCacheSize()
           
 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

CachePartitioner

public CachePartitioner(SIRStream str,
                        WorkEstimate work,
                        int numTiles,
                        int code_cache_size,
                        int data_cache_size)
Method Detail

getCodeCacheSize

public static int getCodeCacheSize()

getDataCacheSize

public static int getDataCacheSize()

doit

public static SIRStream doit(SIRStream str,
                             int code_cache,
                             int data_cache)
Toplevel call.


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.


getConfig

public at.dms.kjc.sir.lowering.partition.cache.CConfig getConfig(SIRStream str)