at.dms.kjc.rstream
Class FFSNoPeekBuffer
java.lang.Object
at.dms.kjc.rstream.FusionState
at.dms.kjc.rstream.FilterFusionState
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FFSNoPeekBuffer
public FFSNoPeekBuffer(FlatNode fnode)
- this will create both the init and the steady buffer
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