Halide  19.0.0
Halide compiler and libraries
SkipStages.h
Go to the documentation of this file.
1 #ifndef HALIDE_SKIP_STAGES
2 #define HALIDE_SKIP_STAGES
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "Expr.h"
9 
10 /** \file
11  * Defines a pass that dynamically avoids realizing unnecessary stages.
12  */
13 
14 namespace Halide {
15 namespace Internal {
16 
17 class Function;
18 
19 /** Avoid computing certain stages if we can infer a runtime condition
20  * to check that tells us they won't be used. Does this by analyzing
21  * all reads of each buffer allocated, and inferring some condition
22  * that tells us if the reads occur. If the condition is non-trivial,
23  * inject ifs that guard the production. */
25  const std::vector<Function> &outputs,
26  const std::vector<std::vector<std::string>> &order,
27  const std::map<std::string, Function> &env);
28 
29 } // namespace Internal
30 } // namespace Halide
31 
32 #endif
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Stmt skip_stages(const Stmt &s, const std::vector< Function > &outputs, const std::vector< std::vector< std::string >> &order, const std::map< std::string, Function > &env)
Avoid computing certain stages if we can infer a runtime condition to check that tells us they won't ...
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
A reference-counted handle to a statement node.
Definition: Expr.h:427