Halide 22.0.0 Halide compiler and libraries

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
17namespace Halide {
18
19struct Target;
20
21namespace Internal {
22
23class Function;
24class 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
Argument.h
Defines a type used for expressing the type signature of a generated halide pipeline.
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Module.h
Defines Module, an IR container that fully describes a Halide program.
Halide::Module
A halide module.
Definition: Module.h:142
Halide::Internal::ArgInfoKind::Function
@ Function
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.
Halide::Internal::lower_test
void lower_test()
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
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::LinkageType
LinkageType
Type of linkage a function in a lowered Halide module can have.
Definition: Module.h:52
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition: Expr.h:427
Halide::Target
A struct representing a target machine and os to generate code for.
Definition: Target.h:19