Package org.apache.sysds.parser
Class ParForStatementBlock
- java.lang.Object
-
- org.apache.sysds.parser.LiveVariableAnalysis
-
- org.apache.sysds.parser.StatementBlock
-
- org.apache.sysds.parser.ForStatementBlock
-
- org.apache.sysds.parser.ParForStatementBlock
-
- All Implemented Interfaces:
ParseInfo
public class ParForStatementBlock extends ForStatementBlock
This ParForStatementBlock is essentially identical to a ForStatementBlock, except an extended validate for checking/setting optional parfor parameters and running the loop dependency analysis.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParForStatementBlock.ResultVar
-
Field Summary
Fields Modifier and Type Field Description static String
CHECK
static String
DATA_PARTITIONER
static String
EXEC_MODE
static String
INTERAL_FN_INDEX_COL
static String
INTERAL_FN_INDEX_ROW
static String
OPT_LOG
static String
OPT_MODE
static String
PAR
static String
PROFILE
static String
RESULT_MERGE
static String
TASK_PARTITIONER
static String
TASK_SIZE
-
Fields inherited from class org.apache.sysds.parser.StatementBlock
DEFAULT_LOOP_REPETITIONS
-
-
Constructor Summary
Constructors Constructor Description ParForStatementBlock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParForProgramBlock.PartitionFormat
determineDataPartitionFormat(String var)
Determines the PDataPartitioningFormat for read-only parent variables according to the access pattern of that variable within the parfor statement block.long
getID()
List<String>
getReadOnlyParentMatrixVars()
ArrayList<ParForStatementBlock.ResultVar>
getResultVariables()
void
setResultVariables(ArrayList<ParForStatementBlock.ResultVar> rvars)
VariableSet
validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)
-
Methods inherited from class org.apache.sysds.parser.ForStatementBlock
analyze, getEstimateReps, getFromHops, getFromLops, getIncrementHops, getIncrementLops, getInputstoSB, getIterPredicate, getToHops, getToLops, initializebackwardLV, initializeforwardLV, performConstantPropagation, requiresFromRecompilation, requiresIncrementRecompilation, requiresPredicateRecompilation, requiresToRecompilation, setFromHops, setFromLops, setIncrementHops, setIncrementLops, setToHops, setToLops, updatePredicateRecompilationFlags, updateRepetitionEstimates
-
Methods inherited from class org.apache.sysds.parser.StatementBlock
addStatement, addStatementBlock, getBeginColumn, getBeginLine, getConstIn, getConstOut, getDMLProg, getEndColumn, getEndLine, getFilename, getHops, getLops, getName, getNumStatements, getOutputNamesofSB, getOutputsofSB, getSBID, getStatement, getStatements, getText, getUpdateInPlaceVars, hasHops, isMergeableFunctionCallBlock, isNondeterministic, isRewritableFunctionCall, isSplitDag, mergeable, mergeFunctionCalls, mergeStatementBlocks, printBlockErrorLocation, printErrorLocation, printWarningLocation, raiseValidateError, raiseValidateError, requiresRecompilation, rewriteFunctionCallStatements, rHoistFunctionCallsFromExpressions, rHoistFunctionCallsFromExpressions, rHoistFunctionCallsFromExpressions, setBeginColumn, setBeginLine, setDMLProg, setEndColumn, setEndLine, setFilename, setHops, setLops, setNondeterministic, setParseInfo, setSplitDag, setStatementFormatType, setStatementFormatType, setStatements, setText, setUpdateInPlaceVars, toString, updateRecompilationFlag
-
Methods inherited from class org.apache.sysds.parser.LiveVariableAnalysis
getGen, getKill, getWarn, liveIn, liveOut, setGen, setKill, setLiveIn, setLiveOut, setReadVariables, setUpdatedVariables, updateLiveVariablesOut, variablesRead, variablesUpdated
-
-
-
-
Field Detail
-
CHECK
public static final String CHECK
- See Also:
- Constant Field Values
-
PAR
public static final String PAR
- See Also:
- Constant Field Values
-
TASK_PARTITIONER
public static final String TASK_PARTITIONER
- See Also:
- Constant Field Values
-
TASK_SIZE
public static final String TASK_SIZE
- See Also:
- Constant Field Values
-
DATA_PARTITIONER
public static final String DATA_PARTITIONER
- See Also:
- Constant Field Values
-
RESULT_MERGE
public static final String RESULT_MERGE
- See Also:
- Constant Field Values
-
EXEC_MODE
public static final String EXEC_MODE
- See Also:
- Constant Field Values
-
OPT_MODE
public static final String OPT_MODE
- See Also:
- Constant Field Values
-
OPT_LOG
public static final String OPT_LOG
- See Also:
- Constant Field Values
-
PROFILE
public static final String PROFILE
- See Also:
- Constant Field Values
-
INTERAL_FN_INDEX_ROW
public static final String INTERAL_FN_INDEX_ROW
- See Also:
- Constant Field Values
-
INTERAL_FN_INDEX_COL
public static final String INTERAL_FN_INDEX_COL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getID
public long getID()
-
getResultVariables
public ArrayList<ParForStatementBlock.ResultVar> getResultVariables()
-
setResultVariables
public void setResultVariables(ArrayList<ParForStatementBlock.ResultVar> rvars)
-
validate
public VariableSet validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)
- Overrides:
validate
in classForStatementBlock
-
determineDataPartitionFormat
public ParForProgramBlock.PartitionFormat determineDataPartitionFormat(String var)
Determines the PDataPartitioningFormat for read-only parent variables according to the access pattern of that variable within the parfor statement block. Row-wise or column wise partitioning is only suggested if we see pure row-wise or column-wise access patterns.- Parameters:
var
- variables- Returns:
- partition format
-
-