Halide 22.0.0 Halide compiler and libraries

PurifyIndexMath.h
Go to the documentation of this file.
1#ifndef HALIDE_PURIFY_INDEX_MATH_H
2#define HALIDE_PURIFY_INDEX_MATH_H
3
4/** \file
5 * Removes side-effects in integer math.
6 */
7
8#include "Expr.h"
9
10namespace Halide {
11namespace Internal {
12
13/** Bounds inference and related stages can lift integer bounds
14 * expressions out of if statements that guard against those integer
15 * expressions doing side-effecty things like dividing or modding by
16 * zero. In those cases, if the lowering passes are functional, the
17 * value resulting from the division or mod is evaluated but not
18 * used. This mutator rewrites divs and mods in such expressions to
19 * fail silently (evaluate to undef) when the denominator is zero.
20 */
21 Expr purify_index_math(const Expr &);
22
23} // namespace Internal
24} // namespace Halide
25
26#endif
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Halide::Internal::purify_index_math
Expr purify_index_math(const Expr &)
Bounds inference and related stages can lift integer bounds expressions out of if statements that gua...
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Halide::Expr
A fragment of Halide syntax.
Definition: Expr.h:258