Halide
Simplify_Internal.h
Go to the documentation of this file.
1 #ifndef HALIDE_SIMPLIFY_VISITORS_H
2 #define HALIDE_SIMPLIFY_VISITORS_H
3 
4 /** \file
5  * The simplifier is separated into multiple compilation units with
6  * this single shared header to speed up the build. This file is not
7  * exported in Halide.h. */
8 
9 #include "Bounds.h"
10 #include "IRMatch.h"
11 #include "IRVisitor.h"
12 #include "Scope.h"
13 
14 // Because this file is only included by the simplify methods and
15 // doesn't go into Halide.h, we're free to use any old names for our
16 // macros.
17 
18 #define LOG_EXPR_MUTATIONS 0
19 #define LOG_STMT_MUTATIONS 0
20 
21 // On old compilers, some visitors would use large stack frames,
22 // because they use expression templates that generate large numbers
23 // of temporary objects when they are built and matched against. If we
24 // wrap the expressions that imply lots of temporaries in a lambda, we
25 // can get these large frames out of the recursive path.
26 #define EVAL_IN_LAMBDA(x) (([&]() HALIDE_NEVER_INLINE { return (x); })())
27 
28 namespace Halide {
29 namespace Internal {
30 
32  int64_t result;
33  if (mul_with_overflow(64, a, b, &result)) {
34  return result;
35  } else if ((a > 0) == (b > 0)) {
36  return INT64_MAX;
37  } else {
38  return INT64_MIN;
39  }
40 }
41 
42 class Simplify : public VariadicVisitor<Simplify, Expr, Stmt> {
44 
45 public:
46  Simplify(bool r, const Scope<Interval> *bi, const Scope<ModulusRemainder> *ai);
47 
48  struct ExprInfo {
49  // We track constant integer bounds when they exist
50  // TODO: Use ConstantInterval?
51  int64_t min = 0, max = 0;
52  bool min_defined = false, max_defined = false;
53  // And the alignment of integer variables
55 
57  if (alignment.modulus == 0) {
58  min_defined = max_defined = true;
60  } else if (alignment.modulus > 1) {
61  if (min_defined) {
63  if (new_min < min) {
64  new_min += alignment.modulus;
65  }
66  min = new_min;
67  }
68  if (max_defined) {
70  if (new_max > max) {
71  new_max -= alignment.modulus;
72  }
73  max = new_max;
74  }
75  }
76 
77  if (min_defined && max_defined && min == max) {
78  alignment.modulus = 0;
80  }
81  }
82 
83  // Mix in existing knowledge about this Expr
84  void intersect(const ExprInfo &other) {
85  if (min_defined && other.min_defined) {
86  min = std::max(min, other.min);
87  } else if (other.min_defined) {
88  min_defined = true;
89  min = other.min;
90  }
91 
92  if (max_defined && other.max_defined) {
93  max = std::min(max, other.max);
94  } else if (other.max_defined) {
95  max_defined = true;
96  max = other.max;
97  }
98 
100 
102  }
103  };
104 
107  if (b) {
108  *b = ExprInfo{};
109  }
110  }
111 
112 #if (LOG_EXPR_MUTATIONS || LOG_STMT_MUTATIONS)
113  static int debug_indent;
114 #endif
115 
116 #if LOG_EXPR_MUTATIONS
117  Expr mutate(const Expr &e, ExprInfo *b) {
118  const std::string spaces(debug_indent, ' ');
119  debug(1) << spaces << "Simplifying Expr: " << e << "\n";
120  debug_indent++;
121  Expr new_e = Super::dispatch(e, b);
122  debug_indent--;
123  if (!new_e.same_as(e)) {
124  debug(1)
125  << spaces << "Before: " << e << "\n"
126  << spaces << "After: " << new_e << "\n";
127  }
128  internal_assert(e.type() == new_e.type());
129  return new_e;
130  }
131 
132 #else
134  Expr mutate(const Expr &e, ExprInfo *b) {
135  // This gets inlined into every call to mutate, so do not add any code here.
136  return Super::dispatch(e, b);
137  }
138 #endif
139 
140 #if LOG_STMT_MUTATIONS
141  Stmt mutate(const Stmt &s) {
142  const std::string spaces(debug_indent, ' ');
143  debug(1) << spaces << "Simplifying Stmt: " << s << "\n";
144  debug_indent++;
145  Stmt new_s = Super::dispatch(s);
146  debug_indent--;
147  if (!new_s.same_as(s)) {
148  debug(1)
149  << spaces << "Before: " << s << "\n"
150  << spaces << "After: " << new_s << "\n";
151  }
152  return new_s;
153  }
154 #else
155  Stmt mutate(const Stmt &s) {
156  return Super::dispatch(s);
157  }
158 #endif
159 
162 
164  bool may_simplify(const Type &t) const {
165  return !no_float_simplify || !t.is_float();
166  }
167 
168  // Returns true iff t is an integral type where overflow is undefined
171  return t.is_int() && t.bits() >= 32;
172  }
173 
176  return t.is_scalar() && no_overflow_int(t);
177  }
178 
179  // Returns true iff t does not have a well defined overflow behavior.
181  bool no_overflow(Type t) {
182  return t.is_float() || no_overflow_int(t);
183  }
184 
185  struct VarInfo {
188  };
189 
190  // Tracked for all let vars
192 
193  // Only tracked for integer let vars
195 
196  // Symbols used by rewrite rules
209 
210  // Tracks whether or not we're inside a vector loop. Certain
211  // transformations are not a good idea if the code is to be
212  // vectorized.
213  bool in_vector_loop = false;
214 
215  // Tracks whether or not the current IR is unconditionally unreachable.
216  bool in_unreachable = false;
217 
218  // If we encounter a reference to a buffer (a Load, Store, Call,
219  // or Provide), there's an implicit dependence on some associated
220  // symbols.
221  void found_buffer_reference(const std::string &name, size_t dimensions = 0);
222 
223  // Wrappers for as_const_foo that are more convenient to use in
224  // the large chains of conditions in the visit methods below.
225  bool const_float(const Expr &e, double *f);
226  bool const_int(const Expr &e, int64_t *i);
227  bool const_uint(const Expr &e, uint64_t *u);
228 
229  // Put the args to a commutative op in a canonical order
231  bool should_commute(const Expr &a, const Expr &b) {
232  if (a.node_type() < b.node_type()) {
233  return true;
234  }
235  if (a.node_type() > b.node_type()) {
236  return false;
237  }
238 
239  if (a.node_type() == IRNodeType::Variable) {
240  const Variable *va = a.as<Variable>();
241  const Variable *vb = b.as<Variable>();
242  return va->name.compare(vb->name) > 0;
243  }
244 
245  return false;
246  }
247 
248  std::set<Expr, IRDeepCompare> truths, falsehoods;
249 
250  struct ScopedFact {
252 
253  std::vector<const Variable *> pop_list;
254  std::vector<const Variable *> bounds_pop_list;
255  std::vector<Expr> truths, falsehoods;
256 
257  void learn_false(const Expr &fact);
258  void learn_true(const Expr &fact);
259  void learn_upper_bound(const Variable *v, int64_t val);
260  void learn_lower_bound(const Variable *v, int64_t val);
261 
262  // Replace exprs known to be truths or falsehoods with const_true or const_false.
263  Expr substitute_facts(const Expr &e);
264  Stmt substitute_facts(const Stmt &s);
265 
267  : simplify(s) {
268  }
269  ~ScopedFact();
270 
271  // allow move but not copy
272  ScopedFact(const ScopedFact &that) = delete;
273  ScopedFact(ScopedFact &&that) = default;
274  };
275 
276  // Tell the simplifier to learn from and exploit a boolean
277  // condition, over the lifetime of the returned object.
278  ScopedFact scoped_truth(const Expr &fact) {
279  ScopedFact f(this);
280  f.learn_true(fact);
281  return f;
282  }
283 
284  // Tell the simplifier to assume a boolean condition is false over
285  // the lifetime of the returned object.
287  ScopedFact f(this);
288  f.learn_false(fact);
289  return f;
290  }
291 
293  return mutate(s);
294  }
295  Expr mutate_let_body(const Expr &e, ExprInfo *bounds) {
296  return mutate(e, bounds);
297  }
298 
299  template<typename T, typename Body>
300  Body simplify_let(const T *op, ExprInfo *bounds);
301 
302  Expr visit(const IntImm *op, ExprInfo *bounds);
303  Expr visit(const UIntImm *op, ExprInfo *bounds);
304  Expr visit(const FloatImm *op, ExprInfo *bounds);
305  Expr visit(const StringImm *op, ExprInfo *bounds);
306  Expr visit(const Broadcast *op, ExprInfo *bounds);
307  Expr visit(const Cast *op, ExprInfo *bounds);
308  Expr visit(const Reinterpret *op, ExprInfo *bounds);
309  Expr visit(const Variable *op, ExprInfo *bounds);
310  Expr visit(const Add *op, ExprInfo *bounds);
311  Expr visit(const Sub *op, ExprInfo *bounds);
312  Expr visit(const Mul *op, ExprInfo *bounds);
313  Expr visit(const Div *op, ExprInfo *bounds);
314  Expr visit(const Mod *op, ExprInfo *bounds);
315  Expr visit(const Min *op, ExprInfo *bounds);
316  Expr visit(const Max *op, ExprInfo *bounds);
317  Expr visit(const EQ *op, ExprInfo *bounds);
318  Expr visit(const NE *op, ExprInfo *bounds);
319  Expr visit(const LT *op, ExprInfo *bounds);
320  Expr visit(const LE *op, ExprInfo *bounds);
321  Expr visit(const GT *op, ExprInfo *bounds);
322  Expr visit(const GE *op, ExprInfo *bounds);
323  Expr visit(const And *op, ExprInfo *bounds);
324  Expr visit(const Or *op, ExprInfo *bounds);
325  Expr visit(const Not *op, ExprInfo *bounds);
326  Expr visit(const Select *op, ExprInfo *bounds);
327  Expr visit(const Ramp *op, ExprInfo *bounds);
328  Stmt visit(const IfThenElse *op);
329  Expr visit(const Load *op, ExprInfo *bounds);
330  Expr visit(const Call *op, ExprInfo *bounds);
331  Expr visit(const Shuffle *op, ExprInfo *bounds);
332  Expr visit(const VectorReduce *op, ExprInfo *bounds);
333  Expr visit(const Let *op, ExprInfo *bounds);
334  Stmt visit(const LetStmt *op);
335  Stmt visit(const AssertStmt *op);
336  Stmt visit(const For *op);
337  Stmt visit(const Provide *op);
338  Stmt visit(const Store *op);
339  Stmt visit(const Allocate *op);
340  Stmt visit(const Evaluate *op);
341  Stmt visit(const ProducerConsumer *op);
342  Stmt visit(const Block *op);
343  Stmt visit(const Realize *op);
344  Stmt visit(const Prefetch *op);
345  Stmt visit(const Free *op);
346  Stmt visit(const Acquire *op);
347  Stmt visit(const Fork *op);
348  Stmt visit(const Atomic *op);
349 
350  std::pair<std::vector<Expr>, bool> mutate_with_changes(const std::vector<Expr> &old_exprs, ExprInfo *bounds);
351 };
352 
353 } // namespace Internal
354 } // namespace Halide
355 
356 #endif
Halide::Internal::Acquire
Definition: IR.h:807
Halide::Internal::Simplify::ExprInfo::max
int64_t max
Definition: Simplify_Internal.h:51
Halide::Internal::Simplify::ScopedFact::substitute_facts
Expr substitute_facts(const Expr &e)
Halide::Internal::Allocate
Allocate a scratch area called with the given name, type, and size.
Definition: IR.h:363
Halide::Internal::Add
The sum of two expressions.
Definition: IR.h:48
Scope.h
Halide::Internal::Simplify::y
IRMatcher::Wild< 1 > y
Definition: Simplify_Internal.h:198
internal_assert
#define internal_assert(c)
Definition: Errors.h:19
Halide::Internal::saturating_mul
int64_t saturating_mul(int64_t a, int64_t b)
Definition: Simplify_Internal.h:31
Halide::Internal::mod_imp
T mod_imp(T a, T b)
Implementations of division and mod that are specific to Halide.
Definition: IROperator.h:239
Halide::Internal::Simplify::may_simplify
HALIDE_ALWAYS_INLINE bool may_simplify(const Type &t) const
Definition: Simplify_Internal.h:164
Halide::Internal::Simplify::ScopedFact::learn_lower_bound
void learn_lower_bound(const Variable *v, int64_t val)
Halide::Internal::VectorReduce
Horizontally reduce a vector to a scalar or narrower vector using the given commutative and associati...
Definition: IR.h:929
Halide::Internal::ModulusRemainder::intersect
static ModulusRemainder intersect(const ModulusRemainder &a, const ModulusRemainder &b)
Halide::Internal::GE
Is the first expression greater than or equal to the second.
Definition: IR.h:158
Halide::Internal::For
A for loop.
Definition: IR.h:788
Halide::Internal::Simplify
Definition: Simplify_Internal.h:42
Halide::Internal::Simplify::scoped_falsehood
ScopedFact scoped_falsehood(const Expr &fact)
Definition: Simplify_Internal.h:286
Halide::Internal::Simplify::Simplify
Simplify(bool r, const Scope< Interval > *bi, const Scope< ModulusRemainder > *ai)
Halide::min
Expr min(const FuncRef &a, const FuncRef &b)
Explicit overloads of min and max for FuncRef.
Definition: Func.h:584
Bounds.h
Halide::Internal::FloatImm
Floating point constants.
Definition: Expr.h:235
Halide::Internal::Simplify::c0
IRMatcher::WildConst< 0 > c0
Definition: Simplify_Internal.h:203
Halide::Internal::IRHandle::node_type
IRNodeType node_type() const
Definition: Expr.h:211
Halide::Internal::Broadcast
A vector with 'lanes' elements, in which every element is 'value'.
Definition: IR.h:251
Halide::Internal::Div
The ratio of two expressions.
Definition: IR.h:75
Halide::Type::is_float
HALIDE_ALWAYS_INLINE bool is_float() const
Is this type a floating point type (float or double).
Definition: Type.h:412
Halide::Internal::Simplify::visit
Expr visit(const IntImm *op, ExprInfo *bounds)
Halide::Internal::Simplify::VarInfo::replacement
Expr replacement
Definition: Simplify_Internal.h:186
Halide::Internal::IntImm
Integer constants.
Definition: Expr.h:217
Halide::Internal::Simplify::ScopedFact::pop_list
std::vector< const Variable * > pop_list
Definition: Simplify_Internal.h:253
Halide::Internal::LetStmt
The statement form of a let node.
Definition: IR.h:274
Halide::Internal::Scope
A common pattern when traversing Halide IR is that you need to keep track of stuff when you find a Le...
Definition: ModulusRemainder.h:17
Halide::Internal::IRMatcher::Wild< 0 >
Halide::Internal::Cast
The actual IR nodes begin here.
Definition: IR.h:29
Halide::Internal::LE
Is the first expression less than or equal to the second.
Definition: IR.h:140
Halide::Internal::NE
Is the first expression not equal to the second.
Definition: IR.h:122
Halide::Internal::Simplify::simplify_let
Body simplify_let(const T *op, ExprInfo *bounds)
Halide::Internal::Fork
A pair of statements executed concurrently.
Definition: IR.h:449
Halide::Internal::Simplify::mutate_with_changes
std::pair< std::vector< Expr >, bool > mutate_with_changes(const std::vector< Expr > &old_exprs, ExprInfo *bounds)
Halide::Internal::Simplify::VarInfo
Definition: Simplify_Internal.h:185
Halide::Internal::Simplify::no_float_simplify
bool no_float_simplify
Definition: Simplify_Internal.h:161
Halide::Internal::Simplify::ScopedFact::learn_true
void learn_true(const Expr &fact)
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition: Expr.h:418
uint64_t
unsigned __INT64_TYPE__ uint64_t
Definition: runtime_internal.h:23
Halide::Internal::IRNodeType::Variable
@ Variable
Halide::Type
Types in the halide type system.
Definition: Type.h:276
Halide::Internal::Simplify::u
IRMatcher::Wild< 4 > u
Definition: Simplify_Internal.h:201
Halide::Internal::Load
Load a value from a named symbol if predicate is true.
Definition: IR.h:209
Halide::Internal::Free
Free the resources associated with the given buffer.
Definition: IR.h:405
Halide::Internal::Realize
Allocate a multi-dimensional buffer of the given type and size.
Definition: IR.h:419
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::Internal::Or
Logical or - is at least one of the expression true.
Definition: IR.h:176
Halide::Internal::EQ
Is the first expression equal to the second.
Definition: IR.h:113
Halide::Internal::Simplify::ExprInfo::intersect
void intersect(const ExprInfo &other)
Definition: Simplify_Internal.h:84
Halide::Internal::Provide
This defines the value of a function at a multi-dimensional location.
Definition: IR.h:346
Halide::Internal::Simplify::truths
std::set< Expr, IRDeepCompare > truths
Definition: Simplify_Internal.h:248
Halide::Internal::Max
The greater of two values.
Definition: IR.h:104
Halide::Internal::Simplify::found_buffer_reference
void found_buffer_reference(const std::string &name, size_t dimensions=0)
Halide::Internal::Simplify::var_info
Scope< VarInfo > var_info
Definition: Simplify_Internal.h:191
Halide::Internal::Simplify::ScopedFact::truths
std::vector< Expr > truths
Definition: Simplify_Internal.h:255
Halide::Internal::Simplify::VarInfo::old_uses
int old_uses
Definition: Simplify_Internal.h:187
Halide::Internal::Simplify::no_overflow
HALIDE_ALWAYS_INLINE bool no_overflow(Type t)
Definition: Simplify_Internal.h:181
Halide::Internal::Let
A let expression, like you might find in a functional language.
Definition: IR.h:263
Halide::Internal::Simplify::ExprInfo
Definition: Simplify_Internal.h:48
Halide::Internal::Simplify::ExprInfo::alignment
ModulusRemainder alignment
Definition: Simplify_Internal.h:54
Halide::Internal::Simplify::x
IRMatcher::Wild< 0 > x
Definition: Simplify_Internal.h:197
Halide::Internal::Simplify::ExprInfo::min
int64_t min
Definition: Simplify_Internal.h:51
Halide::Internal::Ramp
A linear ramp vector node.
Definition: IR.h:239
HALIDE_ALWAYS_INLINE
#define HALIDE_ALWAYS_INLINE
Definition: HalideRuntime.h:40
Halide::Internal::Simplify::bounds_and_alignment_info
Scope< ExprInfo > bounds_and_alignment_info
Definition: Simplify_Internal.h:194
IRVisitor.h
Halide::Internal::Simplify::c3
IRMatcher::WildConst< 3 > c3
Definition: Simplify_Internal.h:206
Halide::Expr::type
HALIDE_ALWAYS_INLINE Type type() const
Get the type of this expression node.
Definition: Expr.h:321
Halide::Internal::Simplify::ScopedFact::falsehoods
std::vector< Expr > falsehoods
Definition: Simplify_Internal.h:255
Halide::Internal::Simplify::ExprInfo::max_defined
bool max_defined
Definition: Simplify_Internal.h:52
Halide::Type::bits
HALIDE_ALWAYS_INLINE int bits() const
Return the bit size of a single element of this type.
Definition: Type.h:338
Halide::Internal::Simplify::mutate_let_body
Expr mutate_let_body(const Expr &e, ExprInfo *bounds)
Definition: Simplify_Internal.h:295
Halide::Internal::Simplify::c4
IRMatcher::WildConst< 4 > c4
Definition: Simplify_Internal.h:207
Halide::Internal::debug
For optional debugging during codegen, use the debug class as follows:
Definition: Debug.h:49
Halide::Internal::Evaluate
Evaluate and discard an expression, presumably because it has some side-effect.
Definition: IR.h:468
Halide::Internal::Simplify::no_overflow_int
HALIDE_ALWAYS_INLINE bool no_overflow_int(Type t)
Definition: Simplify_Internal.h:170
int64_t
signed __INT64_TYPE__ int64_t
Definition: runtime_internal.h:22
Halide::Internal::VariadicVisitor< Simplify, Expr, Stmt >::dispatch
HALIDE_ALWAYS_INLINE Stmt dispatch(const Stmt &s, Args &&...args)
Definition: IRVisitor.h:330
Halide::Internal::Simplify::c1
IRMatcher::WildConst< 1 > c1
Definition: Simplify_Internal.h:204
Halide::Internal::Store
Store a 'value' to the buffer called 'name' at a given 'index' if 'predicate' is true.
Definition: IR.h:325
Halide::Internal::Simplify::ExprInfo::trim_bounds_using_alignment
void trim_bounds_using_alignment()
Definition: Simplify_Internal.h:56
Halide::Internal::VariadicVisitor
A visitor/mutator capable of passing arbitrary arguments to the visit methods using CRTP and returnin...
Definition: IRVisitor.h:159
Halide::Internal::Simplify::ScopedFact
Definition: Simplify_Internal.h:250
Halide::Internal::Variable
A named variable.
Definition: IR.h:741
Halide::Internal::Simplify::ScopedFact::bounds_pop_list
std::vector< const Variable * > bounds_pop_list
Definition: Simplify_Internal.h:254
IRMatch.h
Halide::Internal::Min
The lesser of two values.
Definition: IR.h:95
Halide::Internal::Simplify::ScopedFact::~ScopedFact
~ScopedFact()
Halide::Internal::ProducerConsumer
This node is a helpful annotation to do with permissions.
Definition: IR.h:307
Halide::Internal::Mod
The remainder of a / b.
Definition: IR.h:86
Halide::Internal::Simplify::ScopedFact::learn_upper_bound
void learn_upper_bound(const Variable *v, int64_t val)
Halide::Internal::AssertStmt
If the 'condition' is false, then evaluate and return the message, which should be a call to an error...
Definition: IR.h:286
Halide::Internal::mul_with_overflow
HALIDE_MUST_USE_RESULT bool mul_with_overflow(int bits, int64_t a, int64_t b, int64_t *result)
Halide::Internal::Simplify::z
IRMatcher::Wild< 2 > z
Definition: Simplify_Internal.h:199
Halide::Internal::Simplify::ScopedFact::simplify
Simplify * simplify
Definition: Simplify_Internal.h:251
Halide::Internal::Simplify::c2
IRMatcher::WildConst< 2 > c2
Definition: Simplify_Internal.h:205
Halide::Type::is_scalar
HALIDE_ALWAYS_INLINE bool is_scalar() const
Is this type a scalar type? (lanes() == 1).
Definition: Type.h:406
Halide::Internal::Simplify::VarInfo::new_uses
int new_uses
Definition: Simplify_Internal.h:187
Halide::Internal::Call
A function call.
Definition: IR.h:482
Halide::Internal::Simplify::should_commute
HALIDE_ALWAYS_INLINE bool should_commute(const Expr &a, const Expr &b)
Definition: Simplify_Internal.h:231
Halide::Internal::Simplify::in_unreachable
bool in_unreachable
Definition: Simplify_Internal.h:216
Halide::Internal::IRMatcher::WildConst< 0 >
Halide::Internal::Simplify::const_float
bool const_float(const Expr &e, double *f)
Halide::Internal::ModulusRemainder::modulus
int64_t modulus
Definition: ModulusRemainder.h:37
Halide::Internal::Reinterpret
Reinterpret value as another type, without affecting any of the bits (on little-endian systems).
Definition: IR.h:39
Halide::Type::is_int
HALIDE_ALWAYS_INLINE bool is_int() const
Is this type a signed integer type?
Definition: Type.h:424
Halide::Internal::Simplify::v
IRMatcher::Wild< 5 > v
Definition: Simplify_Internal.h:202
Halide::Internal::Select
A ternary operator.
Definition: IR.h:196
Halide::Internal::Simplify::remove_dead_code
bool remove_dead_code
Definition: Simplify_Internal.h:160
Halide::Internal::Simplify::ExprInfo::min_defined
bool min_defined
Definition: Simplify_Internal.h:52
Halide::Internal::Simplify::no_overflow_scalar_int
HALIDE_ALWAYS_INLINE bool no_overflow_scalar_int(Type t)
Definition: Simplify_Internal.h:175
Halide::Internal::Simplify::scoped_truth
ScopedFact scoped_truth(const Expr &fact)
Definition: Simplify_Internal.h:278
Halide::Expr
A fragment of Halide syntax.
Definition: Expr.h:257
Halide::Internal::ModulusRemainder::remainder
int64_t remainder
Definition: ModulusRemainder.h:37
Halide::Internal::Simplify::ScopedFact::learn_false
void learn_false(const Expr &fact)
Halide::Internal::Prefetch
Represent a multi-dimensional region of a Func or an ImageParam that needs to be prefetched.
Definition: IR.h:888
Halide::Internal::GT
Is the first expression greater than the second.
Definition: IR.h:149
Halide::Internal::Atomic
Lock all the Store nodes in the body statement.
Definition: IR.h:911
Halide::Internal::Simplify::const_uint
bool const_uint(const Expr &e, uint64_t *u)
Halide::Internal::Shuffle
Construct a new vector by taking elements from another sequence of vectors.
Definition: IR.h:819
Halide::Internal::Variable::name
std::string name
Definition: IR.h:742
Halide::Internal::Simplify::clear_bounds_info
HALIDE_ALWAYS_INLINE void clear_bounds_info(ExprInfo *b)
Definition: Simplify_Internal.h:106
Halide::Internal::Simplify::mutate
HALIDE_ALWAYS_INLINE Expr mutate(const Expr &e, ExprInfo *b)
Definition: Simplify_Internal.h:134
Halide::Internal::Simplify::const_int
bool const_int(const Expr &e, int64_t *i)
Halide::Internal::UIntImm
Unsigned integer constants.
Definition: Expr.h:226
Halide::max
Expr max(const FuncRef &a, const FuncRef &b)
Definition: Func.h:587
Halide::Internal::ModulusRemainder
The result of modulus_remainder analysis.
Definition: ModulusRemainder.h:31
Halide::Internal::Simplify::falsehoods
std::set< Expr, IRDeepCompare > falsehoods
Definition: Simplify_Internal.h:248
Halide::Internal::IfThenElse
An if-then-else block.
Definition: IR.h:458
Halide::Internal::Sub
The difference of two expressions.
Definition: IR.h:57
Halide::Internal::IRHandle::as
const T * as() const
Downcast this ir node to its actual type (e.g.
Definition: Expr.h:204
Halide::Internal::And
Logical and - are both expressions true.
Definition: IR.h:167
Halide::Internal::Simplify::mutate
Stmt mutate(const Stmt &s)
Definition: Simplify_Internal.h:155
Halide::Internal::Simplify::w
IRMatcher::Wild< 3 > w
Definition: Simplify_Internal.h:200
Halide::Internal::StringImm
String constants.
Definition: Expr.h:244
Halide::Internal::Not
Logical not - true if the expression false.
Definition: IR.h:185
Halide::Internal::Simplify::ScopedFact::ScopedFact
ScopedFact(Simplify *s)
Definition: Simplify_Internal.h:266
Halide::Internal::LT
Is the first expression less than the second.
Definition: IR.h:131
Halide::Internal::Simplify::in_vector_loop
bool in_vector_loop
Definition: Simplify_Internal.h:213
Halide::Internal::Simplify::c5
IRMatcher::WildConst< 5 > c5
Definition: Simplify_Internal.h:208
Halide::Internal::Simplify::mutate_let_body
Stmt mutate_let_body(const Stmt &s, ExprInfo *)
Definition: Simplify_Internal.h:292
Halide::Internal::Mul
The product of two expressions.
Definition: IR.h:66
Halide::Internal::Block
A sequence of statements to be executed in-order.
Definition: IR.h:434
Halide::Internal::IntrusivePtr::same_as
HALIDE_ALWAYS_INLINE bool same_as(const IntrusivePtr &other) const
Definition: IntrusivePtr.h:168