Class OptNode


  • public class OptNode
    extends Object
    Internal representation of a plan alternative for program blocks and instructions in order to enable efficient and simple recursive enumeration and plan changes. This is only used within the optimizer and therefore not visible to any other component.
    • Method Detail

      • setID

        public void setID​(long id)
      • getID

        public long getID()
      • getBeginLine

        public int getBeginLine()
      • setBeginLine

        public void setBeginLine​(int line)
      • getEndLine

        public int getEndLine()
      • setEndLine

        public void setEndLine​(int line)
      • setLineNumbers

        public void setLineNumbers​(int begin,
                                   int end)
      • addChild

        public void addChild​(OptNode child)
      • getK

        public int getK()
      • setK

        public void setK​(int k)
      • exchangeChild

        public boolean exchangeChild​(OptNode oldNode,
                                     OptNode newNode)
      • isLeaf

        public boolean isLeaf()
      • hasOnlySimpleChilds

        public boolean hasOnlySimpleChilds()
      • getInstructionName

        public String getInstructionName()
      • isRecursive

        public boolean isRecursive()
      • setSerialParFor

        public void setSerialParFor()
        Set the plan to a parallel degree of 1 (serial execution).
      • size

        public int size()
        Gets the number of plan nodes.
        Returns:
        number of plan nodes
      • isCPOnly

        public boolean isCPOnly()
        Determines if all program blocks and instructions exhibit the execution type CP.
        Returns:
        true of all program blocks and instructions execute on CP
      • getTotalK

        public int getTotalK()
      • getMaxC

        public long getMaxC​(long N)
      • hasNestedParallelism

        public boolean hasNestedParallelism​(boolean flagNested)
      • hasNestedPartitionReads

        public boolean hasNestedPartitionReads​(boolean flagNested)
      • checkAndCleanupLeafNodes

        public void checkAndCleanupLeafNodes()
      • checkAndCleanupRecursiveFunc

        public void checkAndCleanupRecursiveFunc​(Set<String> stack)
      • explain

        public String explain​(int level,
                              boolean withDetails)
        Explain tool: prints the hierarchical plan to stdout.
        Parameters:
        level - depth to print?
        withDetails - if true, explain details
        Returns:
        string explanation
      • getMaxProblemSize

        public long getMaxProblemSize()
        Determines the maximum problem size, in terms of the maximum total number of inner loop iterations, of the entire subtree.
        Returns:
        maximum problem size