Package org.apache.sysds.parser
Class ForStatementBlock
- java.lang.Object
- 
- org.apache.sysds.parser.LiveVariableAnalysis
- 
- org.apache.sysds.parser.StatementBlock
- 
- org.apache.sysds.parser.ForStatementBlock
 
 
 
- 
- All Implemented Interfaces:
- ParseInfo
 - Direct Known Subclasses:
- ParForStatementBlock
 
 public class ForStatementBlock extends StatementBlock 
- 
- 
Field Summary- 
Fields inherited from class org.apache.sysds.parser.StatementBlockDEFAULT_LOOP_REPETITIONS
 
- 
 - 
Constructor SummaryConstructors Constructor Description ForStatementBlock()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableSetanalyze(VariableSet loPassed)intgetEstimateReps()HopgetFromHops()LopgetFromLops()HopgetIncrementHops()LopgetIncrementLops()ArrayList<String>getInputstoSB()IterablePredicategetIterPredicate()HopgetToHops()LopgetToLops()VariableSetinitializebackwardLV(VariableSet loPassed)VariableSetinitializeforwardLV(VariableSet activeInPassed)For each statement: gen rule: for each variable read in current statement but not updated in any PRIOR statement, add to gen Handles case where variable both read and updated in same statement (i = i + 1, i needs to be added to gen) kill rule: for each variable updated in current statement but not read in this or any PRIOR statement, add to kill.voidperformConstantPropagation(HashMap<String,ConstIdentifier> currConstVars)booleanrequiresFromRecompilation()booleanrequiresIncrementRecompilation()booleanrequiresPredicateRecompilation()booleanrequiresToRecompilation()voidsetFromHops(Hop hops)voidsetFromLops(Lop lops)voidsetIncrementHops(Hop hops)voidsetIncrementLops(Lop lops)voidsetToHops(Hop hops)voidsetToLops(Lop lops)booleanupdatePredicateRecompilationFlags()voidupdateRepetitionEstimates(double repetitions)Updates the repetition estimate for this statement block and all contained hops.VariableSetvalidate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)- 
Methods inherited from class org.apache.sysds.parser.StatementBlockaddStatement, 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.LiveVariableAnalysisgetGen, getKill, getWarn, liveIn, liveOut, setGen, setKill, setLiveIn, setLiveOut, setReadVariables, setUpdatedVariables, updateLiveVariablesOut, variablesRead, variablesUpdated
 
- 
 
- 
- 
- 
Method Detail- 
getIterPredicatepublic IterablePredicate getIterPredicate() 
 - 
validatepublic VariableSet validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional) - Overrides:
- validatein class- StatementBlock
 
 - 
initializeforwardLVpublic VariableSet initializeforwardLV(VariableSet activeInPassed) Description copied from class:StatementBlockFor each statement: gen rule: for each variable read in current statement but not updated in any PRIOR statement, add to gen Handles case where variable both read and updated in same statement (i = i + 1, i needs to be added to gen) kill rule: for each variable updated in current statement but not read in this or any PRIOR statement, add to kill.- Overrides:
- initializeforwardLVin class- StatementBlock
 
 - 
initializebackwardLVpublic VariableSet initializebackwardLV(VariableSet loPassed) - Overrides:
- initializebackwardLVin class- StatementBlock
 
 - 
setFromHopspublic void setFromHops(Hop hops) 
 - 
setToHopspublic void setToHops(Hop hops) 
 - 
setIncrementHopspublic void setIncrementHops(Hop hops) 
 - 
getFromHopspublic Hop getFromHops() 
 - 
getToHopspublic Hop getToHops() 
 - 
getIncrementHopspublic Hop getIncrementHops() 
 - 
setFromLopspublic void setFromLops(Lop lops) 
 - 
setToLopspublic void setToLops(Lop lops) 
 - 
setIncrementLopspublic void setIncrementLops(Lop lops) 
 - 
getFromLopspublic Lop getFromLops() 
 - 
getToLopspublic Lop getToLops() 
 - 
getIncrementLopspublic Lop getIncrementLops() 
 - 
getInputstoSBpublic ArrayList<String> getInputstoSB() - Overrides:
- getInputstoSBin class- StatementBlock
 
 - 
analyzepublic VariableSet analyze(VariableSet loPassed) - Overrides:
- analyzein class- StatementBlock
 
 - 
performConstantPropagationpublic void performConstantPropagation(HashMap<String,ConstIdentifier> currConstVars) 
 - 
updatePredicateRecompilationFlagspublic boolean updatePredicateRecompilationFlags() 
 - 
requiresPredicateRecompilationpublic boolean requiresPredicateRecompilation() 
 - 
requiresFromRecompilationpublic boolean requiresFromRecompilation() 
 - 
requiresToRecompilationpublic boolean requiresToRecompilation() 
 - 
requiresIncrementRecompilationpublic boolean requiresIncrementRecompilation() 
 - 
getEstimateRepspublic int getEstimateReps() 
 - 
updateRepetitionEstimatespublic void updateRepetitionEstimates(double repetitions) Description copied from class:StatementBlockUpdates the repetition estimate for this statement block and all contained hops. FunctionStatementBlocks are loaded from the function dictionary and repetitions are estimated for the contained statement blocks. This method is overridden in the subclasses of StatementBlock.- Overrides:
- updateRepetitionEstimatesin class- StatementBlock
- Parameters:
- repetitions- estimated for this statement block
 
 
- 
 
-