Class ProgramRecompiler


  • public class ProgramRecompiler
    extends Object
    • Constructor Detail

      • ProgramRecompiler

        public ProgramRecompiler()
    • Method Detail

      • rFindAndRecompileIndexingHOP

        public static void rFindAndRecompileIndexingHOP​(StatementBlock sb,
                                                        ProgramBlock pb,
                                                        String var,
                                                        ExecutionContext ec,
                                                        boolean force)
        NOTE: if force is set, we set and recompile the respective indexing hops; otherwise, we release the forced exec type and recompile again. Hence, any changes can be exactly reverted with the same access behavior.
        Parameters:
        sb - statement block
        pb - program block
        var - variable
        ec - execution context
        force - if true, set and recompile the respective indexing hops
      • isApplicableForReuseVariable

        public static boolean isApplicableForReuseVariable​(DMLProgram prog,
                                                           StatementBlock parforSB,
                                                           String var)
        This function determines if an parfor input variable is guaranteed to be read-only across multiple invocations of parfor optimization (e.g., in a surrounding while loop). In case of invariant variables we can reuse partitioned matrices and propagate constants for better size estimation.
        Parameters:
        prog - dml program
        parforSB - parfor statement block
        var - variable
        Returns:
        true if can reuse variable
      • containsAtLeastOneFunction

        public static boolean containsAtLeastOneFunction​(ProgramBlock pb)