use of org.apache.sysml.hops.rewrite.RewriteConstantFolding in project incubator-systemml by apache.
the class OptimizationWrapper method createProgramRewriterWithRuleSets.
private static ProgramRewriter createProgramRewriterWithRuleSets() {
//create hop rewrite set
ArrayList<HopRewriteRule> hRewrites = new ArrayList<HopRewriteRule>();
hRewrites.add(new RewriteConstantFolding());
//create statementblock rewrite set
ArrayList<StatementBlockRewriteRule> sbRewrites = new ArrayList<StatementBlockRewriteRule>();
sbRewrites.add(new RewriteRemoveUnnecessaryBranches());
ProgramRewriter rewriter = new ProgramRewriter(hRewrites, sbRewrites);
return rewriter;
}
Aggregations