Go to the documentation of this file. 1 #ifndef HALIDE_PARAMETER_H
2 #define HALIDE_PARAMETER_H
17 struct ArgumentEstimates;
24 struct ParameterContents;
29 void check_defined()
const;
30 void check_is_buffer()
const;
31 void check_is_scalar()
const;
32 void check_dim_ok(
int dim)
const;
33 void check_type(
const Type &t)
const;
70 const std::string &
name()
const;
79 check_type(type_of<T>());
91 check_type(type_of<T>());
HALIDE_NO_USER_CODE_INLINE void set_scalar(T val)
If the parameter is a scalar parameter, set its current value.
const halide_buffer_t * raw_buffer() const
Get the raw currently-bound buffer.
void set_max_value(const Expr &e)
void set_default_value(const Expr &e)
Get and set the default values for scalar parameters.
A reference-counted handle to a parameter to a halide pipeline.
void set_extent_constraint_estimate(int dim, Expr extent)
void check_call_arg_types(const std::string &name, std::vector< Expr > *args, int dims)
Validate arguments to a call to a func, image or imageparam.
int bytes() const
The number of bytes required to store a single scalar value of this type.
Expr min(const FuncRef &a, const FuncRef &b)
Explicit overloads of min and max for FuncRef.
void set_min_constraint_estimate(int dim, Expr min)
void set_host_alignment(int bytes)
Expr extent_constraint(int dim) const
Expr stride_constraint(int dim) const
MemoryType memory_type() const
Types in the halide type system.
Expr default_value() const
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Type type() const
Get the type of this parameter.
halide_scalar_value_t is a simple union able to represent all the well-known scalar values in a filte...
@ Internal
Not visible externally, similar to 'static' linkage in C.
void set_stride_constraint(int dim, Expr e)
void set_estimate(Expr e)
void * scalar_address() const
Get the pointer to the current value of the scalar parameter.
void set_min_value(const Expr &e)
Get and set constraints for scalar parameters.
Expr scalar_expr() const
This returns the current value of scalar<type()>() as an Expr.
void set_buffer(const Buffer< void > &b)
If the parameter is a buffer parameter, set its current value.
Expr min_constraint(int dim) const
Parameter & operator=(const Parameter &)=default
void store_in(MemoryType memory_type)
#define HALIDE_NO_USER_CODE_INLINE
HALIDE_NO_USER_CODE_INLINE void set_scalar(const Type &val_type, halide_scalar_value_t val)
If the parameter is a scalar parameter, set its current value.
ArgumentEstimates get_argument_estimates() const
Get the ArgumentEstimates appropriate for this Parameter.
int host_alignment() const
bool operator<(const Parameter &other) const
Order Parameters by their IntrusivePtr so they can be used to index maps.
const std::string & name() const
Get the name of this parameter.
void * memcpy(void *s1, const void *s2, size_t n)
bool same_as(const Parameter &other) const
Tests if this handle is the same as another handle.
Parameter()=default
Construct a new undefined handle.
The raw representation of an image passed around by generated Halide code.
bool defined() const
Tests if this handle is non-nullptr.
Expr min_constraint_estimate(int dim) const
Expr extent_constraint_estimate(int dim) const
IntrusivePtr< ParameterContents > contents
HALIDE_NO_USER_CODE_INLINE T scalar() const
If the parameter is a scalar parameter, get its currently bound value.
A fragment of Halide syntax.
MemoryType
An enum describing different address spaces to be used with Func::store_in.
Buffer< void > buffer() const
If the parameter is a buffer parameter, get its currently bound buffer.
int dimensions() const
Get the dimensionality of this parameter.
void set_min_constraint(int dim, Expr e)
Get and set constraints for the min, extent, stride, and estimates on the min/extent.
void set_extent_constraint(int dim, Expr e)
bool is_buffer() const
Does this parameter refer to a buffer/image?