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 #include "Target.h"
17 
18 namespace Halide {
19 namespace Internal {
20 
21 class Function;
22 class IRMutator;
23 
24 /** Given a vector of scheduled halide functions, create a Module that
25  * evaluates it. Automatically pulls in all the functions f depends
26  * on. Some stages of lowering may be target-specific. The Module may
27  * contain submodules for computation offloaded to another execution
28  * engine or API as well as buffers that are used in the passed in
29  * Stmt. */
30 Module lower(const std::vector<Function> &output_funcs,
31  const std::string &pipeline_name,
32  const Target &t,
33  const std::vector<Argument> &args,
34  const LinkageType linkage_type,
35  const std::vector<Stmt> &requirements = std::vector<Stmt>(),
36  bool trace_pipeline = false,
37  const std::vector<IRMutator *> &custom_passes = std::vector<IRMutator *>());
38 
39 /** Given a halide function with a schedule, create a statement that
40  * evaluates it. Automatically pulls in all the functions f depends
41  * on. Some stages of lowering may be target-specific. Mostly used as
42  * a convenience function in tests that wish to assert some property
43  * of the lowered IR. */
44 Stmt lower_main_stmt(const std::vector<Function> &output_funcs,
45  const std::string &pipeline_name,
46  const Target &t,
47  const std::vector<Stmt> &requirements = std::vector<Stmt>(),
48  bool trace_pipeline = false,
49  const std::vector<IRMutator *> &custom_passes = std::vector<IRMutator *>());
50 
51 void lower_test();
52 
53 } // namespace Internal
54 } // namespace Halide
55 
56 #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.
Target.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, const 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.
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.
Argument.h
Halide::Internal::IOKind::Function
@ Function
Halide::LinkageType
LinkageType
Type of linkage a function in a lowered Halide module can have.
Definition: Module.h:49
Expr.h
Halide::Internal::lower_test
void lower_test()
Module.h