1 #ifndef HALIDE_ASSOCIATIVITY_H 2 #define HALIDE_ASSOCIATIVITY_H 76 return !(*
this == other);
82 std::vector<Replacement>
xs;
83 std::vector<Replacement>
ys;
112 const std::string &f, std::vector<Expr> args, std::vector<Expr> exprs);
Replacement(const std::string &var, Expr expr)
bool equal(const RDom &bounds0, const RDom &bounds1)
Return true if bounds0 and bounds1 represent the same bounds.
A fragment of Halide syntax.
bool operator!=(const Replacement &other) const
std::string var
Variable name that is used to replace the expr in 'op'.
std::vector< Replacement > ys
This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
AssociativePattern pattern
List of pairs of binary associative op and its identity.
Tables listing associative operators and their identities.
std::vector< Replacement > xs
AssociativeOp(const AssociativePattern &p, const std::vector< Replacement > &xs, const std::vector< Replacement > &ys, bool is_associative)
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt) ...
Represent the equivalent associative op of an update definition.
AssociativeOp(size_t size)
Not visible externally, similar to 'static' linkage in C.
bool is_commutative
Indicate if the associative op is also commutative.
AssociativeOp prove_associativity(const std::string &f, std::vector< Expr > args, std::vector< Expr > exprs)
Given an update definition of a Func 'f', determine its equivalent associative binary/unary operator ...
Represent an associative op with its identity.
bool operator==(const Replacement &other) const
void associativity_test()