public abstract class Instruction extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Instruction.IType |
Modifier and Type | Field and Description |
---|---|
protected int |
beginCol |
protected int |
beginLine |
static String |
DATATYPE_PREFIX |
protected int |
endCol |
protected int |
endLine |
protected String |
filename |
static String |
GPU_INST_PREFIX |
protected String |
instOpcode |
static String |
INSTRUCTION_DELIM |
protected String |
instString |
static String |
LITERAL_PREFIX |
protected static org.apache.commons.logging.Log |
LOG |
static String |
OPERAND_DELIM |
static String |
SP_INST_PREFIX |
static String |
VALUETYPE_PREFIX |
Constructor and Description |
---|
Instruction() |
Modifier and Type | Method and Description |
---|---|
int |
getBeginColumn() |
int |
getBeginLine() |
int |
getEndColumn() |
int |
getEndLine() |
String |
getExtendedOpcode() |
String |
getFilename() |
String |
getGraphString() |
long |
getInstID()
Getter for instruction unique identifier
|
int |
getLineNum()
Getter for instruction line number
|
String |
getOpcode() |
abstract Instruction.IType |
getType() |
void |
postprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
This method should be used for any tear down after executing this instruction.
|
Instruction |
preprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
This method should be used for any setup before executing this instruction.
|
void |
printMe() |
abstract void |
processInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
This method should be used to execute the instruction.
|
boolean |
requiresLabelUpdate() |
void |
setInstID(long id)
Setter for instruction unique identifier
|
void |
setLocation(org.apache.sysml.parser.DataIdentifier id) |
void |
setLocation(Instruction oldInst) |
void |
setLocation(org.apache.sysml.lops.Lop lop) |
void |
setLocation(String filename,
int beginLine,
int endLine,
int beginCol,
int endCol) |
String |
toString() |
void |
updateInstructionThreadID(String pattern,
String replace)
All instructions that have thread-specific filenames or names encoded in it
should overwrite this method in order to update (1) the in-memory instruction
and (2) the instruction string
|
protected static final org.apache.commons.logging.Log LOG
public static final String OPERAND_DELIM
public static final String DATATYPE_PREFIX
public static final String VALUETYPE_PREFIX
public static final String LITERAL_PREFIX
public static final String INSTRUCTION_DELIM
public static final String SP_INST_PREFIX
public static final String GPU_INST_PREFIX
protected String instString
protected String instOpcode
protected String filename
protected int beginLine
protected int endLine
protected int beginCol
protected int endCol
public String getFilename()
public int getBeginLine()
public int getEndLine()
public int getBeginColumn()
public int getEndColumn()
public abstract Instruction.IType getType()
public void setLocation(String filename, int beginLine, int endLine, int beginCol, int endCol)
public void setLocation(org.apache.sysml.lops.Lop lop)
public void setLocation(org.apache.sysml.parser.DataIdentifier id)
public void setLocation(Instruction oldInst)
public int getLineNum()
public void setInstID(long id)
id
- Instruction unique identifierpublic long getInstID()
public void printMe()
public String getGraphString()
public String getOpcode()
public String getExtendedOpcode()
public boolean requiresLabelUpdate()
public void updateInstructionThreadID(String pattern, String replace)
pattern
- ?replace
- ?public Instruction preprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
ec
- execution contextpublic abstract void processInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
ec
- execution contextpublic void postprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
ec
- execution contextCopyright © 2018 The Apache Software Foundation. All rights reserved.