org.apache.sysds.hops.codegen

## Class SpoofCompiler

- java.lang.Object
- - org.apache.sysds.hops.codegen.SpoofCompiler

-     public class SpoofCompiler
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SpoofCompiler.CompilerType`
    `static class` | `SpoofCompiler.GeneratorAPI`
    `static class` | `SpoofCompiler.IntegrationType`
    `static class` | `SpoofCompiler.PlanCachePolicy`
    `static class` | `SpoofCompiler.PlanSelector`
    `static class` | `SpoofCompiler.RegisterAlloc`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SpoofCompiler.GeneratorAPI` | `API`
    `static SpoofCompiler.IntegrationType` | `INTEGRATION`
    `static SpoofCompiler.CompilerType` | `JAVA_COMPILER`
    `static HashMap<SpoofCompiler.GeneratorAPI,Long>` | `native_contexts`
    `static SpoofCompiler.PlanCachePolicy` | `PLAN_CACHE_POLICY`
    `static int` | `PLAN_CACHE_SIZE`
    `static SpoofCompiler.PlanSelector` | `PLAN_SEL_POLICY`
    `static boolean` | `PRUNE_REDUNDANT_PLANS`
    `static boolean` | `RECOMPILE_CODEGEN`
    `static SpoofCompiler.RegisterAlloc` | `REG_ALLOC_POLICY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpoofCompiler()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `cleanupCodeGenerator()`
    `static PlanSelection` | `createPlanSelector()` Factory method for alternative plan selection policies.
    `static void` | `generateCode(DMLProgram dmlprog)`
    `static void` | `generateCode(Program rtprog)`
    `static ArrayList<Hop>` | `generateCodeFromHopDAGs(ArrayList<Hop> roots)`
    `static ArrayList<Instruction>` | `generateCodeFromHopDAGsToInst(Hop root)`
    `static ArrayList<Instruction>` | `generateCodeFromHopDAGsToInst(StatementBlock sb, ArrayList<Hop> roots)`
    `static void` | `generateCodeFromProgramBlock(ProgramBlock current)`
    `static void` | `generateCodeFromStatementBlock(StatementBlock current)`
    `static void` | `loadNativeCodeGenerator(SpoofCompiler.GeneratorAPI generator)`
    `static ArrayList<Hop>` | `optimize(ArrayList<Hop> roots, boolean recompile)` Main interface of sum-product optimizer, statement block dag.
    `static Hop` | `optimize(Hop root, boolean recompile)` Main interface of sum-product optimizer, predicate dag.
    `static void` | `setConfiguredPlanSelector()`
    `static void` | `setExecTypeSpecificJavaCompiler()`
    `static void` | `unloadNativeCodeGenerator()`

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

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

- - ### Field Detail

    - #### JAVA_COMPILER

          public static SpoofCompiler.CompilerType JAVA_COMPILER

    - #### PLAN_SEL_POLICY

          public static SpoofCompiler.PlanSelector PLAN_SEL_POLICY

    - #### INTEGRATION

          public static final SpoofCompiler.IntegrationType INTEGRATION

    - #### RECOMPILE_CODEGEN

          public static final boolean RECOMPILE_CODEGEN

      See Also:
        Constant Field Values

    - #### PRUNE_REDUNDANT_PLANS

          public static final boolean PRUNE_REDUNDANT_PLANS

      See Also:
        Constant Field Values

    - #### PLAN_CACHE_POLICY

          public static SpoofCompiler.PlanCachePolicy PLAN_CACHE_POLICY

    - #### PLAN_CACHE_SIZE

          public static final int PLAN_CACHE_SIZE

      See Also:
        Constant Field Values

    - #### REG_ALLOC_POLICY

          public static final SpoofCompiler.RegisterAlloc REG_ALLOC_POLICY

    - #### API

          public static SpoofCompiler.GeneratorAPI API

    - #### native_contexts

          public static HashMap<SpoofCompiler.GeneratorAPI,Long> native_contexts

  - ### Constructor Detail

    - #### SpoofCompiler

          public SpoofCompiler()

  - ### Method Detail

    - #### loadNativeCodeGenerator

          public static void loadNativeCodeGenerator(SpoofCompiler.GeneratorAPI generator)

    - #### unloadNativeCodeGenerator

          public static void unloadNativeCodeGenerator()

    - #### generateCode

          public static void generateCode(DMLProgram dmlprog)

    - #### generateCode

          public static void generateCode(Program rtprog)

    - #### generateCodeFromStatementBlock

          public static void generateCodeFromStatementBlock(StatementBlock current)

    - #### generateCodeFromProgramBlock

          public static void generateCodeFromProgramBlock(ProgramBlock current)

    - #### generateCodeFromHopDAGs

          public static ArrayList<Hop> generateCodeFromHopDAGs(ArrayList<Hop> roots)

    - #### generateCodeFromHopDAGsToInst

          public static ArrayList<Instruction> generateCodeFromHopDAGsToInst(StatementBlock sb,
                                                                             ArrayList<Hop> roots)

    - #### generateCodeFromHopDAGsToInst

          public static ArrayList<Instruction> generateCodeFromHopDAGsToInst(Hop root)

    - #### optimize

          public static Hop optimize(Hop root,
                                     boolean recompile)

      Main interface of sum-product optimizer, predicate dag.
      Parameters:
        `root` - dag root node
        `recompile` - true if invoked during dynamic recompilation
      Returns:
        dag root node of modified dag

    - #### optimize

          public static ArrayList<Hop> optimize(ArrayList<Hop> roots,
                                                boolean recompile)

      Main interface of sum-product optimizer, statement block dag.
      Parameters:
        `roots` - dag root nodes
        `recompile` - true if invoked during dynamic recompilation
      Returns:
        dag root nodes of modified dag

    - #### cleanupCodeGenerator

          public static void cleanupCodeGenerator()

    - #### createPlanSelector

          public static PlanSelection createPlanSelector()

      Factory method for alternative plan selection policies.
      Returns:
        plan selector

    - #### setConfiguredPlanSelector

          public static void setConfiguredPlanSelector()

    - #### setExecTypeSpecificJavaCompiler

          public static void setExecTypeSpecificJavaCompiler()

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