Class VariableCPInstruction
java.lang.Object
org.apache.sysds.runtime.instructions.Instruction
org.apache.sysds.runtime.instructions.cp.CPInstruction
org.apache.sysds.runtime.instructions.cp.VariableCPInstruction
- All Implemented Interfaces:
LineageTraceable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.cp.CPInstruction
CPInstruction.CPTypeNested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.Instruction
Instruction.IType -
Field Summary
Fields inherited from class org.apache.sysds.runtime.instructions.Instruction
DATATYPE_PREFIX, FEDERATED_INST_PREFIX, GPU_INST_PREFIX, INSTRUCTION_DELIM, LITERAL_PREFIX, OOC_INST_PREFIX, OPERAND_DELIM, SP_INST_PREFIX, VALUETYPE_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionvoidgetInput(int index) org.apache.commons.lang3.tuple.Pair<String,LineageItem> Obtain lineage trace of an instruction with a single output.static StringgetUniqueFileName(String fname) booleanbooleanbooleanbooleanbooleanbooleanisRemoveVariable(String varName) Checks if this instruction is a remove instruction for varNamebooleanbooleanstatic VariableCPInstructionparseInstruction(String str) static InstructionprepareCopyInstruction(String srcVar, String destVar) static InstructionprepareRemoveInstruction(long... varName) static InstructionprepareRemoveInstruction(String... varNames) static InstructionprepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, String format) static InstructionprepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update) static InstructionprepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update, boolean hasHeader, String delim, boolean sparse) static InstructionprepMoveInstruction(String srcVar, String destVar) static InstructionprepMoveInstruction(String srcVar, String destFileName, String format) voidThis method should be used to execute the instruction.static voidprocessRmvarInstruction(ExecutionContext ec, String varname) Remove variable instruction externalized as a static function in order to allow various cleanup procedures to use the same codepath as the actual rmVar instructionvoidupdateInstructionThreadID(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 stringMethods inherited from class org.apache.sysds.runtime.instructions.cp.CPInstruction
getCPInstructionType, getGraphString, getType, postprocessInstruction, preprocessInstruction, requiresLabelUpdate, updateLabelsMethods inherited from class org.apache.sysds.runtime.instructions.Instruction
getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExtendedOpcode, getFilename, getInstID, getInstructionString, getLineNum, getOpcode, getOperator, printMe, setInstID, setLocation, setLocation, setLocation, setLocation, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sysds.runtime.lineage.LineageTraceable
getLineageItems, hasSingleLineage
-
Method Details
-
isRemoveVariable
Checks if this instruction is a remove instruction for varName- Parameters:
varName- variable name- Returns:
- true if rmvar instruction including varName
-
isRemoveVariableNoFile
public boolean isRemoveVariableNoFile() -
isRemoveVariable
public boolean isRemoveVariable() -
isMoveVariable
public boolean isMoveVariable() -
isAssignVariable
public boolean isAssignVariable() -
isAssignOrCopyVariable
public boolean isAssignOrCopyVariable() -
isCreateVariable
public boolean isCreateVariable() -
getVariableOpcode
-
getFormatProperties
-
getInputs
-
getInput1
-
getInput2
-
getInput3
-
getInput4
-
getInput
-
addInput
-
getOutputVariableName
-
getOutput
-
parseInstruction
-
processInstruction
Description copied from class:InstructionThis method should be used to execute the instruction.- Specified by:
processInstructionin classCPInstruction- Parameters:
ec- execution context
-
processRmvarInstruction
Remove variable instruction externalized as a static function in order to allow various cleanup procedures to use the same codepath as the actual rmVar instruction- Parameters:
ec- execution contextvarname- variable name
-
prepareRemoveInstruction
-
prepareRemoveInstruction
-
prepareCopyInstruction
-
prepMoveInstruction
-
prepMoveInstruction
-
prepCreatevarInstruction
public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, String format) -
prepCreatevarInstruction
public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update) -
prepCreatevarInstruction
public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update, boolean hasHeader, String delim, boolean sparse) -
updateInstructionThreadID
Description copied from class:InstructionAll 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- Overrides:
updateInstructionThreadIDin classInstruction- Parameters:
pattern- ?replace- ?
-
getLineageItem
Description copied from interface:LineageTraceableObtain lineage trace of an instruction with a single output.- Specified by:
getLineageItemin interfaceLineageTraceable- Parameters:
ec- execution context w/ live variables- Returns:
- pair of (output variable name, output lineage item)
-
isVariableCastInstruction
public boolean isVariableCastInstruction() -
getUniqueFileName
-
getMetaData
-