Go to the documentation of this file. 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);
bool operator()(const Expr &a, const Expr &b) const
A reference-counted handle to a statement node.
unsigned __INT64_TYPE__ uint64_t
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
A compare struct suitable for use in std::map and std::set that computes a lexical ordering on IR nod...
bool operator<(const ExprWithCompareCache &other) const
The comparison uses (and updates) the cache.
@ Internal
Not visible externally, similar to 'static' linkage in C.
bool graph_less_than(const Expr &a, const Expr &b)
Order unsanitized IRNodes for use in a map key.
bool equal(const RDom &bounds0, const RDom &bounds1)
Return true if bounds0 and bounds1 represent the same bounds.
void insert(const Expr &a, const Expr &b)
bool contains(const Expr &a, const Expr &b) const
Lossily track known equal exprs with a cache.
ExprWithCompareCache()=default
A fragment of Halide syntax.
const HALIDE_ALWAYS_INLINE Internal::BaseExprNode * get() const
Override get() to return a BaseExprNode * instead of an IRNode *.
unsigned __INT32_TYPE__ uint32_t
ExprWithCompareCache(const Expr &e, IRCompareCache *c)
A wrapper about Exprs so that they can be deeply compared with a cache for known-equal subexpressions...
bool graph_equal(const Expr &a, const Expr &b)
HALIDE_ALWAYS_INLINE bool same_as(const IntrusivePtr &other) const