at.dms.kjc.rstream
Class FFSNoPeekBuffer

java.lang.Object
  extended by at.dms.kjc.rstream.FusionState
      extended by at.dms.kjc.rstream.FilterFusionState
          extended by at.dms.kjc.rstream.FFSNoPeekBuffer

public class FFSNoPeekBuffer
extends FilterFusionState

This class creates imperative SIR code to implement StreamIt's filter abstraction. For each filter we have a pop buffer (incoming buffer) that the filter pops from. It uses the downstream's FusionState incoming buffer to write its results to. For peeking buffers, we move the non-pop'ed items remaining on the incoming buffer after execution to the beginning of the buffer


Field Summary
 
Fields inherited from class at.dms.kjc.rstream.FilterFusionState
dontGeneratePopDecl, filter, FORINDEXNAME, loopCounterVar, POPCOUNTERNAME, popCounterVar, PUSHCOUNTERNAME, pushCounterVar, pushCounterVarInit
 
Fields inherited from class at.dms.kjc.rstream.FusionState
BACKUPCOUNTER, BUFFERNAME, bufferVar, fusionState, myUniqueID, necessary, node, remaining
 
Constructor Summary
FFSNoPeekBuffer(FlatNode fnode)
          this will create both the init and the steady buffer
 
Method Summary
 int getBufferSize(FlatNode prev, boolean init)
          return the incoming buffer (pop buffer) size
 JStatement[] getWork(JBlock enclosingBlock, boolean isInit)
          Return a block has the necessary SIR imperative instructions to execution this filter in the init stage (*isInit* == true) or the steady state (*isInit* == false), add all declaration to *enclosingBlock*.
 void initTasks(Vector<JFieldDeclaration> fields, Vector<JMethodDeclaration> functions, JBlock initFunctionCalls, JBlock main)
          Perform any initialization tasks necessary for the filter, including declaring the pop buffer, adding helper functions, adding fields, and adding the init function.
 
Methods inherited from class at.dms.kjc.rstream.FilterFusionState
checkHelperFunction, getBufferVar, getFilter, getPopCounterVar, getPushBufferVar, getPushCounterVar, getRemaining, sharedBufferVar
 
Methods inherited from class at.dms.kjc.rstream.FusionState
getFusionState, getNode, intAssignStm, isNecesary, makeBuffer, remainingBackupLoop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FFSNoPeekBuffer

public FFSNoPeekBuffer(FlatNode fnode)
this will create both the init and the steady buffer

Method Detail

getBufferSize

public int getBufferSize(FlatNode prev,
                         boolean init)
return the incoming buffer (pop buffer) size

Specified by:
getBufferSize in class FilterFusionState

initTasks

public void initTasks(Vector<JFieldDeclaration> fields,
                      Vector<JMethodDeclaration> functions,
                      JBlock initFunctionCalls,
                      JBlock main)
Perform any initialization tasks necessary for the filter, including declaring the pop buffer, adding helper functions, adding fields, and adding the init function.

Specified by:
initTasks in class FilterFusionState

getWork

public JStatement[] getWork(JBlock enclosingBlock,
                            boolean isInit)
Return a block has the necessary SIR imperative instructions to execution this filter in the init stage (*isInit* == true) or the steady state (*isInit* == false), add all declaration to *enclosingBlock*.

Specified by:
getWork in class FilterFusionState