Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Function.h
Go to the documentation of this file.
1#ifndef HALIDE_FUNCTION_H
2#define HALIDE_FUNCTION_H
3
4/** \file
5 * Defines the internal representation of a halide function and related classes
6 */
7#include <map>
8#include <string>
9#include <utility>
10#include <vector>
11
12#include "Definition.h"
13#include "Expr.h"
14#include "FunctionPtr.h"
15#include "Reduction.h"
16#include "Schedule.h"
17
18 namespace Halide {
19
20 struct ExternFuncArgument;
21 class Parameter;
22 class Tuple;
23 class Var;
24
25/** An enum to specify calling convention for extern stages. */
26 enum class NameMangling {
27 Default, ///< Match whatever is specified in the Target
28 C, ///< No name mangling
29 CPlusPlus, ///< C++ name mangling
30};
31
32 namespace Internal {
33
34 struct Call;
35
36/** A reference-counted handle to Halide's internal representation of
37 * a function. Similar to a front-end Func object, but with no
38 * syntactic sugar to help with definitions. */
39 class Function {
40 FunctionPtr contents;
41
42 public:
43 /** This lets you use a Function as a key in a map of the form
44 * map<Function, Foo, Function::Compare> */
45 struct Compare {
46 bool operator()(const Function &a, const Function &b) const {
47 internal_assert(a.contents.defined() && b.contents.defined());
48 return a.contents < b.contents;
49 }
50 };
51
52 /** Construct a new function with no definitions and no name. This
53 * constructor only exists so that you can make vectors of
54 * functions, etc.
55 */
56 Function() = default;
57
58 /** Construct a new function with the given name */
59 explicit Function(const std::string &n);
60
61 /** Construct a new function with the given name,
62 * with a requirement that it can only represent Expr(s) of the given type(s),
63 * and must have exactly the give nnumber of dimensions.
64 * required_types.empty() means there are no constraints on the type(s).
65 * required_dims == AnyDims means there are no constraints on the dimensions. */
66 explicit Function(const std::vector<Type> &required_types, int required_dims, const std::string &n);
67
68 /** Construct a Function from an existing FunctionContents pointer. Must be non-null */
69 explicit Function(const FunctionPtr &);
70
71 /** Update a function with deserialized data */
72 void update_with_deserialization(const std::string &name,
73 const std::string &origin_name,
74 const std::vector<Halide::Type> &output_types,
75 const std::vector<Halide::Type> &required_types,
76 int required_dims,
77 const std::vector<std::string> &args,
78 const FuncSchedule &func_schedule,
79 const Definition &init_def,
80 const std::vector<Definition> &updates,
81 const std::string &debug_file,
82 const std::vector<Parameter> &output_buffers,
83 const std::vector<ExternFuncArgument> &extern_arguments,
84 const std::string &extern_function_name,
85 NameMangling name_mangling,
86 DeviceAPI device_api,
87 const Expr &extern_proxy_expr,
88 bool trace_loads,
89 bool trace_stores,
90 bool trace_realizations,
91 const std::vector<std::string> &trace_tags,
92 bool no_profiling,
93 bool frozen);
94
95 /** Get a handle on the halide function contents that this Function
96 * represents. */
97 FunctionPtr get_contents() const {
98 return contents;
99 }
100
101 /** Deep copy this Function into 'copy'. It recursively deep copies all called
102 * functions, schedules, update definitions, extern func arguments, specializations,
103 * and reduction domains. This method does not deep-copy the Parameter objects.
104 * This method also takes a map of <old Function, deep-copied version> as input
105 * and would use the deep-copied Function from the map if exists instead of
106 * creating a new deep-copy to avoid creating deep-copies of the same Function
107 * multiple times. If 'name' is specified, copy's name will be set to that.
108 */
109 // @{
110 void deep_copy(const FunctionPtr &copy, std::map<FunctionPtr, FunctionPtr> &copied_map) const;
111 void deep_copy(std::string name, const FunctionPtr &copy,
112 std::map<FunctionPtr, FunctionPtr> &copied_map) const;
113 // @}
114
115 /** Add a pure definition to this function. It may not already
116 * have a definition. All the free variables in 'value' must
117 * appear in the args list. 'value' must not depend on any
118 * reduction domain */
119 void define(const std::vector<std::string> &args, std::vector<Expr> values);
120
121 /** Add an update definition to this function. It must already have a pure
122 * definition but not an update definition, and the length of args must
123 * match the length of args used in the pure definition. 'value' may depend
124 * on some reduction domain may contain variables from that domain as well
125 * as pure variables. A reduction domain may also be introduced by passing
126 * it as the last argument. Any pure variables must also appear as Variables
127 * in the args array, and they must have the same name as the pure
128 * definition's argument in the same index. */
129 void define_update(const std::vector<Expr> &args, std::vector<Expr> values, const ReductionDomain &rdom = ReductionDomain{});
130
131 /** Accept a visitor to visit all of the definitions and arguments
132 * of this function. */
133 void accept(IRVisitor *visitor) const;
134
135 /** Accept a mutator to mutator all of the definitions and
136 * arguments of this function. */
137 void mutate(IRMutator *mutator);
138
139 /** Get the name of the function. */
140 const std::string &name() const;
141
142 /** If this is a wrapper of another func, created by a chain of in
143 * or clone_in calls, returns the name of the original
144 * Func. Otherwise returns the name. */
145 const std::string &origin_name() const;
146
147 /** Get a mutable handle to the init definition. */
148 Definition &definition();
149
150 /** Get the init definition. */
151 const Definition &definition() const;
152
153 /** Get the pure arguments. */
154 const std::vector<std::string> &args() const;
155
156 /** Get the dimensionality. */
157 int dimensions() const;
158
159 /** Get the number of outputs. */
160 int outputs() const;
161
162 /** Get the types of the outputs. */
163 const std::vector<Type> &output_types() const;
164
165 /** Get the type constaints on the outputs (if any). */
166 const std::vector<Type> &required_types() const;
167
168 /** Get the dimensionality constaints on the outputs (if any). */
169 int required_dimensions() const;
170
171 /** Get the right-hand-side of the pure definition. Returns an
172 * empty vector if there is no pure definition.
173 *
174 * Warning: Any Vars in the Exprs are not qualified with the Func name, so
175 * the Exprs may contain names which collide with names provided by
176 * unique_name.
177 */
178 const std::vector<Expr> &values() const;
179
180 /** Does this function have a pure definition? */
181 bool has_pure_definition() const;
182
183 /** Does this function *only* have a pure definition? */
184 bool is_pure() const {
185 return (has_pure_definition() &&
186 !has_update_definition() &&
187 !has_extern_definition());
188 }
189
190 /** Is it legal to inline this function? */
191 bool can_be_inlined() const;
192
193 /** Get a handle to the function-specific schedule for the purpose
194 * of modifying it. */
195 FuncSchedule &schedule();
196
197 /** Get a const handle to the function-specific schedule for inspecting it. */
198 const FuncSchedule &schedule() const;
199
200 /** Get a handle on the output buffer used for setting constraints
201 * on it. */
202 const std::vector<Parameter> &output_buffers() const;
203
204 /** Get a mutable handle to the stage-specfic schedule for the update
205 * stage. */
206 StageSchedule &update_schedule(int idx = 0);
207
208 /** Get a mutable handle to this function's update definition at
209 * index 'idx'. */
210 Definition &update(int idx = 0);
211
212 /** Get a const reference to this function's update definition at
213 * index 'idx'. */
214 const Definition &update(int idx = 0) const;
215
216 /** Get a const reference to this function's update definitions. */
217 const std::vector<Definition> &updates() const;
218
219 /** Does this function have an update definition? */
220 bool has_update_definition() const;
221
222 /** Check if the function has an extern definition. */
223 bool has_extern_definition() const;
224
225 /** Get the name mangling specified for the extern definition. */
226 NameMangling extern_definition_name_mangling() const;
227
228 /** Make a call node to the extern definition. An error if the
229 * function has no extern definition. */
230 Expr make_call_to_extern_definition(const std::vector<Expr> &args,
231 const Target &t) const;
232
233 /** Get the proxy Expr for the extern stage. This is an expression
234 * known to have the same data access pattern as the extern
235 * stage. It must touch at least all of the memory that the extern
236 * stage does, though it is permissible for it to be conservative
237 * and touch a superset. For most Functions, including those with
238 * extern definitions, this will be an undefined Expr. */
239 // @{
240 Expr extern_definition_proxy_expr() const;
241 Expr &extern_definition_proxy_expr();
242 // @}
243
244 /** Add an external definition of this Func. */
245 void define_extern(const std::string &function_name,
246 const std::vector<ExternFuncArgument> &args,
247 const std::vector<Type> &types,
248 const std::vector<Var> &dims,
249 NameMangling mangling, DeviceAPI device_api);
250
251 /** Retrive the arguments of the extern definition. */
252 // @{
253 const std::vector<ExternFuncArgument> &extern_arguments() const;
254 std::vector<ExternFuncArgument> &extern_arguments();
255 // @}
256
257 /** Get the name of the extern function called for an extern
258 * definition. */
259 const std::string &extern_function_name() const;
260
261 /** Get the DeviceAPI declared for an extern function. */
262 DeviceAPI extern_function_device_api() const;
263
264 /** Test for equality of identity. */
265 bool same_as(const Function &other) const {
266 return contents.same_as(other.contents);
267 }
268
269 /** Get a const handle to the debug filename. */
270 const std::string &debug_file() const;
271
272 /** Get a handle to the debug filename. */
273 std::string &debug_file();
274
275 /** Use an an extern argument to another function. */
276 operator ExternFuncArgument() const;
277
278 /** Tracing calls and accessors, passed down from the Func
279 * equivalents. */
280 // @{
281 void trace_loads();
282 void trace_stores();
283 void trace_realizations();
284 void add_trace_tag(const std::string &trace_tag);
285 bool is_tracing_loads() const;
286 bool is_tracing_stores() const;
287 bool is_tracing_realizations() const;
288 const std::vector<std::string> &get_trace_tags() const;
289 // @}
290
291 /** Replace this Function's LoopLevels with locked copies that
292 * cannot be mutated further. */
293 void lock_loop_levels();
294
295 /** Mark the function as too small for meaningful profiling. */
296 void do_not_profile();
297
298 /** Check if the function is marked as one that should not be profiled. */
299 bool should_not_profile() const;
300
301 /** Mark function as frozen, which means it cannot accept new
302 * definitions. */
303 void freeze();
304
305 /** Check if a function has been frozen. If so, it is an error to
306 * add new definitions. */
307 bool frozen() const;
308
309 /** Make a new Function with the same lifetime as this one, and
310 * return a strong reference to it. Useful to create Functions which
311 * have circular references to this one - e.g. the wrappers
312 * produced by Func::in. */
313 Function new_function_in_same_group(const std::string &);
314
315 /** Mark calls of this function by 'f' to be replaced with its wrapper
316 * during the lowering stage. If the string 'f' is empty, it means replace
317 * all calls to this function by all other functions (excluding itself) in
318 * the pipeline with the wrapper. This will also freeze 'wrapper' to prevent
319 * user from updating the values of the Function it wraps via the wrapper.
320 * See \ref Func::in for more details. */
321 // @{
322 void add_wrapper(const std::string &f, Function &wrapper);
323 const std::map<std::string, FunctionPtr> &wrappers() const;
324 // @}
325
326 /** Check if a Function is a trivial wrapper around another
327 * Function, Buffer, or Parameter. Returns the Call node if it
328 * is. Otherwise returns null.
329 */
330 const Call *is_wrapper() const;
331
332 /** Replace every call to Functions in 'substitutions' keys by all Exprs
333 * referenced in this Function to call to their substitute Functions (i.e.
334 * the corresponding values in 'substitutions' map). */
335 // @{
336 Function &substitute_calls(const std::map<FunctionPtr, FunctionPtr> &substitutions);
337 Function &substitute_calls(const Function &orig, const Function &substitute);
338 // @}
339
340 /** Return true iff the name matches one of the Function's pure args. */
341 bool is_pure_arg(const std::string &name) const;
342
343 /** If the Function has type requirements, check that the given argument
344 * is compatible with them. If not, assert-fail. (If there are no type requirements, do nothing.) */
345 void check_types(const Expr &e) const;
346 void check_types(const Tuple &t) const;
347 void check_types(const Type &t) const;
348 void check_types(const std::vector<Expr> &exprs) const;
349 void check_types(const std::vector<Type> &types) const;
350
351 /** If the Function has dimension requirements, check that the given argument
352 * is compatible with them. If not, assert-fail. (If there are no dimension requirements, do nothing.) */
353 void check_dims(int dims) const;
354
355 /** Define the output buffers. If the Function has types specified, this can be called at
356 * any time. If not, it can only be called for a Function with a pure definition. */
357 void create_output_buffers(const std::vector<Type> &types, int dims) const;
358};
359
360/** Deep copy an entire Function DAG. */
361std::pair<std::vector<Function>, std::map<std::string, Function>> deep_copy(
362 const std::vector<Function> &outputs,
363 const std::map<std::string, Function> &env);
364
365 extern std::atomic<int> random_variable_counter;
366
367} // namespace Internal
368} // namespace Halide
369
370#endif
Definition.h
Defines the internal representation of a halide function's definition and related classes.
internal_assert
#define internal_assert(c)
Definition Error.h:232
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
FunctionPtr.h
Reduction.h
Defines internal classes related to Reduction Domains.
Schedule.h
Defines the internal representation of the schedule for a function.
Halide::Internal::Definition
A Function definition which can either represent a init or an update definition.
Definition Definition.h:38
Halide::Internal::FuncSchedule
A schedule for a Function of a Halide pipeline.
Definition Schedule.h:572
Halide::Internal::Function
A reference-counted handle to Halide's internal representation of a function.
Definition Function.h:39
Halide::Internal::Function::extern_arguments
const std::vector< ExternFuncArgument > & extern_arguments() const
Retrive the arguments of the extern definition.
Halide::Internal::Function::extern_function_name
const std::string & extern_function_name() const
Get the name of the extern function called for an extern definition.
Halide::Internal::Function::get_contents
FunctionPtr get_contents() const
Get a handle on the halide function contents that this Function represents.
Definition Function.h:97
Halide::Internal::Function::define
void define(const std::vector< std::string > &args, std::vector< Expr > values)
Add a pure definition to this function.
Halide::Internal::Function::should_not_profile
bool should_not_profile() const
Check if the function is marked as one that should not be profiled.
Halide::Internal::Function::deep_copy
void deep_copy(const FunctionPtr &copy, std::map< FunctionPtr, FunctionPtr > &copied_map) const
Deep copy this Function into 'copy'.
Halide::Internal::Function::frozen
bool frozen() const
Check if a function has been frozen.
Halide::Internal::Function::extern_function_device_api
DeviceAPI extern_function_device_api() const
Get the DeviceAPI declared for an extern function.
Halide::Internal::Function::Function
Function(const std::string &n)
Construct a new function with the given name.
Halide::Internal::Function::dimensions
int dimensions() const
Get the dimensionality.
Halide::Internal::Function::check_types
void check_types(const Type &t) const
Halide::Internal::Function::is_tracing_realizations
bool is_tracing_realizations() const
Halide::Internal::Function::has_extern_definition
bool has_extern_definition() const
Check if the function has an extern definition.
Halide::Internal::Function::outputs
int outputs() const
Get the number of outputs.
Halide::Internal::Function::required_dimensions
int required_dimensions() const
Get the dimensionality constaints on the outputs (if any).
Halide::Internal::Function::substitute_calls
Function & substitute_calls(const std::map< FunctionPtr, FunctionPtr > &substitutions)
Replace every call to Functions in 'substitutions' keys by all Exprs referenced in this Function to c...
Halide::Internal::Function::wrappers
const std::map< std::string, FunctionPtr > & wrappers() const
Halide::Internal::Function::update
const Definition & update(int idx=0) const
Get a const reference to this function's update definition at index 'idx'.
Halide::Internal::Function::is_tracing_loads
bool is_tracing_loads() const
Halide::Internal::Function::define_update
void define_update(const std::vector< Expr > &args, std::vector< Expr > values, const ReductionDomain &rdom=ReductionDomain{})
Add an update definition to this function.
Halide::Internal::Function::required_types
const std::vector< Type > & required_types() const
Get the type constaints on the outputs (if any).
Halide::Internal::Function::lock_loop_levels
void lock_loop_levels()
Replace this Function's LoopLevels with locked copies that cannot be mutated further.
Halide::Internal::Function::can_be_inlined
bool can_be_inlined() const
Is it legal to inline this function?
Halide::Internal::Function::update_schedule
StageSchedule & update_schedule(int idx=0)
Get a mutable handle to the stage-specfic schedule for the update stage.
Halide::Internal::Function::is_tracing_stores
bool is_tracing_stores() const
Halide::Internal::Function::debug_file
std::string & debug_file()
Get a handle to the debug filename.
Halide::Internal::Function::is_wrapper
const Call * is_wrapper() const
Check if a Function is a trivial wrapper around another Function, Buffer, or Parameter.
Halide::Internal::Function::has_pure_definition
bool has_pure_definition() const
Does this function have a pure definition?
Halide::Internal::Function::schedule
FuncSchedule & schedule()
Get a handle to the function-specific schedule for the purpose of modifying it.
Halide::Internal::Function::output_buffers
const std::vector< Parameter > & output_buffers() const
Get a handle on the output buffer used for setting constraints on it.
Halide::Internal::Function::definition
const Definition & definition() const
Get the init definition.
Halide::Internal::Function::check_dims
void check_dims(int dims) const
If the Function has dimension requirements, check that the given argument is compatible with them.
Halide::Internal::Function::Function
Function()=default
Construct a new function with no definitions and no name.
Halide::Internal::Function::is_pure
bool is_pure() const
Does this function only have a pure definition?
Definition Function.h:184
Halide::Internal::Function::has_update_definition
bool has_update_definition() const
Does this function have an update definition?
Halide::Internal::Function::trace_loads
void trace_loads()
Tracing calls and accessors, passed down from the Func equivalents.
Halide::Internal::Function::extern_arguments
std::vector< ExternFuncArgument > & extern_arguments()
Halide::Internal::Function::schedule
const FuncSchedule & schedule() const
Get a const handle to the function-specific schedule for inspecting it.
Halide::Internal::Function::update_with_deserialization
void update_with_deserialization(const std::string &name, const std::string &origin_name, const std::vector< Halide::Type > &output_types, const std::vector< Halide::Type > &required_types, int required_dims, const std::vector< std::string > &args, const FuncSchedule &func_schedule, const Definition &init_def, const std::vector< Definition > &updates, const std::string &debug_file, const std::vector< Parameter > &output_buffers, const std::vector< ExternFuncArgument > &extern_arguments, const std::string &extern_function_name, NameMangling name_mangling, DeviceAPI device_api, const Expr &extern_proxy_expr, bool trace_loads, bool trace_stores, bool trace_realizations, const std::vector< std::string > &trace_tags, bool no_profiling, bool frozen)
Update a function with deserialized data.
Halide::Internal::Function::new_function_in_same_group
Function new_function_in_same_group(const std::string &)
Make a new Function with the same lifetime as this one, and return a strong reference to it.
Halide::Internal::Function::updates
const std::vector< Definition > & updates() const
Get a const reference to this function's update definitions.
Halide::Internal::Function::definition
Definition & definition()
Get a mutable handle to the init definition.
Halide::Internal::Function::check_types
void check_types(const std::vector< Expr > &exprs) const
Halide::Internal::Function::create_output_buffers
void create_output_buffers(const std::vector< Type > &types, int dims) const
Define the output buffers.
Halide::Internal::Function::args
const std::vector< std::string > & args() const
Get the pure arguments.
Halide::Internal::Function::mutate
void mutate(IRMutator *mutator)
Accept a mutator to mutator all of the definitions and arguments of this function.
Halide::Internal::Function::define_extern
void define_extern(const std::string &function_name, const std::vector< ExternFuncArgument > &args, const std::vector< Type > &types, const std::vector< Var > &dims, NameMangling mangling, DeviceAPI device_api)
Add an external definition of this Func.
Halide::Internal::Function::trace_realizations
void trace_realizations()
Halide::Internal::Function::check_types
void check_types(const Expr &e) const
If the Function has type requirements, check that the given argument is compatible with them.
Halide::Internal::Function::deep_copy
void deep_copy(std::string name, const FunctionPtr &copy, std::map< FunctionPtr, FunctionPtr > &copied_map) const
Halide::Internal::Function::update
Definition & update(int idx=0)
Get a mutable handle to this function's update definition at index 'idx'.
Halide::Internal::Function::extern_definition_name_mangling
NameMangling extern_definition_name_mangling() const
Get the name mangling specified for the extern definition.
Halide::Internal::Function::extern_definition_proxy_expr
Expr & extern_definition_proxy_expr()
Halide::Internal::Function::accept
void accept(IRVisitor *visitor) const
Accept a visitor to visit all of the definitions and arguments of this function.
Halide::Internal::Function::same_as
bool same_as(const Function &other) const
Test for equality of identity.
Definition Function.h:265
Halide::Internal::Function::output_types
const std::vector< Type > & output_types() const
Get the types of the outputs.
Halide::Internal::Function::is_pure_arg
bool is_pure_arg(const std::string &name) const
Return true iff the name matches one of the Function's pure args.
Halide::Internal::Function::get_trace_tags
const std::vector< std::string > & get_trace_tags() const
Halide::Internal::Function::check_types
void check_types(const Tuple &t) const
Halide::Internal::Function::trace_stores
void trace_stores()
Halide::Internal::Function::freeze
void freeze()
Mark function as frozen, which means it cannot accept new definitions.
Halide::Internal::Function::values
const std::vector< Expr > & values() const
Get the right-hand-side of the pure definition.
Halide::Internal::Function::substitute_calls
Function & substitute_calls(const Function &orig, const Function &substitute)
Halide::Internal::Function::debug_file
const std::string & debug_file() const
Get a const handle to the debug filename.
Halide::Internal::Function::do_not_profile
void do_not_profile()
Mark the function as too small for meaningful profiling.
Halide::Internal::Function::add_wrapper
void add_wrapper(const std::string &f, Function &wrapper)
Mark calls of this function by 'f' to be replaced with its wrapper during the lowering stage.
Halide::Internal::Function::check_types
void check_types(const std::vector< Type > &types) const
Halide::Internal::Function::make_call_to_extern_definition
Expr make_call_to_extern_definition(const std::vector< Expr > &args, const Target &t) const
Make a call node to the extern definition.
Halide::Internal::Function::Function
Function(const FunctionPtr &)
Construct a Function from an existing FunctionContents pointer.
Halide::Internal::Function::origin_name
const std::string & origin_name() const
If this is a wrapper of another func, created by a chain of in or clone_in calls, returns the name of...
Halide::Internal::Function::name
const std::string & name() const
Get the name of the function.
Halide::Internal::Function::add_trace_tag
void add_trace_tag(const std::string &trace_tag)
Halide::Internal::Function::extern_definition_proxy_expr
Expr extern_definition_proxy_expr() const
Get the proxy Expr for the extern stage.
Halide::Internal::Function::Function
Function(const std::vector< Type > &required_types, int required_dims, const std::string &n)
Construct a new function with the given name, with a requirement that it can only represent Expr(s) o...
Halide::Internal::IRMutator
A base class for passes over the IR which modify it (e.g.
Definition IRMutator.h:28
Halide::Internal::IRVisitor
A base class for algorithms that need to recursively walk over the IR.
Definition IRVisitor.h:19
Halide::Internal::ReductionDomain
A reference-counted handle on a reduction domain, which is just a vector of ReductionVariable.
Definition Reduction.h:38
Halide::Internal::StageSchedule
A schedule for a single stage of a Halide pipeline.
Definition Schedule.h:680
Halide::Tuple
Create a small array of Exprs for defining and calling functions with multiple outputs.
Definition Tuple.h:18
Halide::Internal::deep_copy
std::pair< std::vector< Function >, std::map< std::string, Function > > deep_copy(const std::vector< Function > &outputs, const std::map< std::string, Function > &env)
Deep copy an entire Function DAG.
Halide::Internal::substitute
Expr substitute(const std::string &name, const Expr &replacement, const Expr &expr)
Substitute variables with the given name with the replacement expression within expr.
Halide::Internal::random_variable_counter
std::atomic< int > random_variable_counter
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::NameMangling
NameMangling
An enum to specify calling convention for extern stages.
Definition Function.h:26
Halide::NameMangling::C
@ C
No name mangling.
Halide::NameMangling::CPlusPlus
@ CPlusPlus
C++ name mangling.
Halide::NameMangling::Default
@ Default
Match whatever is specified in the Target.
Halide::DeviceAPI
DeviceAPI
An enum describing a type of device API.
Definition DeviceAPI.h:15
Halide::cast
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258
Halide::ExternFuncArgument
An argument to an extern-defined Func.
Definition ExternFuncArgument.h:17
Halide::Internal::Call
A function call.
Definition IR.h:500
Halide::Internal::Function::Compare
This lets you use a Function as a key in a map of the form map<Function, Foo, Function::Compare>
Definition Function.h:45
Halide::Internal::Function::Compare::operator()
bool operator()(const Function &a, const Function &b) const
Definition Function.h:46
Halide::Internal::FunctionPtr
A possibly-weak pointer to a Halide function.
Definition FunctionPtr.h:27
Halide::Internal::FunctionPtr::defined
bool defined() const
Check if the reference is defined.
Definition FunctionPtr.h:74
Halide::Internal::FunctionPtr::same_as
bool same_as(const FunctionPtr &other) const
Check if two FunctionPtrs refer to the same Function.
Definition FunctionPtr.h:79
Halide::Target
A struct representing a target machine and os to generate code for.
Definition Target.h:19
Halide::Type
Types in the halide type system.
Definition Type.h:281