Halide
AddImageChecks.h
Go to the documentation of this file.
1 #ifndef HALIDE_INTERNAL_ADD_IMAGE_CHECKS_H
2 #define HALIDE_INTERNAL_ADD_IMAGE_CHECKS_H
3 
4 /** \file
5  *
6  * Defines the lowering pass that adds the assertions that validate
7  * input and output buffers.
8  */
9 #include <map>
10 #include <string>
11 #include <vector>
12 
13 #include "Bounds.h"
14 #include "Expr.h"
15 
16 #include <map>
17 
18 namespace Halide {
19 
20 struct Target;
21 
22 namespace Internal {
23 
24 class Function;
25 
26 /** Insert checks to make sure a statement doesn't read out of bounds
27  * on inputs or outputs, and that the inputs and outputs conform to
28  * the format required (e.g. stride.0 must be 1).
29  */
30 Stmt add_image_checks(const Stmt &s,
31  const std::vector<Function> &outputs,
32  const Target &t,
33  const std::vector<std::string> &order,
34  const std::map<std::string, Function> &env,
35  const FuncValueBounds &fb,
36  bool will_inject_host_copies);
37 
38 } // namespace Internal
39 } // namespace Halide
40 
41 #endif
Bounds.h
Halide::Internal::FuncValueBounds
std::map< std::pair< std::string, int >, Interval > FuncValueBounds
Definition: Bounds.h:15
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AddAtomicMutex.h:21
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Halide::Internal::IOKind::Function
@ Function
Expr.h
Halide::Internal::add_image_checks
Stmt add_image_checks(const Stmt &s, const std::vector< Function > &outputs, const Target &t, const std::vector< std::string > &order, const std::map< std::string, Function > &env, const FuncValueBounds &fb, bool will_inject_host_copies)
Insert checks to make sure a statement doesn't read out of bounds on inputs or outputs,...