at.dms.kjc.cluster
Class DataEstimate

java.lang.Object
  extended by at.dms.kjc.cluster.DataEstimate

public class DataEstimate
extends Object

Estimates the data working set of an operator. Currently returns a magic number for splitters and joiners. For filters add the size of globals with the size of locals.


Constructor Summary
DataEstimate()
           
 
Method Summary
static int computeFilterGlobalsSize(SIRFilter filter)
          Computes the size of globals for a SIRFilter.
static int estimateDWS(SIROperator oper)
          Estimates data working set for a SIROperator
static int estimateIOSize(SIROperator oper)
          Estimates the size of data buffers needed to store input and output for a single execution of a SIROperator
static int filterGlobalsSize(SIRFilter filter)
          Returns the size of globals for a SIRFilter.
static int getTypeSize(CType type)
          Returns the size of a variable with given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataEstimate

public DataEstimate()
Method Detail

getTypeSize

public static int getTypeSize(CType type)
Returns the size of a variable with given type.

Parameters:
type - type of the variable
Returns:
size of the variable

estimateDWS

public static int estimateDWS(SIROperator oper)
Estimates data working set for a SIROperator

Parameters:
oper - the operator
Returns:
estimated size of data working set

estimateIOSize

public static int estimateIOSize(SIROperator oper)
Estimates the size of data buffers needed to store input and output for a single execution of a SIROperator

Parameters:
oper - the operator
Returns:
estimated size of data buffers

filterGlobalsSize

public static int filterGlobalsSize(SIRFilter filter)
Returns the size of globals for a SIRFilter. Also implements a cache, so that if size of globals has been calculated we just look up the value in the cache.

Parameters:
filter - the filter
Returns:
size of globals (possibly cached)

computeFilterGlobalsSize

public static int computeFilterGlobalsSize(SIRFilter filter)
Computes the size of globals for a SIRFilter.

Parameters:
filter - the filter
Returns:
computed size of globals