|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.cluster.FixedBufferTape
public class FixedBufferTape
Calculate buffer sizes for an edge (a tape) that uses a fixed-length buffer.
Calculates buffer size.
Separately, calculates extra size needed for peeks (as int, boolean).
Separately calculates whether to use modular buffers.
TODO: determine if ever need size for init and size for steady separately.
This code is specific to the cluster backend. To generalize would have
to make all backends inherit from a common ancestor defining initExecutionCounts and steadyExecutionCounts:
doable, but not today.
Constructor Summary | |
---|---|
FixedBufferTape()
|
Method Summary | |
---|---|
static int |
bufferSize(int src,
int dst,
CodegenPrintWriter p,
boolean printComments)
Static method to calculate a buffer size for standalone mode. |
static int |
getRemaining(int src,
int dst)
Determine the size of largest number of items that may be on a tape before an execution of a work function. |
static boolean |
isFixedBuffer(int src,
int dst)
Determine whether a tape is is "fused". |
static boolean |
needsModularBuffer(int src,
int dst)
Return whether a tape buffer should be modular based on destination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedBufferTape()
Method Detail |
---|
public static boolean isFixedBuffer(int src, int dst)
src
- the NetStream number of a SIROperator at source of tapedst
- the NetStream number of a SIROperator at destination of tape
public static int getRemaining(int src, int dst)
src
- the NetStream number of a SIROperator for the source of the tapedst
- the NetStream number of a SIROperator for the destination of the tape
public static boolean needsModularBuffer(int src, int dst)
src
- the NetStream number of a SIROperator for the source of the tapedst
- the NetStream number of a SIROperator for the destination of the tape
public static int bufferSize(int src, int dst, CodegenPrintWriter p, boolean printComments)
ClusterBackend.initExecutionCounts
and ClusterBackend.steadyExecutionCounts
src
- from getSource on a NetStreamdst
- from getDest on the same NetStreamp
- a CodeGenPrintWriter for generating comments or null.printComments
- whether to generate comments: should be false if p is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |