public abstract class Hop extends Object implements ParseInfo
Modifier and Type | Field and Description |
---|---|
int |
_beginColumn |
int |
_beginLine |
int |
_endColumn |
int |
_endLine |
String |
_filename |
String |
_text |
static long |
CPThreshold |
Constructor and Description |
---|
Hop(String l,
Types.DataType dt,
Types.ValueType vt) |
Modifier and Type | Method and Description |
---|---|
void |
addAllInputs(ArrayList<Hop> list) |
void |
addInput(Hop h) |
abstract boolean |
allowsAllExecTypes() |
void |
checkAndSetForcedPlatform() |
void |
checkAndSetInvalidCPDimsAndSize() |
abstract void |
checkArity()
Check whether this Hop has a correct number of inputs.
|
void |
clearMemEstimate() |
abstract Object |
clone() |
boolean |
colsKnown() |
abstract boolean |
compare(Hop that) |
double |
computeBoundsInformation(Hop input) |
static double |
computeBoundsInformation(Hop input,
LocalVariableMap vars) |
static double |
computeBoundsInformation(Hop input,
LocalVariableMap vars,
HashMap<Long,Double> memo) |
void |
computeMemEstimate(MemoTable memo)
Computes the estimate of memory required to store the input/output of this hop in memory.
|
static long |
computeSizeInformation(Hop input) |
long |
computeSizeInformation(Hop input,
LocalVariableMap vars) |
long |
computeSizeInformation(Hop input,
LocalVariableMap vars,
HashMap<Long,Long> memo) |
void |
constructAndSetLopsDataFlowProperties() |
abstract Lop |
constructLops() |
static Lop |
createOffsetLop(Hop hop,
boolean repCols) |
boolean |
dimsKnown() |
boolean |
dimsKnown(boolean includeNnz) |
boolean |
dimsKnownAny() |
int |
getBeginColumn() |
int |
getBeginLine() |
int |
getBlocksize() |
DataCharacteristics |
getDataCharacteristics() |
Types.DataType |
getDataType() |
long |
getDim(int i) |
long |
getDim1() |
long |
getDim2() |
int |
getEndColumn() |
int |
getEndLine() |
LopProperties.ExecType |
getExecType() |
String |
getFilename() |
LopProperties.ExecType |
getForcedExecType() |
long |
getHopID() |
ArrayList<Hop> |
getInput() |
double |
getInputMemEstimate() |
double |
getInputOutputSize(Collection<String> exclVars) |
double |
getIntermediateMemEstimate() |
long |
getLength() |
Lop |
getLops() |
double |
getMemEstimate()
NOTES:
* Purpose: Whenever the output dimensions / sparsity of a hop are unknown, this hop
should store its worst-case output statistics (if known) in that table.
|
String |
getName() |
long |
getNnz() |
abstract String |
getOpString() |
double |
getOutputMemEstimate() |
ArrayList<Hop> |
getParent() |
PrivacyConstraint |
getPrivacy() |
double |
getSparsity() |
double |
getSpBroadcastSize() |
String |
getText() |
MatrixObject.UpdateType |
getUpdateType() |
Types.ValueType |
getValueType() |
boolean |
hasMatrixInputWithDifferentBlocksizes() |
boolean |
hasValidCPDimsAndSize() |
abstract boolean |
isGPUEnabled()
In memory-based optimizer mode (see OptimizerUtils.isMemoryBasedOptLevel()),
the exectype is determined by checking this method as well as memory budget of this Hop.
|
boolean |
isMatrix() |
boolean |
isMemEstimated() |
boolean |
isOutputEmptyBlocks() |
boolean |
isScalar() |
boolean |
isTransposeSafe()
Defines if this operation is transpose-safe, which means that
the result of op(input) is equivalent to op(t(input)).
|
boolean |
isVisited() |
String |
printErrorLocation() |
void |
refreshColsParameterInformation(Hop input,
LocalVariableMap vars) |
void |
refreshColsParameterInformation(Hop input,
LocalVariableMap vars,
HashMap<Long,Long> memo) |
void |
refreshMemEstimates(MemoTable memo)
Recursively computes memory estimates for all the Hops in the DAG rooted at the
current hop pointed by
this . |
void |
refreshRowsParameterInformation(Hop input,
LocalVariableMap vars) |
void |
refreshRowsParameterInformation(Hop input,
LocalVariableMap vars,
HashMap<Long,Long> memo) |
abstract void |
refreshSizeInformation()
Update the output size information for this hop.
|
boolean |
requiresCheckpoint() |
boolean |
requiresCompression() |
boolean |
requiresLineageCaching() |
boolean |
requiresReblock() |
boolean |
requiresRecompile()
Indicates if dynamic recompilation is required for this hop.
|
void |
resetExecType() |
static void |
resetRecompilationFlag(ArrayList<Hop> hops,
LopProperties.ExecType et,
Recompiler.ResetType reset) |
static void |
resetRecompilationFlag(Hop hops,
LopProperties.ExecType et,
Recompiler.ResetType reset) |
Hop |
resetVisitStatus() |
static void |
resetVisitStatus(ArrayList<Hop> hops) |
static void |
resetVisitStatus(ArrayList<Hop> hops,
boolean force) |
void |
resetVisitStatusForced(HashSet<Long> memo) |
boolean |
rowsKnown() |
void |
setBeginColumn(int passed) |
void |
setBeginLine(int passed) |
void |
setBlocksize(int blen) |
void |
setDataType(Types.DataType dt) |
void |
setDim(int i,
long dim) |
void |
setDim1(long dim1) |
void |
setDim2(long dim2) |
void |
setEndColumn(int passed) |
void |
setEndLine(int passed) |
void |
setFilename(String passed) |
void |
setForcedExecType(LopProperties.ExecType etype) |
void |
setLops(Lop lops) |
void |
setMemEstimate(double mem)
Sets memory estimate in bytes
|
void |
setName(String _name) |
void |
setNnz(long nnz) |
void |
setOutputEmptyBlocks(boolean flag) |
void |
setParseInfo(ParseInfo parseInfo)
Set parse information.
|
void |
setPrivacy(PrivacyConstraint privacy) |
void |
setRequiresCheckpoint(boolean flag) |
void |
setRequiresCompression(boolean flag) |
void |
setRequiresLineageCaching(boolean flag) |
void |
setRequiresReblock(boolean flag) |
void |
setRequiresRecompile()
Marks the hop for dynamic recompilation.
|
void |
setText(String text) |
void |
setUpdateType(MatrixObject.UpdateType update) |
void |
setValueType(Types.ValueType vt) |
void |
setVisited() |
void |
setVisited(boolean flag) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ctxAndFilenameToParseInfo
public static final long CPThreshold
public int _beginLine
public int _beginColumn
public int _endLine
public int _endColumn
public String _filename
public String _text
public Hop(String l, Types.DataType dt, Types.ValueType vt)
public long getHopID()
public abstract void checkArity()
public LopProperties.ExecType getExecType()
public void resetExecType()
public LopProperties.ExecType getForcedExecType()
public void setForcedExecType(LopProperties.ExecType etype)
public abstract boolean allowsAllExecTypes()
public boolean isTransposeSafe()
public void checkAndSetForcedPlatform()
public void checkAndSetInvalidCPDimsAndSize()
public boolean hasValidCPDimsAndSize()
public boolean hasMatrixInputWithDifferentBlocksizes()
public void setRequiresReblock(boolean flag)
public boolean requiresReblock()
public void setRequiresCheckpoint(boolean flag)
public boolean requiresCheckpoint()
public void setRequiresCompression(boolean flag)
public boolean requiresCompression()
public void setRequiresLineageCaching(boolean flag)
public boolean requiresLineageCaching()
public void constructAndSetLopsDataFlowProperties()
public void setOutputEmptyBlocks(boolean flag)
public boolean isOutputEmptyBlocks()
public double getInputOutputSize(Collection<String> exclVars)
public double getMemEstimate()
public void setMemEstimate(double mem)
mem
- memory estimatepublic void clearMemEstimate()
public boolean isMemEstimated()
public double getInputMemEstimate()
public double getOutputMemEstimate()
public double getIntermediateMemEstimate()
public double getSpBroadcastSize()
public void computeMemEstimate(MemoTable memo)
memo
- memory tablepublic void refreshMemEstimates(MemoTable memo)
this
.memo
- memory tablepublic void addInput(Hop h)
public int getBlocksize()
public void setBlocksize(int blen)
public void setNnz(long nnz)
public long getNnz()
public void setPrivacy(PrivacyConstraint privacy)
public PrivacyConstraint getPrivacy()
public void setUpdateType(MatrixObject.UpdateType update)
public MatrixObject.UpdateType getUpdateType()
public abstract Lop constructLops()
public abstract String getOpString()
public abstract boolean isGPUEnabled()
public boolean dimsKnown()
public boolean dimsKnown(boolean includeNnz)
public boolean dimsKnownAny()
public boolean rowsKnown()
public boolean colsKnown()
public Hop resetVisitStatus()
public static void resetRecompilationFlag(ArrayList<Hop> hops, LopProperties.ExecType et, Recompiler.ResetType reset)
public static void resetRecompilationFlag(Hop hops, LopProperties.ExecType et, Recompiler.ResetType reset)
public long getDim1()
public void setDim1(long dim1)
public long getDim2()
public void setDim2(long dim2)
public long getDim(int i)
public void setDim(int i, long dim)
public long getLength()
public double getSparsity()
public DataCharacteristics getDataCharacteristics()
public Lop getLops()
public void setLops(Lop lops)
public boolean isVisited()
public Types.DataType getDataType()
public void setDataType(Types.DataType dt)
public boolean isScalar()
public boolean isMatrix()
public void setVisited()
public void setVisited(boolean flag)
public void setName(String _name)
public String getName()
public Types.ValueType getValueType()
public void setValueType(Types.ValueType vt)
public boolean requiresRecompile()
public void setRequiresRecompile()
public abstract void refreshSizeInformation()
public static long computeSizeInformation(Hop input)
public void refreshRowsParameterInformation(Hop input, LocalVariableMap vars)
public void refreshRowsParameterInformation(Hop input, LocalVariableMap vars, HashMap<Long,Long> memo)
public void refreshColsParameterInformation(Hop input, LocalVariableMap vars)
public void refreshColsParameterInformation(Hop input, LocalVariableMap vars, HashMap<Long,Long> memo)
public long computeSizeInformation(Hop input, LocalVariableMap vars)
public long computeSizeInformation(Hop input, LocalVariableMap vars, HashMap<Long,Long> memo)
public double computeBoundsInformation(Hop input)
public static double computeBoundsInformation(Hop input, LocalVariableMap vars)
public static double computeBoundsInformation(Hop input, LocalVariableMap vars, HashMap<Long,Double> memo)
public abstract Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public abstract boolean compare(Hop that)
public void setBeginLine(int passed)
setBeginLine
in interface ParseInfo
public void setBeginColumn(int passed)
setBeginColumn
in interface ParseInfo
public void setEndLine(int passed)
setEndLine
in interface ParseInfo
public void setEndColumn(int passed)
setEndColumn
in interface ParseInfo
public void setFilename(String passed)
setFilename
in interface ParseInfo
public int getBeginLine()
getBeginLine
in interface ParseInfo
public int getBeginColumn()
getBeginColumn
in interface ParseInfo
public int getEndLine()
getEndLine
in interface ParseInfo
public int getEndColumn()
getEndColumn
in interface ParseInfo
public String getFilename()
getFilename
in interface ParseInfo
public String printErrorLocation()
public void setParseInfo(ParseInfo parseInfo)
parseInfo
- parse information, such as beginning line position, beginning
column position, ending line position, ending column position,
text, and filenameCopyright © 2020 The Apache Software Foundation. All rights reserved.