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