|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmuskel.Mdfi
public class Mdfi
This is the class of MDF instructions: each MDFi has a taskId instrId opCode tokenInVector tokenOutVector readyArgNo inTokenCount outTokenCount
| Field Summary | |
|---|---|
boolean |
debug
|
static int |
NoGraphId
|
static int |
NoInstrId
|
static int |
NoOpCode
|
static int |
NoTokId
|
| Constructor Summary | |
|---|---|
Mdfi()
creates an empty MDF instruction |
|
Mdfi(int iid,
int gid,
int op,
int inc,
int outc,
Dest[] did)
Deprecated. Creates a MDFi taking care of storing the code in the codestorage This is used only in case of user defined ParCompute code. Same parmaters of the previous, complete constructor, but the GID, which is left undefined. Plus the manager, which is needed to access the global CodeStorage |
|
Mdfi(int iid,
int gid,
int op,
int inc,
int outc,
int[] ppos,
int[] diid,
int[] dgid)
Deprecated. creates the instruction |
|
Mdfi(Manager manager,
int iid,
Compute op,
int inc,
int outc,
Dest[] did)
Creates a MDFi taking care of storing the code in the codestorage This is used only in case of user defined ParCompute code. |
|
| Method Summary | |
|---|---|
DestToken[] |
compute(CodeStorage cs)
Computes the MDF instruction, taking the opcode from the CodeStorage |
boolean |
isFireable()
test for fireable instruction |
Mdfi |
mdfClone()
This is used to clone an instruciton. |
void |
reloc(int offset)
this is used to relocate instructions within a graph |
void |
setDest(int ppos,
Dest dest)
used to reloc output of the instruction |
void |
setDestGraphIds(int gid)
sets the graph id in the destination tokens |
void |
setGraphId(int gid)
assigns a graph id to the instruction, possbibly created with a Mdfi.NoGraphId value. |
void |
storeToken(int pos,
java.lang.Object value)
used to store an input token |
java.lang.String |
toString()
overrides the Object toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final boolean debug
public static final int NoInstrId
public static final int NoGraphId
public static final int NoTokId
public static final int NoOpCode
| Constructor Detail |
|---|
public Mdfi(int iid,
int gid,
int op,
int inc,
int outc,
int[] ppos,
int[] diid,
int[] dgid)
iid - is the instruction idgid - is the graph idtid - is the task idop - is the opcodeinc - is the number of input tokensoutc - is the number of output tokensppos - is the vector of the (ordered) token order idsdiid - is the vector of (ordered) instruction destination idsdgid - is the vector of (ordered) graph destination ids
public Mdfi(Manager manager,
int iid,
Compute op,
int inc,
int outc,
Dest[] did)
manager - the manager used to compute the instructioniid - the instruction idop - the code to be computed by the instruction. Should be a Compute (sub)class objectinc - the input token numberoutc - the output token numberdid - the vector of the destinations for output tokens. The i-th output token is directed to the i-th Dest
public Mdfi(int iid,
int gid,
int op,
int inc,
int outc,
Dest[] did)
manager - the manager used to compute the instructioniid - the instruction idop - the index in the codestorage of the code to be computed by the instruction.inc - the input token numberoutc - the output token numberdid - the vector of the destinations for output tokens. The i-th output token is directed to the i-th Destpublic Mdfi()
| Method Detail |
|---|
public Mdfi mdfClone()
public java.lang.String toString()
toString in class java.lang.Object
public void storeToken(int pos,
java.lang.Object value)
pos - the position in the input token vectorvalue - the value of the token
public DestToken[] compute(CodeStorage cs)
throws NonFireableInstructionException,
OpCodeNotPresentException
cs - the codestorage to be used to retrieve instruction code
NonFireableInstructionException
OpCodeNotPresentExceptionpublic boolean isFireable()
public void setGraphId(int gid)
gid - the graph id to be assignedpublic void setDestGraphIds(int gid)
gid - the graph id to be usedpublic void reloc(int offset)
offset - the offset used to reloc the instruction
public void setDest(int ppos,
Dest dest)
ppos - the index of the destination to be changeddest - the new destination
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||