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 and Description
    --- | ---
    `static class` | `ParForStatementBlock.ResultVar`

  - ### Field Summary

    Fields
    Modifier and Type | Field and 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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParForStatementBlock()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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()`
    `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`

    - ### 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, 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`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.sysds.parser.ParseInfo

      `ctxAndFilenameToParseInfo`

- - ### 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

  - ### Constructor Detail

    - #### ParForStatementBlock

          public ParForStatementBlock()

  - ### Method Detail

    - #### getID

          public long getID()

    - #### getResultVariables

          public ArrayList<ParForStatementBlock.ResultVar> getResultVariables()

    - #### validate

          public VariableSet validate(DMLProgram dmlProg,
                                      VariableSet ids,
                                      HashMap<String,ConstIdentifier> constVars,
                                      boolean conditional)

      Overrides:
        `validate` in class `ForStatementBlock`

    - #### getReadOnlyParentMatrixVars

          public List<String> getReadOnlyParentMatrixVars()

    - #### 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

Copyright © 2021 The Apache Software Foundation. All rights reserved.