|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.backendSupport.MinCodeUnit
at.dms.kjc.backendSupport.CodeStoreHelper
public abstract class CodeStoreHelper
For creation of additional code necessary to getting filter / joiner / splitter code hooked up to a ComputeCodeStore.
Field Summary | |
---|---|
protected BackEndFactory |
backEndBits
a BackEndFactory for getting information about other parts of the back end |
protected JMethodDeclaration |
initMethod
|
static String |
initStage
possible prefix for functions in initialization |
static boolean |
INLINE_WORK
Do we want to inline work functions or just call a single copy? |
protected JMethodDeclaration |
preWorkMethod
|
protected JMethodDeclaration |
primePumpMethod
|
static String |
primePumpStage
possible prefix for functions in prime-pump stage |
protected SliceNode |
sliceNode
The slice node that we are generating helper code for |
static String |
steadyStage
possible prefix for functions in steady state |
protected int |
uniqueID
a value that should be unique per instance, useful in generating non-clashing variable names. |
static String |
workCounter
possible prefix for loop counters for iterating work function |
protected JMethodDeclaration |
workMethod
|
Constructor Summary | |
---|---|
CodeStoreHelper(SliceNode node,
BackEndFactory backEndBits)
General constructor: need to add fields and methods later. |
|
CodeStoreHelper(SliceNode node,
FilterContent filter,
BackEndFactory backEndBits)
Constructor from a FilterContent, fills out fields, methods, initMethod, preWorkMethod, workMethod. |
Method Summary | |
---|---|
static void |
addHelperForSliceNode(SliceNode s,
CodeStoreHelper u)
Record a mapping from a SliceNode to a CodeStoreHelper. |
static CodeStoreHelper |
findHelperForSliceNode(SliceNode s)
Use #findCodeForSlice , #addCodeForSlice to keep track of whether a SIRCodeUnit of code has been
generated already for a SliceNode. |
JMethodDeclaration |
getInitMethod()
|
abstract JMethodDeclaration |
getInitStageMethod()
|
JMethodDeclaration |
getPreWorkMethod()
|
abstract JMethodDeclaration |
getPrimePumpMethod()
|
protected JMethodDeclaration |
getPrimePumpMethodForFilter(FilterInfo filterInfo)
Calculate and return the method that will implement one execution of this filter in the primepump stage. |
abstract JBlock |
getSteadyBlock()
|
protected static int |
getUniqueID()
a way of setting the unique value |
JFieldDeclaration[] |
getUsefulFields()
|
JMethodDeclaration[] |
getUsefulMethods()
|
protected JBlock |
getWorkFunctionBlock(int mult)
Return a JBlock that iterates mult times the result of calling getWorkFunctionCall(). |
protected JStatement |
getWorkFunctionCall()
Return the code that will call the work function once. |
JMethodDeclaration |
getWorkMethod()
|
void |
reset()
Clean up static data. |
void |
setInitMethod(JMethodDeclaration meth)
set init method: please pass it some method already in range of MinCodeUnit.getMethods() |
void |
setPreWorkMethod(JMethodDeclaration meth)
set preWork (initWork) method: please pass it some method already in range of MinCodeUnit.getMethods() |
void |
setWorkMethod(JMethodDeclaration meth)
set work method: please pass it some method already in range of MinCodeUnit.getMethods() |
Methods inherited from class at.dms.kjc.backendSupport.MinCodeUnit |
---|
addField, addFields, addMethod, addMethods, getFields, getMethods, setFields, setMethods |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String initStage
public static String steadyStage
public static String primePumpStage
public static String workCounter
public static boolean INLINE_WORK
protected SliceNode sliceNode
protected BackEndFactory backEndBits
protected int uniqueID
protected JMethodDeclaration primePumpMethod
protected JMethodDeclaration initMethod
protected JMethodDeclaration preWorkMethod
protected JMethodDeclaration workMethod
Constructor Detail |
---|
public CodeStoreHelper(SliceNode node, BackEndFactory backEndBits)
public CodeStoreHelper(SliceNode node, FilterContent filter, BackEndFactory backEndBits)
Method Detail |
---|
protected static int getUniqueID()
public JMethodDeclaration getInitMethod()
public void setInitMethod(JMethodDeclaration meth)
MinCodeUnit.getMethods()
public JMethodDeclaration getPreWorkMethod()
public void setPreWorkMethod(JMethodDeclaration meth)
MinCodeUnit.getMethods()
public JMethodDeclaration getWorkMethod()
public void setWorkMethod(JMethodDeclaration meth)
MinCodeUnit.getMethods()
public static CodeStoreHelper findHelperForSliceNode(SliceNode s)
#findCodeForSlice
, #addCodeForSlice
to keep track of whether a SIRCodeUnit of code has been
generated already for a SliceNode.
s
- A SliceNode
#addCodeForSlice
.public static void addHelperForSliceNode(SliceNode s, CodeStoreHelper u)
s
- a SliceNodeu
- a CodeStoreHelperpublic void reset()
public JFieldDeclaration[] getUsefulFields()
public JMethodDeclaration[] getUsefulMethods()
public abstract JMethodDeclaration getInitStageMethod()
public abstract JBlock getSteadyBlock()
public abstract JMethodDeclaration getPrimePumpMethod()
protected JMethodDeclaration getPrimePumpMethodForFilter(FilterInfo filterInfo)
protected JBlock getWorkFunctionBlock(int mult)
mult
- Number of times to iterate work function.
protected JStatement getWorkFunctionCall()
INLINE_WORK
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |