org.apache.sysml.runtime.instructions

Class Instruction

    • Constructor Detail

      • Instruction

        public Instruction()
    • Method Detail

      • getFilename

        public String getFilename()
      • getBeginLine

        public int getBeginLine()
      • getEndLine

        public int getEndLine()
      • getBeginColumn

        public int getBeginColumn()
      • getEndColumn

        public int getEndColumn()
      • setLocation

        public void setLocation(String filename,
                                int beginLine,
                                int endLine,
                                int beginCol,
                                int endCol)
      • setLocation

        public void setLocation(org.apache.sysml.lops.Lop lop)
      • setLocation

        public void setLocation(org.apache.sysml.parser.DataIdentifier id)
      • setLocation

        public void setLocation(Instruction oldInst)
      • getLineNum

        public int getLineNum()
        Getter for instruction line number
        Returns:
        lineNum Instruction approximate DML script line number
      • setInstID

        public void setInstID(long id)
        Setter for instruction unique identifier
        Parameters:
        id - Instruction unique identifier
      • getInstID

        public long getInstID()
        Getter for instruction unique identifier
        Returns:
        instID Instruction unique identifier
      • printMe

        public void printMe()
      • getGraphString

        public String getGraphString()
      • getOpcode

        public String getOpcode()
      • getExtendedOpcode

        public String getExtendedOpcode()
      • requiresLabelUpdate

        public boolean requiresLabelUpdate()
      • updateInstructionThreadID

        public void updateInstructionThreadID(String pattern,
                                              String replace)
                                       throws DMLRuntimeException
        All instructions that have thread-specific filenames or names encoded in it should overwrite this method in order to update (1) the in-memory instruction and (2) the instruction string
        Parameters:
        pattern - ?
        replace - ?
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • preprocessInstruction

        public Instruction preprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
                                          throws DMLRuntimeException
        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.
        Parameters:
        ec - execution context
        Returns:
        instruction
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • processInstruction

        public abstract void processInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
                                         throws DMLRuntimeException
        This method should be used to execute the instruction.
        Parameters:
        ec - execution context
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • postprocessInstruction

        public void postprocessInstruction(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
                                    throws DMLRuntimeException
        This method should be used for any tear down after executing this instruction. Overwriting methods should first do their custom tear down and subsequently call the super method.
        Parameters:
        ec - execution context
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs

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