Package org.apache.sysds.lops
Class Data
java.lang.Object
org.apache.sysds.lops.Lop
org.apache.sysds.lops.Data
Lop to represent data objects. Data objects represent matrices, vectors,
variables, literals. Can be for both input and output.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sysds.lops.Lop
Lop.SimpleInstType, Lop.Type, Lop.VisitStatus -
Field Summary
FieldsFields inherited from class org.apache.sysds.lops.Lop
_beginColumn, _beginLine, _endColumn, _endLine, _filename, CP_CHILD_THREAD, CP_ROOT_THREAD_ID, DATATYPE_PREFIX, FILE_SEPARATOR, FRAME_VAR_NAME_PREFIX, INSTRUCTION_DELIMITOR, LITERAL_PREFIX, MATRIX_VAR_NAME_PREFIX, NAME_VALUE_SEPARATOR, OPERAND_DELIMITOR, PROCESS_PREFIX, SCALAR_VAR_NAME_PREFIX, UPDATE_INPLACE_PREFIX, VALUETYPE_PREFIX, VARIABLE_NAME_PLACEHOLDER -
Constructor Summary
ConstructorsConstructorDescriptionData(Types.OpOpData op, Lop input, HashMap<String, Lop> inputParametersLops, String name, String literal, Types.DataType dt, Types.ValueType vt, Types.FileFormat fmt) Constructor to setup read or write LOP In case of write:inputmust be provided. -
Method Summary
Modifier and TypeMethodDescriptionstatic DatacreateLiteralLop(Types.ValueType vt, String literalValue) Method to create literal LOPs.booleangetCreateVarInstructions(String outputFileName, String outputLabel) doublemethod to get format type for input, output files.method to get inputParamsMethod to generate createvar instruction that updates symbol table with metadata, hdfsfile name, etc.getInstructions(String outputFileName) Method should be overridden if neededgetInstructions(String input1, String input2) Method to get CP instructions for reading/writing scalars and matrices from/to HDFS.longgetNamedInputLop(String name) getNamedInputLop(String name, String defaultVal) method to get operation type, i.e.booleanmethod to check if this data lop represents a literal.booleanbooleanbooleanbooleantoString()Method to have Lops print their state.Methods inherited from class org.apache.sysds.lops.Lop
activatePrefetch, addInput, addOutput, addToDag, createReachable, getAggType, getBeginColumn, getBeginLine, getBroadcastInput, getComputeEstimate, getDataType, getEndColumn, getEndLine, getExecType, getFederatedOutput, getFilename, getID, getInput, getInputs, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getLevel, getNnz, getNumCols, getNumRows, getOutputMemoryEstimate, getOutputParameters, getOutputs, getPipelineID, getProducesIntermediateOutput, getReachable, getSimpleInstructionType, getTotalMemoryEstimate, getType, getValueType, getVisited, isAllOutputsCP, isAllOutputsGPU, isAsynchronousOp, isDataExecLocation, isExecCP, isExecGPU, isExecSpark, isVariable, isVisited, prefetchActivated, prepInputOperand, prepInputOperand, prepOperand, prepOperand, prepOutputOperand, prepOutputOperand, prepOutputOperand, prepScalarInputOperand, prepScalarInputOperand, prepScalarLabel, prepScalarOperand, printErrorLocation, removeConsumer, removeInput, removeOutput, replaceAllInputs, replaceAllOutputs, replaceInput, resetVisitStatus, setAllPositions, setAsynchronous, setBeginColumn, setBeginLine, setComputeEstimate, setConsumerCount, setDataType, setEndColumn, setEndLine, setExecType, setFederatedOutput, setFilename, setMemoryEstimates, setNewID, setPipelineID, setValueType, setVisited, setVisited
-
Field Details
-
PREAD_PREFIX
- See Also:
-
-
Constructor Details
-
Data
public Data(Types.OpOpData op, Lop input, HashMap<String, Lop> inputParametersLops, String name, String literal, Types.DataType dt, Types.ValueType vt, Types.FileFormat fmt) Constructor to setup read or write LOP In case of write:inputmust be provided. This will always be added as the first element ininputarray. For literals: this function is invoked through the static methodcreateLiteralLop.- Parameters:
op- operation typeinput- low-level operatorinputParametersLops- input lopsname- string nameliteral- string literaldt- data typevt- value typefmt- file format
-
-
Method Details
-
createLiteralLop
Method to create literal LOPs.- Parameters:
vt- value typeliteralValue- literal value- Returns:
- literal low-level operator
-
getFileFormatType
method to get format type for input, output files.- Returns:
- file format
-
toString
Description copied from class:LopMethod to have Lops print their state. This is for debugging purposes. -
getOperationType
method to get operation type, i.e. read/write.- Returns:
- operation type
-
getInputParams
method to get inputParams- Returns:
- input parameters
-
getNamedInputLop
-
getNamedInputLop
-
isLiteral
public boolean isLiteral()method to check if this data lop represents a literal.- Returns:
- true if data lop is a literal
-
getBooleanValue
public boolean getBooleanValue() -
getDoubleValue
public double getDoubleValue() -
getLongValue
public long getLongValue() -
getStringValue
-
isPersistentWrite
public boolean isPersistentWrite() -
isPersistentRead
public boolean isPersistentRead() -
isTransientWrite
public boolean isTransientWrite() -
isTransientRead
public boolean isTransientRead() -
getInstructions
Method to get CP instructions for reading/writing scalars and matrices from/to HDFS. This method generates CP read/write instructions.- Overrides:
getInstructionsin classLop- Parameters:
input1- input 1input2- output- Returns:
- instructions as string
-
getInstructions
Method to generate createvar instruction that updates symbol table with metadata, hdfsfile name, etc.- Overrides:
getInstructionsin classLop- Returns:
- instructions as string
-
getInstructions
Description copied from class:LopMethod should be overridden if needed- Overrides:
getInstructionsin classLop- Parameters:
outputFileName- output- Returns:
- instructions as string
-
getCreateVarInstructions
-