1 #ifndef HALIDE_SKIP_STAGES
2 #define HALIDE_SKIP_STAGES
3 
4 #include <string>
5 #include <vector>
6 
7 #include "Expr.h"
8 
9 /** \file
10  * Defines a pass that dynamically avoids realizing unnecessary stages.
11  */
12 
13 namespace Halide {
14 namespace Internal {
15 
16 /** Avoid computing certain stages if we can infer a runtime condition
17  * to check that tells us they won't be used. Does this by analyzing
18  * all reads of each buffer allocated, and inferring some condition
19  * that tells us if the reads occur. If the condition is non-trivial,
20  * inject ifs that guard the production. */
21 Stmt skip_stages(Stmt s, const std::vector<std::string> &order);
22 
23 }  // namespace Internal
24 }  // namespace Halide
25 
26 #endif
27