Go to the documentation of this file. 1 #ifndef HALIDE_PARAM_MAP_H
2 #define HALIDE_PARAM_MAP_H
36 template<
typename T,
int Dims>
45 template<
typename T,
int Dims>
57 ParamArg(
const ParamMapping &pm)
58 :
mapped_param(pm.parameter->type(), false, 0, pm.parameter->name()) {
64 ParamArg(
const ParamArg &) =
default;
66 mutable std::map<const Internal::Parameter, ParamArg> mapping;
74 "Callers requiring threadsafe JIT calls should migrate to use compile_to_callable() instead.")
75 ParamMap(const std::initializer_list<ParamMapping> &init);
79 "Callers requiring threadsafe JIT calls should migrate to use compile_to_callable() instead.")
85 pa.buf_out_param =
nullptr;
86 mapping[p.parameter()] =
pa;
90 "Callers requiring threadsafe JIT calls should migrate to use compile_to_callable() instead.")
96 return mapping.size();
112 return empty_param_map;
HALIDE_NO_USER_CODE_INLINE void set_scalar(T val)
If the parameter is a scalar parameter, set its current value.
A reference-counted handle to a parameter to a halide pipeline.
An Image parameter to a halide pipeline.
const Internal::Parameter * parameter
ParamMapping(const Param< T > &p, const T &val)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
halide_scalar_value_t value
halide_scalar_value_t is a simple union able to represent all the well-known scalar values in a filte...
const ImageParam * image_param
HALIDE_ATTRIBUTE_DEPRECATED("ParamMap is deprecated in Halide 16 and will be removed in Halide 17. " "Callers requiring threadsafe JIT calls should migrate to use compile_to_callable() instead.") void set(const ImageParam &p
ParamMapping(const ImageParam &p, Buffer< T, Dims > *buf_ptr)
ParamMapping(const ImageParam &p, Buffer<> *buf_ptr)
ParamMapping(const ImageParam &p, Buffer<> &buf)
ParamMapping(const ImageParam &p, Buffer< T, Dims > &buf)
HALIDE_ATTRIBUTE_DEPRECATED("ParamMap is deprecated in Halide 16 and will be removed in Halide 17. " "Callers requiring threadsafe JIT calls should migrate to use compile_to_callable() instead.") ParamMap(const std T val
const Internal::Parameter & map(const Internal::Parameter &p, Buffer<> *&buf_out_param) const
If there is an entry in the ParamMap for this Parameter, return it.
A scalar parameter to a halide pipeline.
static const ParamMap & empty_map()
A const ref to an empty ParamMap.