1#ifndef HALIDE_BOUNDARY_CONDITIONS_H
2#define HALIDE_BOUNDARY_CONDITIONS_H
49namespace BoundaryConditions {
55 collected_args.emplace_back(a1, a2);
58template<
typename... Args>
60 const Expr &a1,
const Expr &a2, Args &&...args) {
61 collected_args.emplace_back(a1, a2);
71 return lambda(_, func_like(_));
113 for (
int i = 0; i < func_like.dimensions(); i++) {
114 object_bounds.emplace_back(
Expr(func_like.dim(i).min()),
Expr(func_like.dim(i).extent()));
124template<
typename T,
typename... Bounds,
127 Bounds &&...bounds) {
132template<
typename T,
typename... Bounds,
135 Bounds &&...bounds) {
163 for (
int i = 0; i < func_like.dimensions(); i++) {
164 object_bounds.emplace_back(
Expr(func_like.dim(i).min()),
Expr(func_like.dim(i).extent()));
194 for (
int i = 0; i < func_like.dimensions(); i++) {
195 object_bounds.emplace_back(
Expr(func_like.dim(i).min()),
Expr(func_like.dim(i).extent()));
225 for (
int i = 0; i < func_like.dimensions(); i++) {
226 object_bounds.emplace_back(
Expr(func_like.dim(i).min()),
Expr(func_like.dim(i).extent()));
260 for (
int i = 0; i < func_like.dimensions(); i++) {
261 object_bounds.emplace_back(
Expr(func_like.dim(i).min()),
Expr(func_like.dim(i).extent()));
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Defines Func - the front-end handle on a halide function, and related classes.
Convenience functions for creating small anonymous Halide functions.
#define HALIDE_NO_USER_CODE_INLINE
Create a small array of Exprs for defining and calling functions with multiple outputs.
HALIDE_NO_USER_CODE_INLINE void collect_region(Region &collected_args, const Expr &a1, const Expr &a2)
const Func & func_like_to_func(const Func &func)
Func repeat_edge(const Func &source, const Region &bounds)
Impose a boundary condition such that the nearest edge sample is returned everywhere outside the give...
Func repeat_image(const Func &source, const Region &bounds)
Impose a boundary condition such that the entire coordinate space is tiled with copies of the image a...
Func mirror_interior(const Func &source, const Region &bounds)
Impose a boundary condition such that the entire coordinate space is tiled with copies of the image a...
Func constant_exterior(const Func &source, const Tuple &value, const Region &bounds)
Impose a boundary condition such that a given expression is returned everywhere outside the boundary.
Func mirror_image(const Func &source, const Region &bounds)
Impose a boundary condition such that the entire coordinate space is tiled with copies of the image a...
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
Func lambda(const Expr &e)
Create a zero-dimensional halide function that returns the given expression.
std::vector< Range > Region
A multi-dimensional box.
A fragment of Halide syntax.