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
42