Halide

A referencecounted handle on a reduction domain, which is just a vector of ReductionVariable. More...
#include <Reduction.h>
Classes  
struct  Compare 
This lets you use a ReductionDomain as a key in a map of the form map<ReductionDomain, Foo, ReductionDomain::Compare> More...  
Public Member Functions  
ReductionDomain ()  
Construct a new nullptr reduction domain. More...  
ReductionDomain (const std::vector< ReductionVariable > &domain)  
Construct a reduction domain that spans the outer product of all values of the given ReductionVariable in scanline order, with the start of the vector being innermost, and the end of the vector being outermost. More...  
ReductionDomain  deep_copy () const 
Return a deep copy of this ReductionDomain. More...  
bool  defined () const 
Is this handle nonnullptr. More...  
bool  same_as (const ReductionDomain &other) const 
Tests for equality of reference. More...  
const std::vector< ReductionVariable > &  domain () const 
Immutable access to the reduction variables. More...  
void  where (Expr predicate) 
Add predicate to the reduction domain. More...  
Expr  predicate () const 
Return the predicate defined on this reducation demain. More...  
void  set_predicate (const Expr &) 
Set the predicate, replacing any previously set predicate. More...  
std::vector< Expr >  split_predicate () const 
Split predicate into vector of ANDs. More...  
void  freeze () 
Mark RDom as frozen, which means it cannot accept new predicates. More...  
bool  frozen () const 
Check if a RDom has been frozen. More...  
void  accept (IRVisitor *) const 
Pass an IRVisitor through to all Exprs referenced in the ReductionDomain. More...  
void  mutate (IRMutator *) 
Pass an IRMutator through to all Exprs referenced in the ReductionDomain. More...  
A referencecounted handle on a reduction domain, which is just a vector of ReductionVariable.
Definition at line 33 of file Reduction.h.

inline 
Construct a new nullptr reduction domain.
Definition at line 47 of file Reduction.h.
Halide::Internal::ReductionDomain::ReductionDomain  (  const std::vector< ReductionVariable > &  domain  ) 
Construct a reduction domain that spans the outer product of all values of the given ReductionVariable in scanline order, with the start of the vector being innermost, and the end of the vector being outermost.
ReductionDomain Halide::Internal::ReductionDomain::deep_copy  (  )  const 
Return a deep copy of this ReductionDomain.

inline 
Is this handle nonnullptr.
Definition at line 61 of file Reduction.h.
References Halide::Internal::IntrusivePtr< T >::defined().
Referenced by Halide::RDom::defined().

inline 
Tests for equality of reference.
Only one reduction domain is allowed per reduction function, and this is used to verify that
Definition at line 68 of file Reduction.h.
References Halide::Internal::IntrusivePtr< T >::same_as().
Referenced by Halide::RDom::same_as().
const std::vector<ReductionVariable>& Halide::Internal::ReductionDomain::domain  (  )  const 
Immutable access to the reduction variables.
void Halide::Internal::ReductionDomain::where  (  Expr  predicate  ) 
Add predicate to the reduction domain.
See RDom::where for more details.
Expr Halide::Internal::ReductionDomain::predicate  (  )  const 
Return the predicate defined on this reducation demain.
void Halide::Internal::ReductionDomain::set_predicate  (  const Expr &  ) 
Set the predicate, replacing any previously set predicate.
std::vector<Expr> Halide::Internal::ReductionDomain::split_predicate  (  )  const 
Split predicate into vector of ANDs.
If there is no predicate (i.e. all iteration domain in this reduction domain is valid), this returns an empty vector.
void Halide::Internal::ReductionDomain::freeze  (  ) 
bool Halide::Internal::ReductionDomain::frozen  (  )  const 
Check if a RDom has been frozen.
If so, it is an error to add new predicates.
void Halide::Internal::ReductionDomain::accept  (  IRVisitor *  )  const 
Pass an IRVisitor through to all Exprs referenced in the ReductionDomain.
void Halide::Internal::ReductionDomain::mutate  (  IRMutator *  ) 
Pass an IRMutator through to all Exprs referenced in the ReductionDomain.