Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Lambda.h
Go to the documentation of this file.
1#ifndef HALIDE_LAMBDA_H
2#define HALIDE_LAMBDA_H
3
4#include "Func.h"
5#include "Var.h"
6
7/** \file
8 * Convenience functions for creating small anonymous Halide
9 * functions. See test/lambda.cpp for example usage. */
10
11 namespace Halide {
12
13/** Create a zero-dimensional halide function that returns the given
14 * expression. The function may have more dimensions if the expression
15 * contains implicit arguments. */
16 Func lambda(const Expr &e);
17
18/** Create a 1-D halide function in the first argument that returns
19 * the second argument. The function may have more dimensions if the
20 * expression contains implicit arguments and the list of Var
21 * arguments contains a placeholder ("_"). */
22 Func lambda(const Var &x, const Expr &e);
23
24/** Create a 2-D halide function in the first two arguments that
25 * returns the last argument. The function may have more dimensions if
26 * the expression contains implicit arguments and the list of Var
27 * arguments contains a placeholder ("_"). */
28 Func lambda(const Var &x, const Var &y, const Expr &e);
29
30/** Create a 3-D halide function in the first three arguments that
31 * returns the last argument. The function may have more dimensions
32 * if the expression contains implicit arguments and the list of Var
33 * arguments contains a placeholder ("_"). */
34 Func lambda(const Var &x, const Var &y, const Var &z, const Expr &e);
35
36/** Create a 4-D halide function in the first four arguments that
37 * returns the last argument. The function may have more dimensions if
38 * the expression contains implicit arguments and the list of Var
39 * arguments contains a placeholder ("_"). */
40 Func lambda(const Var &x, const Var &y, const Var &z, const Var &w, const Expr &e);
41
42/** Create a 5-D halide function in the first five arguments that
43 * returns the last argument. The function may have more dimensions if
44 * the expression contains implicit arguments and the list of Var
45 * arguments contains a placeholder ("_"). */
46 Func lambda(const Var &x, const Var &y, const Var &z, const Var &w, const Var &v, const Expr &e);
47
48} // namespace Halide
49
50#endif // HALIDE_LAMBDA_H
Func.h
Defines Func - the front-end handle on a halide function, and related classes.
Var.h
Defines the Var - the front-end variable.
Halide::Func
A halide function.
Definition Func.h:706
Halide::Var
A Halide variable, to be used when defining functions.
Definition Var.h:19
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::lambda
Func lambda(const Expr &e)
Create a zero-dimensional halide function that returns the given expression.
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258