|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.rstream.FusionState
at.dms.kjc.rstream.JoinerFusionState
public class JoinerFusionState
This class represent the state and conversion necessary to convert a joiner FlatNode into imperative SIR code so it can be added to the application's SIR code. Essentially, we create an outer loop with trip count equal to the multiplicity of the joiner, inside the loop we read from each incoming buffer for the number of times given by the weight on the incoming edge corresponding to the buffer and place the items in the single outgoing buffer.
Field Summary | |
---|---|
static String |
INIT_PATH_COPY
|
static String |
INIT_PATH_INDEX
|
static String |
JOINERCOUNTER
|
static String |
JOINERINNERVAR
|
Fields inherited from class at.dms.kjc.rstream.FusionState |
---|
BACKUPCOUNTER, BUFFERNAME, bufferVar, fusionState, myUniqueID, necessary, node, remaining |
Constructor Summary | |
---|---|
protected |
JoinerFusionState(FlatNode node)
|
Method Summary | |
---|---|
int |
getBufferSize(FlatNode prev,
boolean init)
return the buffer size for the incoming buffer from *prev* to this node |
JVariableDefinition |
getBufferVar(FlatNode node,
boolean init)
return the var def of the incoming (pop) buffer from *node* to this joiner |
int |
getRemaining(FlatNode prev,
boolean isInit)
return the items remaining (after the init stage) on the incoming buffer from *prev* to this node. |
JStatement[] |
getWork(JBlock enclosingBlock,
boolean isInit)
Construct the code necessary to perform the joining of the incoming buffers as given by the round-robin weights of the joiner |
void |
initTasks(Vector<JFieldDeclaration> fields,
Vector<JMethodDeclaration> functions,
JBlock initFunctionCalls,
JBlock main)
Perform the initialization tasks of this joiner, including declaring the incoming buffers and calling the init path function and placing the results in the correct incoming buffer if this joiner is a feedback joiner |
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 |
Field Detail |
---|
public static String JOINERINNERVAR
public static String JOINERCOUNTER
public static String INIT_PATH_INDEX
public static String INIT_PATH_COPY
Constructor Detail |
---|
protected JoinerFusionState(FlatNode node)
Method Detail |
---|
public void initTasks(Vector<JFieldDeclaration> fields, Vector<JMethodDeclaration> functions, JBlock initFunctionCalls, JBlock main)
initTasks
in class FusionState
public JStatement[] getWork(JBlock enclosingBlock, boolean isInit)
getWork
in class FusionState
public JVariableDefinition getBufferVar(FlatNode node, boolean init)
getBufferVar
in class FusionState
public int getBufferSize(FlatNode prev, boolean init)
getBufferSize
in class FusionState
public int getRemaining(FlatNode prev, boolean isInit)
getRemaining
in class FusionState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |