|
||||||||||
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.SIRSplitter
public class SIRSplitter
This represents a stream construct with a single input and multiple outputs.
Field Summary | |
---|---|
static JMethodDeclaration |
WORK_FUNCTION
This is a dummy work function that is used to represent the work of a splitter to the scheduling package. |
Method Summary | |
---|---|
Object |
accept(AttributeStreamVisitor v)
Accepts attribute visitor |
static SIRSplitter |
create(SIRContainer parent,
SIRSplitType type,
int n)
Constructs a splitter with given parent, type and n number of inputs. |
static SIRSplitter |
create(SIRContainer parent,
SIRSplitType type,
JExpression[] weights)
|
static SIRSplitter |
createUniformRR(SIRContainer parent,
JExpression weight)
This is for creating a round robin with uniform weights across the stream. |
static SIRSplitter |
createWeightedRR(SIRContainer parent,
JExpression[] weights)
Constructs a weighted round-robin splitter with the given parent and weights. |
Object |
deepClone()
Returns a deep clone of this object. |
protected void |
deepCloneInto(SIRSplitter other)
Clones all fields of this into |
boolean |
equals(SIRSplitter obj)
Tests whether or not this has the same type and the same weights as obj. |
String |
getIdent()
See doc in SIROperator. |
JExpression[] |
getInternalWeights()
Returns JExpression weights of this. |
int |
getSumOfWeights()
Returns the sum of all weights in this. |
SIRSplitType |
getType()
Return type of this. |
int |
getWays()
Return the number of outputs of this. |
int |
getWeight(int i)
Return int weight at position i. |
JExpression |
getWeightNoChecking(int i)
|
int[] |
getWeights()
Return int weights array of this. |
boolean |
isUnaryRoundRobin()
Returns whether this is a round-robin with all weights equal to 1. |
void |
rescale(int extent)
If this is a splitter that has equal weight per way, then rescale the weights to be of the given |
String |
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 |
Field Detail |
---|
public static final JMethodDeclaration WORK_FUNCTION
Method Detail |
---|
public static SIRSplitter create(SIRContainer parent, SIRSplitType type, JExpression[] weights)
public static SIRSplitter create(SIRContainer parent, SIRSplitType type, int n)
public static SIRSplitter createWeightedRR(SIRContainer parent, JExpression[] weights)
public static SIRSplitter createUniformRR(SIRContainer parent, JExpression weight)
public boolean isUnaryRoundRobin()
public boolean equals(SIRSplitter obj)
public void rescale(int extent)
public Object accept(AttributeStreamVisitor v)
accept
in class SIROperator
public SIRSplitType getType()
public int getWays()
public String getIdent()
getIdent
in class SIROperator
public String toString()
toString
in class Object
public JExpression[] getInternalWeights()
public int getSumOfWeights()
public int[] getWeights()
public int getWeight(int i)
public JExpression getWeightNoChecking(int i)
public Object deepClone()
deepClone
in interface DeepCloneable
deepClone
in class SIROperator
protected void deepCloneInto(SIRSplitter other)
other
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |