public abstract class Lop extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Lop.SimpleInstType
Lop types
|
static class |
Lop.Type |
static class |
Lop.VisitStatus |
Modifier and Type | Field and Description |
---|---|
int |
_beginColumn |
int |
_beginLine |
int |
_endColumn |
int |
_endLine |
String |
_filename |
static String |
CP_CHILD_THREAD |
static String |
CP_ROOT_THREAD_ID |
static String |
DATATYPE_PREFIX |
static String |
FILE_SEPARATOR |
static String |
FRAME_VAR_NAME_PREFIX |
static String |
INSTRUCTION_DELIMITOR |
static String |
LITERAL_PREFIX |
static String |
MATRIX_VAR_NAME_PREFIX |
static String |
NAME_VALUE_SEPARATOR |
static String |
OPERAND_DELIMITOR |
static String |
PROCESS_PREFIX |
static double |
SAMPLE_FRACTION |
static String |
SCALAR_VAR_NAME_PREFIX |
static String |
UPDATE_INPLACE_PREFIX |
static String |
VALUETYPE_PREFIX |
static String |
VARIABLE_NAME_PLACEHOLDER |
Constructor and Description |
---|
Lop(Lop.Type t,
Types.DataType dt,
Types.ValueType vt)
Constructor to be invoked by base class.
|
Modifier and Type | Method and Description |
---|---|
void |
addInput(Lop op)
Method to add input to Lop
|
void |
addOutput(Lop op)
Method to add output to Lop
|
void |
addToDag(Dag<Lop> dag)
Method to recursively add LOPS to a DAG
|
boolean[] |
createReachable(int size) |
int |
getBeginColumn() |
int |
getBeginLine() |
Types.DataType |
getDataType()
get data type of the output that is produced by this lop
|
int |
getEndColumn() |
int |
getEndLine() |
Types.ExecType |
getExecType()
Method to get the execution type (CP, CP_FILE, MR, SPARK, GPU, FED, INVALID) of LOP
|
String |
getFilename() |
long |
getID()
Method to return the ID of LOP
|
ArrayList<Lop> |
getInputs()
Method to get input of Lops
|
String |
getInstructions()
Method should be overridden if needed
|
String |
getInstructions(int input,
int rowl,
int rowu,
int coll,
int colu,
int leftRowDim,
int leftColDim,
int output) |
String |
getInstructions(String output)
Method should be overridden if needed
|
String |
getInstructions(String[] inputs,
String outputs) |
String |
getInstructions(String[] inputs,
String[] outputs)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String output)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2,
String output)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2,
String input3,
String output)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2,
String input3,
String input4,
String output)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2,
String input3,
String input4,
String input5,
String output)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2,
String input3,
String input4,
String input5,
String input6,
String output)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2,
String input3,
String input4,
String input5,
String input6,
String input7,
String output) |
int |
getLevel() |
OutputParameters |
getOutputParameters()
Method to get output parameters
|
ArrayList<Lop> |
getOutputs()
Method to get output of Lops
|
PrivacyConstraint |
getPrivacyConstraint() |
boolean |
getProducesIntermediateOutput() |
boolean[] |
getReachable() |
Lop.SimpleInstType |
getSimpleInstructionType()
Method should be overridden if needed
|
Lop.Type |
getType()
Method to get Lop type.
|
Types.ValueType |
getValueType()
get value type of the output that is produced by this lop
|
Lop.VisitStatus |
getVisited()
get visit status of node
|
boolean |
isDataExecLocation() |
boolean |
isVariable()
Function that determines if the output of a LOP is defined by a variable or not.
|
String |
prepInputOperand(int index) |
String |
prepInputOperand(String label) |
String |
prepOperand(String label,
Types.DataType dt,
Types.ValueType vt)
Method to prepare instruction operand with given parameters.
|
String |
prepOperand(String label,
Types.DataType dt,
Types.ValueType vt,
boolean literal)
Method to prepare instruction operand with given parameters.
|
String |
prepOutputOperand() |
String |
prepOutputOperand(int index) |
String |
prepOutputOperand(String label) |
String |
prepScalarInputOperand(String label) |
String |
prepScalarInputOperand(Types.ExecType et) |
String |
prepScalarLabel()
Function to prepare label for scalar inputs while generating instructions.
|
String |
prepScalarOperand(Types.ExecType et,
String label)
Function to be used in creating instructions for creating scalar
operands.
|
String |
printErrorLocation() |
int |
removeConsumer() |
void |
resetVisitStatus() |
void |
setAllPositions(String filename,
int blp,
int bcp,
int elp,
int ecp) |
void |
setBeginColumn(int passed) |
void |
setBeginLine(int passed) |
void |
setConsumerCount(int cc) |
void |
setDataType(Types.DataType dt)
set data type of the output that is produced by this lop
|
void |
setEndColumn(int passed) |
void |
setEndLine(int passed) |
void |
setExecType(Types.ExecType newExecType)
Set the execution type of LOP.
|
void |
setFederatedOutput(FEDInstruction.FederatedOutput fedOutput) |
void |
setFilename(String passed) |
void |
setPrivacyConstraint(PrivacyConstraint privacy)
Method to set privacy constraint of Lop.
|
void |
setValueType(Types.ValueType vt)
set value type of the output that is produced by this lop
|
void |
setVisited(Lop.VisitStatus visited)
set visit status of node
|
abstract String |
toString()
Method to have Lops print their state.
|
public static final String FILE_SEPARATOR
public static final String PROCESS_PREFIX
public static final String CP_ROOT_THREAD_ID
public static final String CP_CHILD_THREAD
public static final double SAMPLE_FRACTION
public static final String INSTRUCTION_DELIMITOR
public static final String OPERAND_DELIMITOR
public static final String VALUETYPE_PREFIX
public static final String DATATYPE_PREFIX
public static final String LITERAL_PREFIX
public static final String VARIABLE_NAME_PLACEHOLDER
public static final String NAME_VALUE_SEPARATOR
public static final String MATRIX_VAR_NAME_PREFIX
public static final String FRAME_VAR_NAME_PREFIX
public static final String SCALAR_VAR_NAME_PREFIX
public static final String UPDATE_INPLACE_PREFIX
public int _beginLine
public int _beginColumn
public int _endLine
public int _endColumn
public String _filename
public Lop(Lop.Type t, Types.DataType dt, Types.ValueType vt)
t
- lop typedt
- data typevt
- value typepublic Lop.VisitStatus getVisited()
public void setVisited(Lop.VisitStatus visited)
visited
- visit statuspublic boolean[] getReachable()
public boolean[] createReachable(int size)
public boolean isDataExecLocation()
public Types.DataType getDataType()
public void setDataType(Types.DataType dt)
dt
- data typepublic Types.ValueType getValueType()
public void setValueType(Types.ValueType vt)
vt
- value typepublic Lop.Type getType()
public ArrayList<Lop> getOutputs()
public void addInput(Lop op)
op
- input loppublic void addOutput(Lop op)
op
- output loppublic void setPrivacyConstraint(PrivacyConstraint privacy)
privacy
- privacy constraint instancepublic PrivacyConstraint getPrivacyConstraint()
public void setFederatedOutput(FEDInstruction.FederatedOutput fedOutput)
public void setConsumerCount(int cc)
public int removeConsumer()
public abstract String toString()
public void resetVisitStatus()
public long getID()
public int getLevel()
public Types.ExecType getExecType()
public void setExecType(Types.ExecType newExecType)
newExecType
- new execution typepublic boolean getProducesIntermediateOutput()
public final void addToDag(Dag<Lop> dag)
dag
- lop DAGpublic OutputParameters getOutputParameters()
public String getInstructions(String output)
output
- outputpublic String getInstructions(String input1, String output)
input1
- input 1output
- outputpublic String getInstructions(String input1, String input2, String output)
input1
- input 1input2
- input 2output
- outputpublic String getInstructions(String input1, String input2, String input3, String output)
input1
- input 1input2
- input 2input3
- input 3output
- outputpublic String getInstructions(String input1, String input2, String input3, String input4, String output)
input1
- input 1input2
- input 2input3
- input 3input4
- input 4output
- outputpublic String getInstructions(String input1, String input2, String input3, String input4, String input5, String output)
input1
- input 1input2
- input 2input3
- input 3input4
- input 4input5
- input 5output
- outputpublic String getInstructions(String input1, String input2, String input3, String input4, String input5, String input6, String output)
input1
- input 1input2
- input 2input3
- input 3input4
- input 4input5
- input 5input6
- input 6output
- outputpublic String getInstructions(String input1, String input2, String input3, String input4, String input5, String input6, String input7, String output)
public String getInstructions(String[] inputs, String[] outputs)
inputs
- array of inputsoutputs
- array of outputspublic String getInstructions()
public Lop.SimpleInstType getSimpleInstructionType()
public void setBeginLine(int passed)
public void setBeginColumn(int passed)
public void setEndLine(int passed)
public void setEndColumn(int passed)
public void setFilename(String passed)
public void setAllPositions(String filename, int blp, int bcp, int elp, int ecp)
public int getBeginLine()
public int getBeginColumn()
public int getEndLine()
public int getEndColumn()
public String getFilename()
public String printErrorLocation()
public String getInstructions(int input, int rowl, int rowu, int coll, int colu, int leftRowDim, int leftColDim, int output)
public boolean isVariable()
public String prepOperand(String label, Types.DataType dt, Types.ValueType vt)
label
- instruction labeldt
- data typevt
- value typepublic String prepOperand(String label, Types.DataType dt, Types.ValueType vt, boolean literal)
label
- instruction labeldt
- data typevt
- value typeliteral
- true if literalpublic String prepOutputOperand()
public String prepOutputOperand(int index)
public String prepScalarLabel()
public String prepScalarOperand(Types.ExecType et, String label)
et
- execution typelabel
- instruction labelpublic String prepScalarInputOperand(Types.ExecType et)
public String prepInputOperand(int index)
Copyright © 2021 The Apache Software Foundation. All rights reserved.