Package org.apache.sysds.hops.rewrite
Class RewriteAlgebraicSimplificationDynamic
java.lang.Object
org.apache.sysds.hops.rewrite.HopRewriteRule
org.apache.sysds.hops.rewrite.RewriteAlgebraicSimplificationDynamic
Rule: Algebraic Simplifications. Simplifies binary expressions
in terms of two major purposes: (1) rewrite binary operations
to unary operations when possible (in CP this reduces the memory
estimate, in MR this allows map-only operations and hence prevents
unnecessary shuffle and sort) and (2) remove binary operations that
are in itself are unnecessary (e.g., *1 and /1).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrewriteHopDAG(Hop root, ProgramRewriteStatus state) Handle a predicate hop DAG with exactly one root.rewriteHopDAGs(ArrayList<Hop> roots, ProgramRewriteStatus state) Handle a generic (last-level) hop DAG with multiple roots.
-
Constructor Details
-
RewriteAlgebraicSimplificationDynamic
public RewriteAlgebraicSimplificationDynamic()
-
-
Method Details
-
rewriteHopDAGs
Description copied from class:HopRewriteRuleHandle a generic (last-level) hop DAG with multiple roots.- Specified by:
rewriteHopDAGsin classHopRewriteRule- Parameters:
roots- high-level operator rootsstate- program rewrite status- Returns:
- list of high-level operators
-
rewriteHopDAG
Description copied from class:HopRewriteRuleHandle a predicate hop DAG with exactly one root.- Specified by:
rewriteHopDAGin classHopRewriteRule- Parameters:
root- high-level operator rootstate- program rewrite status- Returns:
- high-level operator
-