at.dms.kjc.backendSupport
Class CodeStoreHelperSimple

java.lang.Object
  extended by at.dms.kjc.backendSupport.MinCodeUnit
      extended by at.dms.kjc.backendSupport.CodeStoreHelper
          extended by at.dms.kjc.backendSupport.CodeStoreHelperSimple
All Implemented Interfaces:
SIRCodeUnit

public class CodeStoreHelperSimple
extends CodeStoreHelper

CodeStore helper routines for FilterSliceNode that does not need a peek buffer.

Author:
dimock

Field Summary
 
Fields inherited from class at.dms.kjc.backendSupport.CodeStoreHelper
backEndBits, initMethod, initStage, INLINE_WORK, preWorkMethod, primePumpMethod, primePumpStage, sliceNode, steadyStage, uniqueID, workCounter, workMethod
 
Constructor Summary
CodeStoreHelperSimple(FilterSliceNode node, BackEndFactory backEndBits)
          Constructor
 
Method Summary
 JMethodDeclaration getInitStageMethod()
          Calculate and return the method that implements the init stage computation for this filter.
 JMethodDeclaration getPrimePumpMethod()
           
 JBlock getSteadyBlock()
           
 
Methods inherited from class at.dms.kjc.backendSupport.CodeStoreHelper
addHelperForSliceNode, findHelperForSliceNode, getInitMethod, getPreWorkMethod, getPrimePumpMethodForFilter, getUniqueID, getUsefulFields, getUsefulMethods, getWorkFunctionBlock, getWorkFunctionCall, getWorkMethod, reset, setInitMethod, setPreWorkMethod, setWorkMethod
 
Methods inherited from class at.dms.kjc.backendSupport.MinCodeUnit
addField, addFields, addMethod, addMethods, getFields, getMethods, setFields, setMethods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeStoreHelperSimple

public CodeStoreHelperSimple(FilterSliceNode node,
                             BackEndFactory backEndBits)
Constructor

Parameters:
node - A filter slice node to wrap code for.
backEndBits - The back end factory as a source of data and back end specific functions.
Method Detail

getInitStageMethod

public JMethodDeclaration getInitStageMethod()
Calculate and return the method that implements the init stage computation for this filter. It should be called only once in the generated code.

This does not include the call to the init function of the filter. That is done in RawComputeCodeStore#addInitFunctionCall.

Specified by:
getInitStageMethod in class CodeStoreHelper
Returns:
The method that implements the init stage for this filter.

getPrimePumpMethod

public JMethodDeclaration getPrimePumpMethod()
Specified by:
getPrimePumpMethod in class CodeStoreHelper
Returns:
The method to call for one execution of the filter in the prime pump stage.

getSteadyBlock

public JBlock getSteadyBlock()
Specified by:
getSteadyBlock in class CodeStoreHelper
Returns:
The block we should inline to execute the steady-state