|
||||||||||
| 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
at.dms.kjc.backendSupport.ChannelAsCircularArray
public class ChannelAsCircularArray
Implement a channel as a circular array. The size of the array is the power of 2 >= the maximum number of elements stored in the array.
| Field Summary | |
|---|---|
protected int |
offsetMask
buffer size is alway power of 2, nmask id power of 2 - 1 |
| Fields inherited from class at.dms.kjc.backendSupport.ChannelAsArray |
|---|
bufDefn, bufName, bufPrefix, bufSize, bufType, head, headDefn, headName, tail, tailDefn, tailName |
| Fields inherited from class at.dms.kjc.backendSupport.Channel |
|---|
bufferStore, extraCount, ident, rotationLength, theEdge, unique_id |
| Constructor Summary | |
|---|---|
ChannelAsCircularArray(Edge edge)
Constructor |
|
| 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> |
beginSteadyRead()
Statements for beginning of steady state iteration on read (downstream) end of buffer: overrides superclass to have no statements here. |
List<JStatement> |
beginSteadyWrite()
Statements for beginning of steady state iteration on write (upstream) end of buffer overrides superclass to have no statements here. |
static ChannelAsCircularArray |
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) |
| Methods inherited from class at.dms.kjc.backendSupport.ChannelAsArray |
|---|
beginInitRead, beginInitWrite, bufRef, dataDecls, dataDeclsH, endInitRead, endInitWrite, endSteadyRead, endSteadyWrite, getBufSize, readDecls, readDeclsExtern, topOfWorkSteadyRead, topOfWorkSteadyWrite, writeDecls, writeDeclsExtern, zeroOutHead, zeroOutTail |
| 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 offsetMask
| Constructor Detail |
|---|
public ChannelAsCircularArray(Edge edge)
edge - should give enough information (indirectly) to calculate buffer size| Method Detail |
|---|
public static ChannelAsCircularArray getChannel(Edge edge)
edge - The edge that this channel implements.other - The channel that this delegates to.
public JMethodDeclaration popMethod()
popMethod in class ChannelAsArraypublic JMethodDeclaration popManyMethod()
popManyMethod in class ChannelAsArraypublic JMethodDeclaration assignFromPopMethod()
assignFromPopMethod in class ChannelAsArraypublic JMethodDeclaration peekMethod()
peekMethod in class ChannelAsArraypublic JMethodDeclaration assignFromPeekMethod()
assignFromPeekMethod in class ChannelAsArraypublic JMethodDeclaration pushMethod()
pushMethod in class ChannelAsArraypublic List<JStatement> beginSteadyRead()
beginSteadyRead in class ChannelAsArraypublic List<JStatement> beginSteadyWrite()
beginSteadyWrite in class ChannelAsArray
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||