Halide
ClampUnsafeAccesses.h
Go to the documentation of this file.
1
#ifndef HALIDE_CLAMPUNSAFEACCESSES_H
2
#define HALIDE_CLAMPUNSAFEACCESSES_H
3
4
/** \file
5
* Defines the clamp_unsafe_accesses lowering pass.
6
*/
7
8
#include "
Bounds.h
"
9
#include "
Expr.h
"
10
#include "
Function.h
"
11
12
namespace
Halide::Internal
{
13
14
/** Inject clamps around func calls h(...) when all the following conditions hold:
15
* 1. The call is in an indexing context, such as: f(x) = g(h(x));
16
* 2. The FuncValueBounds of h are smaller than those of its type
17
* 3. The allocation bounds of h might be wider than its compute bounds.
18
*/
19
Stmt
clamp_unsafe_accesses
(
const
Stmt &s,
const
std::map<std::string, Function> &env,
FuncValueBounds
&func_bounds);
20
21
}
// namespace Halide::Internal
22
23
#endif // HALIDE_CLAMPUNSAFEACCESSES_H
Bounds.h
Halide::Internal::clamp_unsafe_accesses
Stmt clamp_unsafe_accesses(const Stmt &s, const std::map< std::string, Function > &env, FuncValueBounds &func_bounds)
Inject clamps around func calls h(...) when all the following conditions hold:
Halide::Internal::FuncValueBounds
std::map< std::pair< std::string, int >, Interval > FuncValueBounds
Definition:
Bounds.h:15
Expr.h
Halide::Internal
Definition:
AbstractGenerator.h:24
Function.h
src
ClampUnsafeAccesses.h
Generated by
1.8.17