public class ExecutionContext extends Object
Constructor and Description |
---|
ExecutionContext(LocalVariableMap vars) |
public ExecutionContext(LocalVariableMap vars)
public Program getProgram()
public void setProgram(Program prog)
public LocalVariableMap getVariables()
public void setVariables(LocalVariableMap vars)
public Lineage getLineage()
public void setLineage(Lineage lineage)
public boolean isAutoCreateVars()
public void setAutoCreateVars(boolean flag)
public void setTID(long tid)
public long getTID()
public GPUContext getGPUContext(int index)
index
- index of the GPUContextpublic void setGPUContexts(List<GPUContext> gpuContexts)
gpuContexts
- a collection of GPUContextspublic List<GPUContext> getGPUContexts()
public int getNumGPUContexts()
public boolean containsVariable(CPOperand operand)
public boolean containsVariable(String name)
public boolean isMatrixObject(String varname)
public MatrixObject getMatrixObject(CPOperand input)
public MatrixObject getMatrixObject(String varname)
public TensorObject getTensorObject(String varname)
public boolean isFrameObject(String varname)
public FrameObject getFrameObject(CPOperand input)
public FrameObject getFrameObject(String varname)
public CacheableData<?> getCacheableData(CPOperand input)
public CacheableData<?> getCacheableData(String varname)
public void releaseCacheableData(String varname)
public DataCharacteristics getDataCharacteristics(String varname)
public MatrixBlock getMatrixInput(String varName)
varName
- variable namepublic TensorBlock getTensorInput(String varName)
varName
- variable namepublic void setMetaData(String varName, long nrows, long ncols)
public Pair<MatrixObject,Boolean> getDenseMatrixOutputForGPUInstruction(String varName, long numRows, long numCols)
varName
- name of the output matrix (known by this ExecutionContext
)numRows
- number of rows of matrix objectnumCols
- number of columns of matrix objectMatrixObject
and a boolean indicating whether a cuda memory allocation took place (as opposed to the space already being allocated)public Pair<MatrixObject,Boolean> getSparseMatrixOutputForGPUInstruction(String varName, long numRows, long numCols, long nnz)
varName
- variable namenumRows
- number of rows of matrix objectnumCols
- number of columns of matrix objectnnz
- number of non zeroespublic MatrixObject allocateGPUMatrixObject(String varName, long numRows, long numCols)
GPUObject
for a given LOPS Variable (eg. _mVar3)varName
- variable namenumRows
- number of rows of matrix objectnumCols
- number of columns of matrix objectpublic long getGPUDensePointerAddress(MatrixObject obj)
public CSRPointer getGPUSparsePointerAddress(MatrixObject obj)
public MatrixObject getMatrixInputForGPUInstruction(String varName, String opcode)
public void releaseMatrixInput(String varName)
varName
- variable namepublic void releaseMatrixInput(String... varNames)
public void releaseMatrixInputForGPUInstruction(String varName)
public FrameBlock getFrameInput(String varName)
varName
- variable namepublic void releaseFrameInput(String varName)
varName
- variable namepublic void releaseTensorInput(String varName)
public void releaseTensorInput(String... varNames)
public ScalarObject getScalarInput(CPOperand input)
public ScalarObject getScalarInput(String name, Types.ValueType vt, boolean isLiteral)
public void setScalarOutput(String varName, ScalarObject so)
public ListObject getListObject(CPOperand input)
public ListObject getListObject(String name)
public void releaseMatrixOutputForGPUInstruction(String varName)
public void setMatrixOutput(String varName, MatrixBlock outputData)
public void setMatrixOutputAndLineage(String varName, MatrixBlock outputData, LineageItem li)
public void setMatrixOutput(String varName, MatrixBlock outputData, MatrixObject.UpdateType flag)
public void setTensorOutput(String varName, TensorBlock outputData)
public void setFrameOutput(String varName, FrameBlock outputData)
public static CacheableData<?> createCacheableData(CacheBlock cb)
public static MatrixObject createMatrixObject(MatrixBlock mb)
public static FrameObject createFrameObject(FrameBlock fb)
public List<MatrixBlock> getMatrixInputs(CPOperand[] inputs)
public List<MatrixBlock> getMatrixInputs(CPOperand[] inputs, boolean includeList)
public List<ScalarObject> getScalarInputs(CPOperand[] inputs)
public void releaseMatrixInputs(CPOperand[] inputs)
public void releaseMatrixInputs(CPOperand[] inputs, boolean includeList)
public boolean[] pinVariables(List<String> varList)
varList
- variable listpublic void unpinVariables(List<String> varList, boolean[] varsState)
varsStats
.
Typical usage:
oldStatus = pinVariables(varList);
...
unpinVariables(varList, oldStatus);
i.e., a call to unpinVariables() is preceded by pinVariables().varList
- variable listvarsState
- variable statepublic ArrayList<String> getVarList()
public ArrayList<String> getVarListPartitioned()
public final void cleanupDataObject(Data dat)
public void cleanupCacheableData(CacheableData<?> mo)
public boolean isFederated(CPOperand input)
public boolean isFederated(CPOperand input, FederationMap.FType type)
public void traceLineage(Instruction inst)
public void maintainLineageDebuggerInfo(Instruction inst)
public LineageItem getLineageItem(CPOperand input)
public LineageItem getOrCreateLineageItem(CPOperand input)
Copyright © 2021 The Apache Software Foundation. All rights reserved.