|
||||||||||
| 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
at.dms.kjc.sir.SIRStructure
public class SIRStructure
This class represents a data structure that may be passed between streams on tapes. It is implemented as an SIRStream for simplicity; a better design would have a parent class of SIRStream which was "SIR object with fields", and derive from that.
| Field Summary |
|---|
| Fields inherited from class at.dms.kjc.sir.SIRStream |
|---|
fields, ident, init, methods, work |
| Constructor Summary | |
|---|---|
SIRStructure()
|
|
SIRStructure(SIRContainer parent,
String ident,
JFieldDeclaration[] fields)
|
|
SIRStructure(SIRContainer parent,
String ident,
JFieldDeclaration[] fields,
boolean isUnion)
|
|
| Method Summary | |
|---|---|
Object |
accept(AttributeStreamVisitor v)
|
void |
addMethod(JMethodDeclaration method)
adds method |
void |
addMethods(JMethodDeclaration[] m)
Adds |
Object |
deepClone()
Returns a deep clone of this object. |
protected void |
deepCloneInto(SIRStructure other)
Clones all fields of this into |
CType |
getInputType()
Returns the input type of this. |
CType |
getOutputType()
Returns the output type of this. |
int |
getPopForSchedule(HashMap[] counts)
Same as getPushForSchedule, but with pop instead of push. |
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 |
LIRStreamType |
getStreamType()
Returns the type of this stream. |
boolean |
isCUnion()
Should code generation crate a struct or a C union type? |
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 |
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. |
| Methods inherited from class at.dms.kjc.sir.SIRStream |
|---|
addField, addField, addFields, addFields, addReplacementMethod, deepCloneInto, getFields, getIdent, getInit, getMethods, getParams, getStreamWithNumber, getTypeNameInC, getWork, hasMethod, insideFeedbackLoop, makeEmptyInit, makeEmptyInitWork, makeEmptyWork, setFields, setIdent, toString |
| Methods inherited from class at.dms.kjc.sir.SIROperator |
|---|
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 |
| Constructor Detail |
|---|
public SIRStructure(SIRContainer parent,
String ident,
JFieldDeclaration[] fields,
boolean isUnion)
parent - ident - fields - isUnion -
public SIRStructure(SIRContainer parent,
String ident,
JFieldDeclaration[] fields)
parent - ident - fields - public SIRStructure()
| Method Detail |
|---|
public boolean isCUnion()
public void addMethod(JMethodDeclaration method)
SIRStream
addMethod in interface SIRCodeUnitaddMethod in class SIRStreammethod - The method to add.public void addMethods(JMethodDeclaration[] m)
SIRStream
addMethods in interface SIRCodeUnitaddMethods in class SIRStreamm - The methods to attempt to add to the end of the methods.public void setMethods(JMethodDeclaration[] m)
SIRCodeUnit
setMethods in interface SIRCodeUnitsetMethods in class SIRStreamm - The new methods to install.public void setWork(JMethodDeclaration newWork)
SIRStream
setWork in class SIRStreampublic void setInit(JMethodDeclaration newInit)
SIRStream
setInit in class SIRStreampublic void setInitWithoutReplacement(JMethodDeclaration newInit)
SIRStream
setInitWithoutReplacement in class SIRStreampublic int getPushForSchedule(HashMap[] counts)
SIRStream
getPushForSchedule in class SIRStreampublic int getPopForSchedule(HashMap[] counts)
SIRStream
getPopForSchedule in class SIRStreampublic CType getOutputType()
SIRStream
getOutputType in class SIRStreampublic LIRStreamType getStreamType()
SIRStream
getStreamType in class SIRStreampublic CType getInputType()
SIRStream
getInputType in class SIRStreampublic boolean needsInit()
SIRStream
needsInit in class SIRStreampublic boolean needsWork()
SIRStream
needsWork in class SIRStreampublic Object accept(AttributeStreamVisitor v)
accept in class SIROperatorpublic Object deepClone()
deepClone in interface DeepCloneabledeepClone in class SIRStreamprotected void deepCloneInto(SIRStructure other)
other
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||