|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.sir.SIROperator
at.dms.kjc.sir.SIRStream
public abstract class SIRStream
This class represents a stream structure with one input and one output.
Field Summary | |
---|---|
protected JFieldDeclaration[] |
fields
The fields of this, not including the input and output channels. |
protected String |
ident
The name of the class in the StreamIt source file corresponding to this stream. |
protected JMethodDeclaration |
init
The init function. |
protected JMethodDeclaration[] |
methods
The methods of this, INCLUDING work, init, initPath, etc. |
protected JMethodDeclaration |
work
The work function. |
Constructor Summary | |
---|---|
protected |
SIRStream()
|
protected |
SIRStream(SIRContainer parent,
String ident,
JFieldDeclaration[] fields,
JMethodDeclaration[] methods)
|
Method Summary | |
---|---|
void |
addField(int offset,
JFieldDeclaration f)
Add a field |
void |
addField(JFieldDeclaration field)
adds field |
void |
addFields(int offset,
JFieldDeclaration[] f)
Add fields |
void |
addFields(JFieldDeclaration[] f)
Adds |
void |
addMethod(JMethodDeclaration method)
adds method |
void |
addMethods(JMethodDeclaration[] m)
Adds |
protected void |
addReplacementMethod(JMethodDeclaration newMethod,
JMethodDeclaration origMethod)
Adds newMethod to this. |
Object |
deepClone()
Returns a deep clone of this object. |
protected void |
deepCloneInto(SIRStream other)
Clones all fields of this into |
JFieldDeclaration[] |
getFields()
Gets the field decl's of this stream. |
String |
getIdent()
Returns an identifier for this which is NOT unique. |
JMethodDeclaration |
getInit()
gets the init function |
abstract CType |
getInputType()
Returns the input type of this. |
JMethodDeclaration[] |
getMethods()
Gets the method decl's of this stream. |
abstract CType |
getOutputType()
Returns the output type of this. |
List<JExpression> |
getParams()
Get the parameters that were used to initialize this. |
abstract int |
getPopForSchedule(HashMap[] counts)
Same as getPushForSchedule, but with pop instead of push. |
abstract int |
getPushForSchedule(HashMap[] counts)
Returns the number of items pushed out of this stream in one execution of the steady-state, given the steady-state execution counts specified by |
abstract LIRStreamType |
getStreamType()
Returns the type of this stream. |
SIRStream |
getStreamWithNumber(int num)
Returns a child stream of this that has number |
String |
getTypeNameInC()
Returns the C type of the object, which is always a stream_context. |
JMethodDeclaration |
getWork()
Gets the work function. |
boolean |
hasMethod(String name)
Returns whether or not a function named |
boolean |
insideFeedbackLoop()
|
static JMethodDeclaration |
makeEmptyInit()
Returns an empty init function. |
static JMethodDeclaration |
makeEmptyInitWork()
Returns an empty prework function. |
static JMethodDeclaration |
makeEmptyWork()
Returns an empty work function. |
boolean |
needsInit()
Returns whether or not this class needs a call to an init function to be generated. |
boolean |
needsWork()
Returns whether or not this class needs a call to a work function to be generated. |
void |
setFields(JFieldDeclaration[] f)
Set the fields of this to fields, overwriting the old array. |
void |
setIdent(String ident)
Sets the identifier of this. |
void |
setInit(JMethodDeclaration newInit)
sets the init function |
void |
setInitWithoutReplacement(JMethodDeclaration newInit)
sets the init function WITHOUT eliminating the old one in the methods array. |
void |
setMethods(JMethodDeclaration[] m)
Install methods as the new methods array. |
void |
setWork(JMethodDeclaration newWork)
Sets the work function. |
String |
toString()
|
Methods inherited from class at.dms.kjc.sir.SIROperator |
---|
accept, assertMutable, deepCloneInto, getAncestors, getName, getNumber, getParent, getParents, getParentStructureAccess, getRelativeName, getShortIdent, hashCode, readResolve, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JFieldDeclaration[] fields
protected JMethodDeclaration[] methods
protected JMethodDeclaration init
protected JMethodDeclaration work
protected String ident
Constructor Detail |
---|
protected SIRStream(SIRContainer parent, String ident, JFieldDeclaration[] fields, JMethodDeclaration[] methods)
protected SIRStream()
Method Detail |
---|
public void setFields(JFieldDeclaration[] f)
SIRCodeUnit
setFields
in interface SIRCodeUnit
f
- The fields to install.public void addFields(JFieldDeclaration[] f)
addFields
in interface SIRCodeUnit
f
- The fields to add to the end.public void addFields(int offset, JFieldDeclaration[] f)
offset
- offset to add beforef
- fields to addpublic void addField(int offset, JFieldDeclaration f)
offset
- offset to add beforef
- field to addpublic void addMethods(JMethodDeclaration[] m)
addMethods
in interface SIRCodeUnit
m
- The methods to attempt to add to the end of the methods.public JFieldDeclaration[] getFields()
getFields
in interface SIRCodeUnit
public JMethodDeclaration[] getMethods()
getMethods
in interface SIRCodeUnit
public void setIdent(String ident)
public String getIdent()
SIROperator
getIdent
in class SIROperator
public String toString()
toString
in class Object
public void setWork(JMethodDeclaration newWork)
public List<JExpression> getParams()
public JMethodDeclaration getWork()
public void setMethods(JMethodDeclaration[] m)
SIRCodeUnit
setMethods
in interface SIRCodeUnit
m
- The new methods to install.public abstract CType getOutputType()
public abstract LIRStreamType getStreamType()
public abstract CType getInputType()
public SIRStream getStreamWithNumber(int num)
public abstract int getPushForSchedule(HashMap[] counts)
public abstract int getPopForSchedule(HashMap[] counts)
public boolean needsInit()
public boolean needsWork()
public void setInit(JMethodDeclaration newInit)
public void setInitWithoutReplacement(JMethodDeclaration newInit)
protected void addReplacementMethod(JMethodDeclaration newMethod, JMethodDeclaration origMethod)
public void addMethod(JMethodDeclaration method)
addMethod
in interface SIRCodeUnit
method
- The method to add.public void addField(JFieldDeclaration field)
addField
in interface SIRCodeUnit
field
- The field to attempt to add.public boolean hasMethod(String name)
public String getTypeNameInC()
public JMethodDeclaration getInit()
public boolean insideFeedbackLoop()
public static JMethodDeclaration makeEmptyWork()
public static JMethodDeclaration makeEmptyInitWork()
public static JMethodDeclaration makeEmptyInit()
public Object deepClone()
deepClone
in interface DeepCloneable
deepClone
in class SIROperator
protected void deepCloneInto(SIRStream other)
other
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |