Halide
Lower.h
Go to the documentation of this file.
1 #ifndef HALIDE_INTERNAL_LOWER_H
2 #define HALIDE_INTERNAL_LOWER_H
3 
4 /** \file
5  *
6  * Defines the function that generates a statement that computes a
7  * Halide function using its schedule.
8  */
9 
10 #include <string>
11 #include <vector>
12 
13 #include "Argument.h"
14 #include "Expr.h"
15 #include "Module.h"
16 
17 namespace Halide {
18 
19 struct Target;
20 
21 namespace Internal {
22 
23 class Function;
24 class IRMutator;
25 
26 /** Given a vector of scheduled halide functions, create a Module that
27  * evaluates it. Automatically pulls in all the functions f depends
28  * on. Some stages of lowering may be target-specific. The Module may
29  * contain submodules for computation offloaded to another execution
30  * engine or API as well as buffers that are used in the passed in
31  * Stmt. */
32 Module lower(const std::vector<Function> &output_funcs,
33  const std::string &pipeline_name,
34  const Target &t,
35  const std::vector<Argument> &args,
36  LinkageType linkage_type,
37  const std::vector<Stmt> &requirements = std::vector<Stmt>(),
38  bool trace_pipeline = false,
39  const std::vector<IRMutator *> &custom_passes = std::vector<IRMutator *>());
40 
41 /** Given a halide function with a schedule, create a statement that
42  * evaluates it. Automatically pulls in all the functions f depends
43  * on. Some stages of lowering may be target-specific. Mostly used as
44  * a convenience function in tests that wish to assert some property
45  * of the lowered IR. */
46 Stmt lower_main_stmt(const std::vector<Function> &output_funcs,
47  const std::string &pipeline_name,
48  const Target &t,
49  const std::vector<Stmt> &requirements = std::vector<Stmt>(),
50  bool trace_pipeline = false,
51  const std::vector<IRMutator *> &custom_passes = std::vector<IRMutator *>());
52 
53 void lower_test();
54 
55 } // namespace Internal
56 } // namespace Halide
57 
58 #endif
Halide::Internal::lower_main_stmt
Stmt lower_main_stmt(const std::vector< Function > &output_funcs, const std::string &pipeline_name, const Target &t, const std::vector< Stmt > &requirements=std::vector< Stmt >(), bool trace_pipeline=false, const std::vector< IRMutator * > &custom_passes=std::vector< IRMutator * >())
Given a halide function with a schedule, create a statement that evaluates it.
Halide::Internal::ArgInfoKind::Function
@ Function
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Argument.h
Halide::LinkageType
LinkageType
Type of linkage a function in a lowered Halide module can have.
Definition: Module.h:48
Expr.h
Halide::Internal::lower_test
void lower_test()
Module.h
Halide::Internal::lower
Module lower(const std::vector< Function > &output_funcs, const std::string &pipeline_name, const Target &t, const std::vector< Argument > &args, LinkageType linkage_type, const std::vector< Stmt > &requirements=std::vector< Stmt >(), bool trace_pipeline=false, const std::vector< IRMutator * > &custom_passes=std::vector< IRMutator * >())
Given a vector of scheduled halide functions, create a Module that evaluates it.