Go to the documentation of this file.
20 template<
typename T,
int Dims>
22 class OutputImageParam;
35 const auto &d = _domain.
domain();
47 explicit RVar(
const std::string &n)
54 : _domain(std::move(
domain)), _index(index) {
70 const std::string &
name()
const;
73 operator Expr()
const;
196 void init_vars(
const std::string &name);
198 void validate_min_extent(
const Expr &
min,
const Expr &extent);
199 void initialize_from_region(
const Region ®ion, std::string name =
"");
201 template<
typename... Args>
203 validate_min_extent(
min, extent);
204 region.emplace_back(
min, extent);
205 initialize_from_region(region, std::forward<Args>(args)...);
216 initialize_from_region(region, std::move(name));
219 template<
typename... Args>
224 initialize_from_region(region,
min, extent, std::forward<Args>(args)...);
234 template<
typename T,
int Dims>
265 operator RVar()
const;
268 operator Expr()
const;
#define internal_assert(c)
std::vector< Range > Region
A multi-dimensional box.
Expr min() const
The minimum value that this variable will take on.
RVar(Internal::ReductionDomain domain, int index)
Construct a reduction variable with the given name and bounds.
Expr min(const FuncRef &a, const FuncRef &b)
Explicit overloads of min and max for FuncRef.
std::string make_entity_name(void *stack_ptr, const std::string &type, char prefix)
Make a unique name for an object based on the name of the stack variable passed in.
Internal::ReductionDomain domain() const
The reduction domain this is associated with.
RDom()=default
Construct an undefined reduction domain.
int dimensions() const
Get the dimensionality of a reduction domain.
const std::vector< ReductionVariable > & domain() const
Immutable access to the reduction variables.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Expr extent() const
The number that this variable will take on.
@ Internal
Not visible externally, similar to 'static' linkage in C.
A Halide::Buffer is a named shared reference to a Halide::Runtime::Buffer.
RVar()
An empty reduction variable.
A single named dimension of a reduction domain.
bool defined() const
Is this handle non-nullptr.
HALIDE_NO_USER_CODE_INLINE RDom(Expr min, Expr extent, Args &&...args)
A handle on the output buffer of a pipeline.
HALIDE_NO_USER_CODE_INLINE RDom(const Buffer< T, Dims > &im)
RVar(const std::string &n)
Construct an RVar with the given name.
HALIDE_NO_USER_CODE_INLINE RDom(const Region ®ion, std::string name="")
Construct a multi-dimensional reduction domain with the given name.
#define HALIDE_NO_USER_CODE_INLINE
bool same_as(const RDom &other) const
Compare two reduction domains for equality of reference.
RVar operator[](int) const
Get at one of the dimensions of the reduction domain.
bool defined() const
Check if this reduction domain is non-null.
std::ostream & operator<<(std::ostream &stream, const Expr &)
Emit an expression on an output stream (such as std::cout) in human-readable form.
RVar x
Direct access to the first four dimensions of the reduction domain.
bool same_as(const ReductionDomain &other) const
Tests for equality of reference.
A reduction variable represents a single dimension of a reduction domain (RDom).
A multi-dimensional domain over which to iterate.
const std::string & name() const
The name of this reduction variable.
Internal::ReductionDomain domain() const
Get at the internal reduction domain object that this wraps.
A fragment of Halide syntax.
void where(Expr predicate)
Add a predicate to the RDom.
A reference-counted handle on a reduction domain, which is just a vector of ReductionVariable.