|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.dms.kjc.cluster.TapeBase
public abstract class TapeBase
| Field Summary | |
|---|---|
protected int |
dst
unique id of downstream node from NodeEnumerator |
protected String |
peek_name
name of peek routine (downstream) |
protected String |
pop_name
name of pop routine (downstream) |
protected String |
push_name
name of push routine (upstream) |
protected int |
src
unique id of upstream node from NodeEnumerator |
protected CType |
type
type of items on the tape. |
protected String |
typeString
type of items on the tape as a string. |
| Constructor Summary | |
|---|---|
TapeBase(int source,
int dest,
CType type)
Constructor. |
|
| Method Summary | |
|---|---|
abstract String |
assignPeekToVar(String varName,
String offset)
Assign the result of peeking. |
abstract String |
assignPopToVar(String varName)
Statement, but no ";" to pop an item into a variable. |
abstract String |
dataDeclaration()
Data declaration: in .c file if needed else noop. |
abstract String |
dataDeclarationH()
Data declaration: in .h file if needed else noop. |
abstract String |
downstreamCleanup()
Any cleanup needed before exit for downstream end of tape. |
abstract String |
downstreamDeclaration()
Data declaration: for code doing downstream processing. |
abstract String |
downstreamDeclarationExtern()
Data declaration: following "extern" if needed else noop. |
int |
getDest()
Destination of tape. |
String |
getPeekName()
get name of peek(int) routine for downstream end of tape. |
String |
getPopName()
get name of pop() routine for downstream end of tape. |
String |
getPushName()
get name of push(val) routine for upstream end of tape. |
int |
getSource()
Source of tape. |
CType |
getType()
Get type of objects communicated over the tape |
static Tape |
newTape(int src,
int dest,
CType type)
Select type of tape and return one. |
abstract String |
peekPrefix()
prefix to peek expression |
abstract String |
peekSuffix()
suffix to peek expression |
abstract String |
popExpr()
expression to pop an item: to end of statement. |
abstract String |
popExprCleanup()
if expression to pop an item requires statements to clean up then this is cleanup. |
abstract String |
popExprNoCleanup()
expression to pop an item, really an expression. |
String |
popManyItems(String destBuffer,
int destOffset,
int numItems)
|
abstract String |
popNStmt(int N)
prefix to pop N items discarding them. |
abstract String |
pushbackCleanup()
|
abstract String |
pushbackInit(int NumberToPush)
|
abstract String |
pushbackPrefix()
|
abstract String |
pushbackSuffix()
|
String |
pushManyItems(String sourceBuffer,
int sourceOffset,
int numItems)
|
abstract String |
pushPrefix()
prefix before data expression to push. |
abstract String |
pushSuffix()
suffix after data expression to push. |
abstract String |
topOfWorkIteration()
Code used at top of work iteration. |
abstract String |
upstreamCleanup()
Any cleanup needed before exit for upstream end of tape. |
abstract String |
upstreamDeclaration()
Data declaration: for code doing upstream processing. |
abstract String |
upstreamDeclarationExtern()
Data declaration: following "extern" if needed else noop. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String push_name
protected final String pop_name
protected final String peek_name
protected int src
protected int dst
protected CType type
protected String typeString
| Constructor Detail |
|---|
public TapeBase(int source,
int dest,
CType type)
source - a number representing input operatordest - a number representing output operatortype - a CType representing type of data communicated between the operators| Method Detail |
|---|
public static Tape newTape(int src,
int dest,
CType type)
RegisterStreams.getNodeOutStreams(at.dms.kjc.sir.SIROperator).
An input of a node is the downstream end of a tape
found by RegisterStreams.getNodeInStreams(at.dms.kjc.sir.SIROperator)
src - Source node's integer id from NodeEnumerator.dest - Destination Node's integer if deom NodeEnumerator.type - Type of data to be passed on tape.
public int getSource()
Tape
getSource in interface Tapepublic int getDest()
Tape
getDest in interface Tapepublic CType getType()
Tape
getType in interface Tapepublic String getPushName()
getPushName in interface Tapepublic String getPopName()
getPopName in interface Tapepublic String getPeekName()
getPeekName in interface Tapepublic abstract String dataDeclarationH()
Tape
dataDeclarationH in interface Tapepublic abstract String dataDeclaration()
Tape
dataDeclaration in interface Tapepublic abstract String downstreamDeclarationExtern()
Tape
downstreamDeclarationExtern in interface Tapepublic abstract String downstreamDeclaration()
Tape
downstreamDeclaration in interface Tapepublic abstract String upstreamDeclarationExtern()
Tape
upstreamDeclarationExtern in interface Tapepublic abstract String upstreamDeclaration()
Tape
upstreamDeclaration in interface Tapepublic abstract String topOfWorkIteration()
Tape
topOfWorkIteration in interface Tapepublic abstract String upstreamCleanup()
Tape
upstreamCleanup in interface Tapepublic abstract String downstreamCleanup()
Tape
downstreamCleanup in interface Tapepublic abstract String pushPrefix()
Tape
pushPrefix in interface Tapepublic abstract String pushSuffix()
Tape
pushSuffix in interface Tape
public String pushManyItems(String sourceBuffer,
int sourceOffset,
int numItems)
pushManyItems in interface Tape
public String popManyItems(String destBuffer,
int destOffset,
int numItems)
popManyItems in interface Tapepublic abstract String assignPopToVar(String varName)
Tape
assignPopToVar in interface Tapepublic abstract String popExpr()
Tape
popExpr in interface Tapepublic abstract String popExprNoCleanup()
Tape
popExprNoCleanup in interface Tapepublic abstract String popExprCleanup()
Tape
popExprCleanup in interface Tapepublic abstract String popNStmt(int N)
Tape
popNStmt in interface Tape
public abstract String assignPeekToVar(String varName,
String offset)
Tape
assignPeekToVar in interface Tapepublic abstract String peekPrefix()
Tape
peekPrefix in interface Tapepublic abstract String peekSuffix()
Tape
peekSuffix in interface Tapepublic abstract String pushbackInit(int NumberToPush)
pushbackInit in interface Tapepublic abstract String pushbackPrefix()
pushbackPrefix in interface Tapepublic abstract String pushbackSuffix()
pushbackSuffix in interface Tapepublic abstract String pushbackCleanup()
pushbackCleanup in interface Tape
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||