1 #ifndef HALIDE_IR_EQUALITY_H 2 #define HALIDE_IR_EQUALITY_H 36 uint64_t mix = (pa + pb) + (pa ^ pb);
38 mix ^= (mix >> (bits * 2));
39 uint32_t bottom = mix & ((1 << bits) - 1);
43 std::vector<Entry> entries;
54 const Entry &e = entries[h];
60 for (
auto &entry : entries) {
68 : bits(b), entries(static_cast<
size_t>(1) << bits) {
114 bool equal(
const Stmt &a,
const Stmt &b);
A compare struct suitable for use in std::map and std::set that computes a lexical ordering on IR nod...
ExprWithCompareCache(const Expr &e, IRCompareCache *c)
bool equal(const RDom &bounds0, const RDom &bounds1)
Return true if bounds0 and bounds1 represent the same bounds.
A fragment of Halide syntax.
A reference-counted handle to a statement node.
void insert(const Expr &a, const Expr &b)
bool operator<(const ExprWithCompareCache &other) const
The comparison uses (and updates) the cache.
bool contains(const Expr &a, const Expr &b) const
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.
bool graph_less_than(const Expr &a, const Expr &b)
Order unsanitized IRNodes for use in a map key.
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt) ...
unsigned __INT32_TYPE__ uint32_t
Not visible externally, similar to 'static' linkage in C.
Lossily track known equal exprs with a cache.
HALIDE_ALWAYS_INLINE bool same_as(const IntrusivePtr &other) const
ExprWithCompareCache()=default
HALIDE_ALWAYS_INLINE const Internal::BaseExprNode * get() const
Override get() to return a BaseExprNode * instead of an IRNode *.
bool graph_equal(const Expr &a, const Expr &b)
Compare IR nodes for equality of value.
unsigned __INT64_TYPE__ uint64_t
A wrapper about Exprs so that they can be deeply compared with a cache for known-equal subexpressions...
bool operator()(const Expr &a, const Expr &b) const