org.apache.sysds.runtime.controlprogram.parfor.opt

## Class Optimizer

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.parfor.opt.Optimizer

- Direct Known Subclasses:
    OptimizerRuleBased

      public abstract class Optimizer
      extends Object

  Generic optimizer super class that defines the interface of all implemented optimizers. Furthermore it implements basic primitives, used by all optimizers such as the enumeration of plan alternatives and specific rewrites. Optimization objective: \phi: \min T(prog) | k \leq ck \wedge m(prog) \leq cm with T(p)=max_(1\leq i\leq k)(T(prog_i).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Optimizer.CostModelType`
    `static class` | `Optimizer.PlanInputType`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Optimizer.CostModelType` | `getCostModelType()`
    `long` | `getNumEvaluatedPlans()`
    `long` | `getNumTotalPlans()`
    `abstract ParForProgramBlock.POptMode` | `getOptMode()`
    `abstract Optimizer.PlanInputType` | `getPlanInputType()`
    `abstract boolean` | `optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec)` Optimize

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

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

- - ### Method Detail

    - #### optimize

          public abstract boolean optimize(ParForStatementBlock sb,
                                           ParForProgramBlock pb,
                                           OptTree plan,
                                           CostEstimator est,
                                           ExecutionContext ec)

      Optimize
      Parameters:
        `sb` - parfor statement block
        `pb` - parfor program block
        `plan` - complete plan of a top-level parfor
        `est` - cost estimator
        `ec` - execution context
      Returns:
        true if plan changed, false otherwise

    - #### getPlanInputType

          public abstract Optimizer.PlanInputType getPlanInputType()

    - #### getCostModelType

          public abstract Optimizer.CostModelType getCostModelType()

    - #### getOptMode

          public abstract ParForProgramBlock.POptMode getOptMode()

    - #### getNumTotalPlans

          public long getNumTotalPlans()

    - #### getNumEvaluatedPlans

          public long getNumEvaluatedPlans()

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