public abstract class Instruction extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Instruction.INSTRUCTION_TYPE |
Modifier and Type | Field and Description |
---|---|
protected int |
beginCol |
protected int |
beginLine |
static String |
DATATYPE_PREFIX |
protected int |
endCol |
protected int |
endLine |
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 |
protected Instruction.INSTRUCTION_TYPE |
type |
static String |
VALUETYPE_PREFIX |
Constructor and Description |
---|
Instruction() |
Modifier and Type | Method and Description |
---|---|
String |
getExtendedOpcode() |
String |
getGraphString() |
long |
getInstID()
Getter for instruction unique identifier
|
int |
getLineNum()
Getter for instruction line number
|
String |
getOpcode() |
Instruction.INSTRUCTION_TYPE |
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(int beginLine,
int endLine,
int beginCol,
int endCol)
Setter for instruction line/column number
|
void |
setLocation(org.apache.sysml.lops.Lop lop) |
void |
setType(Instruction.INSTRUCTION_TYPE tp) |
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 Instruction.INSTRUCTION_TYPE type
protected String instString
protected String instOpcode
protected int beginLine
protected int endLine
protected int beginCol
protected int endCol
public void setType(Instruction.INSTRUCTION_TYPE tp)
public Instruction.INSTRUCTION_TYPE getType()
public void setLocation(int beginLine, int endLine, int beginCol, int endCol)
beginLine
- beginning line positionendLine
- ending line positionbeginCol
- beginning column positionendCol
- ending column positionpublic 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) throws DMLRuntimeException
pattern
- ?replace
- ?DMLRuntimeException
- if DMLRuntimeException occurspublic Instruction preprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec) throws DMLRuntimeException
ec
- execution contextDMLRuntimeException
- if DMLRuntimeException occurspublic abstract void processInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec) throws DMLRuntimeException
ec
- execution contextDMLRuntimeException
- if DMLRuntimeException occurspublic void postprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec) throws DMLRuntimeException
ec
- execution contextDMLRuntimeException
- if DMLRuntimeException occursCopyright © 2017 The Apache Software Foundation. All rights reserved.