org.apache.sysds.runtime.instructions.cp

## Class CPInstruction

- java.lang.Object
- - org.apache.sysds.runtime.instructions.Instruction
  - - org.apache.sysds.runtime.instructions.cp.CPInstruction

- Direct Known Subclasses:
    BuiltinNaryCPInstruction, ComputationCPInstruction, FunctionCallCPInstruction, SqlCPInstruction, VariableCPInstruction

      public abstract class CPInstruction
      extends Instruction

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CPInstruction.CPType`

    - ### Nested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.Instruction

      `Instruction.IType`

  - ### Field Summary

    - ### Fields inherited from class org.apache.sysds.runtime.instructions.Instruction

      `DATATYPE_PREFIX, FEDERATED_INST_PREFIX, GPU_INST_PREFIX, INSTRUCTION_DELIM, LITERAL_PREFIX, OPERAND_DELIM, SP_INST_PREFIX, VALUETYPE_PREFIX`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CPInstruction.CPType` | `getCPInstructionType()`
    `String` | `getGraphString()`
    `Instruction.IType` | `getType()`
    `Instruction` | `preprocessInstruction(ExecutionContext ec)` This method should be used for any setup before executing this instruction.
    `abstract void` | `processInstruction(ExecutionContext ec)` This method should be used to execute the instruction.
    `boolean` | `requiresLabelUpdate()`
    `static String` | `updateLabels(String instList, LocalVariableMap labelValueMapping)` Takes a delimited string of instructions, and replaces ALL placeholder labels (such as ##mVar2## and ##Var5##) in ALL instructions.

    - ### Methods inherited from class org.apache.sysds.runtime.instructions.Instruction

      `getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExtendedOpcode, getFilename, getInstID, getInstructionString, getLineNum, getOpcode, getOperator, getPrivacyConstraint, postprocessInstruction, printMe, setInstID, setLocation, setLocation, setLocation, setLocation, setPrivacyConstraint, setPrivacyConstraint, toString, updateInstructionThreadID`

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

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

- - ### Method Detail

    - #### getType

          public Instruction.IType getType()

      Specified by:
        `getType` in class `Instruction`

    - #### getCPInstructionType

          public CPInstruction.CPType getCPInstructionType()

    - #### requiresLabelUpdate

          public boolean requiresLabelUpdate()

      Overrides:
        `requiresLabelUpdate` in class `Instruction`

    - #### getGraphString

          public String getGraphString()

      Overrides:
        `getGraphString` in class `Instruction`

    - #### preprocessInstruction

          public Instruction preprocessInstruction(ExecutionContext ec)

      Description copied from class: `Instruction`
      This method should be used for any setup before executing this instruction. Overwriting methods should first call the super method and subsequently do their custom setup.
      Overrides:
        `preprocessInstruction` in class `Instruction`
      Parameters:
        `ec` - execution context
      Returns:
        instruction

    - #### processInstruction

          public abstract void processInstruction(ExecutionContext ec)

      Description copied from class: `Instruction`
      This method should be used to execute the instruction.
      Specified by:
        `processInstruction` in class `Instruction`
      Parameters:
        `ec` - execution context

    - #### updateLabels

          public static String updateLabels(String instList,
                                            LocalVariableMap labelValueMapping)

      Takes a delimited string of instructions, and replaces ALL placeholder labels (such as ##mVar2## and ##Var5##) in ALL instructions.
      Parameters:
        `instList` - instruction list as string
        `labelValueMapping` - local variable map
      Returns:
        instruction list after replacement

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