1 #ifndef HALIDE_REDUCTION_H 2 #define HALIDE_REDUCTION_H 29 struct ReductionDomainContents;
42 return a.contents < b.contents;
72 return contents.
same_as(other.contents);
76 const std::vector<ReductionVariable> &
domain()
const;
void split_predicate_test()
A base class for algorithms that need to recursively walk over the IR.
A fragment of Halide syntax.
A single named dimension of a reduction domain.
ReductionDomain()
Construct a new nullptr reduction domain.
#define internal_assert(c)
void freeze()
Mark RDom as frozen, which means it cannot accept new predicates.
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.
void mutate(IRMutator *)
Pass an IRMutator through to all Exprs referenced in the ReductionDomain.
void set_predicate(const Expr &)
Set the predicate, replacing any previously set predicate.
void accept(IRVisitor *) const
Pass an IRVisitor through to all Exprs referenced in the ReductionDomain.
const std::vector< ReductionVariable > & domain() const
Immutable access to the reduction variables.
void where(Expr predicate)
Add predicate to the reduction domain.
This lets you use a ReductionVariable as a key in a map of the form map<ReductionVariable, Foo, ReductionVariable::Compare>
bool defined() const
Is this handle non-nullptr.
Expr predicate() const
Return the predicate defined on this reducation demain.
This lets you use a ReductionDomain as a key in a map of the form map<ReductionDomain, Foo, ReductionDomain::Compare>
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt) ...
bool operator()(const ReductionVariable &a, const ReductionVariable &b) const
Not visible externally, similar to 'static' linkage in C.
ReductionDomain deep_copy() const
Return a deep copy of this ReductionDomain.
bool frozen() const
Check if a RDom has been frozen.
bool same_as(const ReductionDomain &other) const
Tests for equality of reference.
bool operator()(const ReductionDomain &a, const ReductionDomain &b) const
HALIDE_ALWAYS_INLINE bool same_as(const IntrusivePtr &other) const
A reference-counted handle on a reduction domain, which is just a vector of ReductionVariable.
HALIDE_ALWAYS_INLINE bool defined() const
std::vector< Expr > split_predicate() const
Split predicate into vector of ANDs.
A base class for passes over the IR which modify it (e.g.