|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.dms.kjc.backendSupport.Channel
at.dms.kjc.backendSupport.ChannelAsArray
public class ChannelAsArray
Channel implementation as an array. This implementation should work when there is no need of a copy-down or circular buffer. It can be a superclass for copy-down array channels or circular buffer array channels. TODO: missing support for multi-buffering, rotating buffers TODO: missing support for arrays passed over channels.
| Field Summary | |
|---|---|
protected JVariableDefinition |
bufDefn
definition for array |
protected String |
bufName
array name |
protected JExpression |
bufPrefix
reference to whole array, prefix to element access |
protected int |
bufSize
array size in elements |
protected CType |
bufType
type of array: aray of element type |
protected JExpression |
head
reference to head |
protected JVariableDefinition |
headDefn
definition for head |
protected String |
headName
name of variable containing head of array offset |
protected JExpression |
tail
reference to tail |
protected JVariableDefinition |
tailDefn
definition for tail |
protected String |
tailName
name of variable containing tail of array offset |
| Fields inherited from class at.dms.kjc.backendSupport.Channel |
|---|
bufferStore, extraCount, ident, rotationLength, theEdge, unique_id |
| Constructor Summary | |
|---|---|
ChannelAsArray(Edge edge)
Constructor |
|
ChannelAsArray(SliceNode src,
SliceNode dst)
Deprecated. |
|
| Method Summary | |
|---|---|
JMethodDeclaration |
assignFromPeekMethod()
void peek(input_type val, int offset) generally assign if val is not an array, else memcpy |
JMethodDeclaration |
assignFromPopMethod()
void pop(input_type val) generally assign if val is not an array, else memcpy |
List<JStatement> |
beginInitRead()
Statements for beginning of init() on read (downstream) end of buffer |
List<JStatement> |
beginInitWrite()
Statements for beginning of init() on write (upstream) end of buffer |
List<JStatement> |
beginSteadyRead()
Statements for beginning of steady state iteration on read (downstream) end of buffer |
List<JStatement> |
beginSteadyWrite()
Statements for beginning of steady state iteration on write (upstream) end of buffer |
protected JArrayAccessExpression |
bufRef(JExpression offset)
Create an array reference given an offset |
List<JStatement> |
dataDecls()
Statements for data declaration at top of .c / .cpp file |
List<JStatement> |
dataDeclsH()
Statements for data declaration in .h file |
List<JStatement> |
endInitRead()
Statements for end of init() on read (downstream) end of buffer |
List<JStatement> |
endInitWrite()
Statements for end of init() on write (upstream) end of buffer |
List<JStatement> |
endSteadyRead()
Statements for end of steady state iteration on read (downstream) end of buffer |
List<JStatement> |
endSteadyWrite()
Statements for end of steady state iteration on write (upstream) end of buffer |
int |
getBufSize()
Actual Buffer size: use for diagnostic info only. |
static ChannelAsArray |
getChannel(Edge edge)
Make a new Channel or return an already-made channel. |
JMethodDeclaration |
peekMethod()
input_type peek(int offset) |
JMethodDeclaration |
popManyMethod()
void pop(int N). |
JMethodDeclaration |
popMethod()
input_type pop(). |
JMethodDeclaration |
pushMethod()
void push(output_type val) |
List<JStatement> |
readDecls()
Statements for other declarations needed for read in steady state but at file scope in .c / .cpp |
List<JStatement> |
readDeclsExtern()
Statements for extern declarations needed for read in steady state but at global scope in .c / .cpp |
List<JStatement> |
topOfWorkSteadyRead()
Statements for beginning of work function. |
List<JStatement> |
topOfWorkSteadyWrite()
Statements for beginning of work function. |
List<JStatement> |
writeDecls()
Statements for other declarations needed for write in steady state but at file scope in .c / .cpp |
List<JStatement> |
writeDeclsExtern()
Statements for extern declarations needed for write in steady state but at global scope in .c / .cpp |
protected JStatement |
zeroOutHead()
Create statement zeroing out head |
protected JStatement |
zeroOutTail()
Create statement zeroing out tail |
| Methods inherited from class at.dms.kjc.backendSupport.Channel |
|---|
addChannel, assignFromPeekMethodName, assignFromPopMethodName, findChannel, getBuffers, getDest, getExtraCount, getIdent, getSource, getType, peekMethodName, popManyMethodName, popMethodName, postPreworkInitRead, printBuffers, pushMethodName, reset, setExtralength, setRotationLengths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int bufSize
protected CType bufType
protected String bufName
protected String headName
protected String tailName
protected JVariableDefinition bufDefn
protected JVariableDefinition headDefn
protected JVariableDefinition tailDefn
protected JExpression bufPrefix
protected JExpression head
protected JExpression tail
| Constructor Detail |
|---|
public ChannelAsArray(Edge edge)
edge - should give enough information (indirectly) to calculate buffer size
@Deprecated
public ChannelAsArray(SliceNode src,
SliceNode dst)
| Method Detail |
|---|
protected JArrayAccessExpression bufRef(JExpression offset)
protected JStatement zeroOutHead()
protected JStatement zeroOutTail()
public int getBufSize()
public static ChannelAsArray getChannel(Edge edge)
edge - The edge that this channel implements.other - The channel that this delegates to.
public JMethodDeclaration popMethod()
popMethod in class Channelpublic JMethodDeclaration popManyMethod()
popManyMethod in class Channelpublic JMethodDeclaration assignFromPopMethod()
assignFromPopMethod in class Channelpublic JMethodDeclaration peekMethod()
peekMethod in class Channelpublic JMethodDeclaration assignFromPeekMethod()
assignFromPeekMethod in class Channelpublic JMethodDeclaration pushMethod()
pushMethod in class Channelpublic List<JStatement> beginInitRead()
beginInitRead in class Channelpublic List<JStatement> endInitRead()
endInitRead in class Channelpublic List<JStatement> beginInitWrite()
beginInitWrite in class Channelpublic List<JStatement> endInitWrite()
endInitWrite in class Channelpublic List<JStatement> beginSteadyRead()
beginSteadyRead in class Channelpublic List<JStatement> endSteadyRead()
endSteadyRead in class Channelpublic List<JStatement> beginSteadyWrite()
beginSteadyWrite in class Channelpublic List<JStatement> endSteadyWrite()
endSteadyWrite in class Channelpublic List<JStatement> topOfWorkSteadyRead()
topOfWorkSteadyRead in class Channelpublic List<JStatement> topOfWorkSteadyWrite()
topOfWorkSteadyWrite in class Channelpublic List<JStatement> dataDeclsH()
dataDeclsH in class Channelpublic List<JStatement> dataDecls()
dataDecls in class Channelpublic List<JStatement> readDeclsExtern()
readDeclsExtern in class Channelpublic List<JStatement> readDecls()
readDecls in class Channelpublic List<JStatement> writeDeclsExtern()
writeDeclsExtern in class Channelpublic List<JStatement> writeDecls()
writeDecls in class Channel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||