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 
31 class Simplify : public VariadicVisitor<Simplify, Expr, Stmt> {
33 
34 public:
35  Simplify(bool r, const Scope<Interval> *bi, const Scope<ModulusRemainder> *ai);
36 
37  struct ExprInfo {
38  // We track constant integer bounds when they exist
39  int64_t min = 0, max = 0;
40  bool min_defined = false, max_defined = false;
41  // And the alignment of integer variables
43 
45  if (alignment.modulus == 0) {
46  min_defined = max_defined = true;
48  } else if (alignment.modulus > 1) {
49  if (min_defined) {
51  if (new_min < min) {
52  new_min += alignment.modulus;
53  }
54  min = new_min;
55  }
56  if (max_defined) {
58  if (new_max > max) {
59  new_max -= alignment.modulus;
60  }
61  max = new_max;
62  }
63  }
64 
65  if (min_defined && max_defined && min == max) {
66  alignment.modulus = 0;
68  }
69  }
70 
71  // Mix in existing knowledge about this Expr
72  void intersect(const ExprInfo &other) {
73  if (min_defined && other.min_defined) {
74  min = std::max(min, other.min);
75  } else if (other.min_defined) {
76  min_defined = true;
77  min = other.min;
78  }
79 
80  if (max_defined && other.max_defined) {
81  max = std::min(max, other.max);
82  } else if (other.max_defined) {
83  max_defined = true;
84  max = other.max;
85  }
86 
88 
90  }
91  };
92 
93 #if (LOG_EXPR_MUTATORIONS || LOG_STMT_MUTATIONS)
94  static int debug_indent;
95 #endif
96 
97 #if LOG_EXPR_MUTATIONS
98  Expr mutate(const Expr &e, ExprInfo *b) {
99  const std::string spaces(debug_indent, ' ');
100  debug(1) << spaces << "Simplifying Expr: " << e << "\n";
101  debug_indent++;
102  Expr new_e = Super::dispatch(e, b);
103  debug_indent--;
104  if (!new_e.same_as(e)) {
105  debug(1)
106  << spaces << "Before: " << e << "\n"
107  << spaces << "After: " << new_e << "\n";
108  }
109  internal_assert(e.type() == new_e.type());
110  return new_e;
111  }
112 
113 #else
115  Expr mutate(const Expr &e, ExprInfo *b) {
116  Expr new_e = Super::dispatch(e, b);
117  internal_assert(new_e.type() == e.type()) << e << " -> " << new_e << "\n";
118  return new_e;
119  }
120 #endif
121 
122 #if LOG_STMT_MUTATIONS
123  Stmt mutate(const Stmt &s) {
124  const std::string spaces(debug_indent, ' ');
125  debug(1) << spaces << "Simplifying Stmt: " << s << "\n";
126  debug_indent++;
127  Stmt new_s = Super::dispatch(s);
128  debug_indent--;
129  if (!new_s.same_as(s)) {
130  debug(1)
131  << spaces << "Before: " << s << "\n"
132  << spaces << "After: " << new_s << "\n";
133  }
134  return new_s;
135  }
136 #else
137  Stmt mutate(const Stmt &s) {
138  return Super::dispatch(s);
139  }
140 #endif
141 
144 
146  bool may_simplify(const Type &t) const {
147  return !no_float_simplify || !t.is_float();
148  }
149 
150  // Returns true iff t is an integral type where overflow is undefined
153  return t.is_int() && t.bits() >= 32;
154  }
155 
158  return t.is_scalar() && no_overflow_int(t);
159  }
160 
161  // Returns true iff t does not have a well defined overflow behavior.
163  bool no_overflow(Type t) {
164  return t.is_float() || no_overflow_int(t);
165  }
166 
167  struct VarInfo {
170  };
171 
172  // Tracked for all let vars
174 
175  // Only tracked for integer let vars
177 
178  // Symbols used by rewrite rules
189 
190  // Tracks whether or not we're inside a vector loop. Certain
191  // transformations are not a good idea if the code is to be
192  // vectorized.
193  bool in_vector_loop = false;
194 
195  // If we encounter a reference to a buffer (a Load, Store, Call,
196  // or Provide), there's an implicit dependence on some associated
197  // symbols.
198  void found_buffer_reference(const std::string &name, size_t dimensions = 0);
199 
200  // Wrappers for as_const_foo that are more convenient to use in
201  // the large chains of conditions in the visit methods
202  // below. Unlike the versions in IROperator, these only match
203  // scalars.
204  bool const_float(const Expr &e, double *f);
205  bool const_int(const Expr &e, int64_t *i);
206  bool const_uint(const Expr &e, uint64_t *u);
207 
208  // Put the args to a commutative op in a canonical order
210  bool should_commute(const Expr &a, const Expr &b) {
211  if (a.node_type() < b.node_type()) return true;
212  if (a.node_type() > b.node_type()) return false;
213 
214  if (a.node_type() == IRNodeType::Variable) {
215  const Variable *va = a.as<Variable>();
216  const Variable *vb = b.as<Variable>();
217  return va->name.compare(vb->name) > 0;
218  }
219 
220  return false;
221  }
222 
223  std::set<Expr, IRDeepCompare> truths, falsehoods;
224 
225  struct ScopedFact {
227 
228  std::vector<const Variable *> pop_list;
229  std::vector<const Variable *> bounds_pop_list;
230  std::vector<Expr> truths, falsehoods;
231 
232  void learn_false(const Expr &fact);
233  void learn_true(const Expr &fact);
234  void learn_upper_bound(const Variable *v, int64_t val);
235  void learn_lower_bound(const Variable *v, int64_t val);
236 
238  : simplify(s) {
239  }
240  ~ScopedFact();
241 
242  // allow move but not copy
243  ScopedFact(const ScopedFact &that) = delete;
244  ScopedFact(ScopedFact &&that) = default;
245  };
246 
247  // Tell the simplifier to learn from and exploit a boolean
248  // condition, over the lifetime of the returned object.
249  ScopedFact scoped_truth(const Expr &fact) {
250  ScopedFact f(this);
251  f.learn_true(fact);
252  return f;
253  }
254 
255  // Tell the simplifier to assume a boolean condition is false over
256  // the lifetime of the returned object.
258  ScopedFact f(this);
259  f.learn_false(fact);
260  return f;
261  }
262 
263  template<typename T>
265 
267  return mutate(s);
268  }
269  Expr mutate_let_body(const Expr &e, ExprInfo *bounds) {
270  return mutate(e, bounds);
271  }
272 
273  template<typename T, typename Body>
274  Body simplify_let(const T *op, ExprInfo *bounds);
275 
276  Expr visit(const IntImm *op, ExprInfo *bounds);
277  Expr visit(const UIntImm *op, ExprInfo *bounds);
278  Expr visit(const FloatImm *op, ExprInfo *bounds);
279  Expr visit(const StringImm *op, ExprInfo *bounds);
280  Expr visit(const Broadcast *op, ExprInfo *bounds);
281  Expr visit(const Cast *op, ExprInfo *bounds);
282  Expr visit(const Variable *op, ExprInfo *bounds);
283  Expr visit(const Add *op, ExprInfo *bounds);
284  Expr visit(const Sub *op, ExprInfo *bounds);
285  Expr visit(const Mul *op, ExprInfo *bounds);
286  Expr visit(const Div *op, ExprInfo *bounds);
287  Expr visit(const Mod *op, ExprInfo *bounds);
288  Expr visit(const Min *op, ExprInfo *bounds);
289  Expr visit(const Max *op, ExprInfo *bounds);
290  Expr visit(const EQ *op, ExprInfo *bounds);
291  Expr visit(const NE *op, ExprInfo *bounds);
292  Expr visit(const LT *op, ExprInfo *bounds);
293  Expr visit(const LE *op, ExprInfo *bounds);
294  Expr visit(const GT *op, ExprInfo *bounds);
295  Expr visit(const GE *op, ExprInfo *bounds);
296  Expr visit(const And *op, ExprInfo *bounds);
297  Expr visit(const Or *op, ExprInfo *bounds);
298  Expr visit(const Not *op, ExprInfo *bounds);
299  Expr visit(const Select *op, ExprInfo *bounds);
300  Expr visit(const Ramp *op, ExprInfo *bounds);
301  Stmt visit(const IfThenElse *op);
302  Expr visit(const Load *op, ExprInfo *bounds);
303  Expr visit(const Call *op, ExprInfo *bounds);
304  Expr visit(const Shuffle *op, ExprInfo *bounds);
305  Expr visit(const VectorReduce *op, ExprInfo *bounds);
306  Expr visit(const Let *op, ExprInfo *bounds);
307  Stmt visit(const LetStmt *op);
308  Stmt visit(const AssertStmt *op);
309  Stmt visit(const For *op);
310  Stmt visit(const Provide *op);
311  Stmt visit(const Store *op);
312  Stmt visit(const Allocate *op);
313  Stmt visit(const Evaluate *op);
314  Stmt visit(const ProducerConsumer *op);
315  Stmt visit(const Block *op);
316  Stmt visit(const Realize *op);
317  Stmt visit(const Prefetch *op);
318  Stmt visit(const Free *op);
319  Stmt visit(const Acquire *op);
320  Stmt visit(const Fork *op);
321  Stmt visit(const Atomic *op);
322 };
323 
324 } // namespace Internal
325 } // namespace Halide
326 
327 #endif
Halide::Internal::Acquire
Definition: IR.h:717
Halide::Internal::Simplify::hoist_slice_vector
Expr hoist_slice_vector(Expr e)
Halide::Internal::Simplify::ExprInfo::max
int64_t max
Definition: Simplify_Internal.h:39
Halide::Internal::Allocate
Allocate a scratch area called with the given name, type, and size.
Definition: IR.h:352
Halide::Internal::Add
The sum of two expressions.
Definition: IR.h:38
Scope.h
Halide::Internal::Simplify::y
IRMatcher::Wild< 1 > y
Definition: Simplify_Internal.h:180
internal_assert
#define internal_assert(c)
Definition: Errors.h:19
Halide::Internal::mod_imp
T mod_imp(T a, T b)
Implementations of division and mod that are specific to Halide.
Definition: IROperator.h:244
Halide::Internal::Simplify::may_simplify
HALIDE_ALWAYS_INLINE bool may_simplify(const Type &t) const
Definition: Simplify_Internal.h:146
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:827
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:148
Halide::Internal::For
A for loop.
Definition: IR.h:698
Halide::Internal::Simplify
Definition: Simplify_Internal.h:31
Halide::Internal::Simplify::scoped_falsehood
ScopedFact scoped_falsehood(const Expr &fact)
Definition: Simplify_Internal.h:257
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:577
Bounds.h
Halide::Internal::FloatImm
Floating point constants.
Definition: Expr.h:234
Halide::Internal::Simplify::c0
IRMatcher::WildConst< 0 > c0
Definition: Simplify_Internal.h:185
Halide::Internal::Simplify::remove_dead_lets
bool remove_dead_lets
Definition: Simplify_Internal.h:142
Halide::Internal::IRHandle::node_type
IRNodeType node_type() const
Definition: Expr.h:210
Halide::Internal::Broadcast
A vector with 'lanes' elements, in which every element is 'value'.
Definition: IR.h:241
Halide::Internal::Div
The ratio of two expressions.
Definition: IR.h:65
Halide::Type::is_float
HALIDE_ALWAYS_INLINE bool is_float() const
Is this type a floating point type (float or double).
Definition: Type.h:384
Halide::Internal::Simplify::visit
Expr visit(const IntImm *op, ExprInfo *bounds)
Halide::Internal::Simplify::VarInfo::replacement
Expr replacement
Definition: Simplify_Internal.h:168
Halide::Internal::IntImm
Integer constants.
Definition: Expr.h:216
Halide::Internal::Simplify::ScopedFact::pop_list
std::vector< const Variable * > pop_list
Definition: Simplify_Internal.h:228
Halide::Internal::LetStmt
The statement form of a let node.
Definition: IR.h:264
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:130
Halide::Internal::NE
Is the first expression not equal to the second.
Definition: IR.h:112
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:431
Halide::Internal::Simplify::VarInfo
Definition: Simplify_Internal.h:167
Halide::Internal::Simplify::no_float_simplify
bool no_float_simplify
Definition: Simplify_Internal.h:143
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:409
uint64_t
unsigned __INT64_TYPE__ uint64_t
Definition: runtime_internal.h:19
Halide::Internal::IRNodeType::Variable
@ Variable
Halide::Type
Types in the halide type system.
Definition: Type.h:269
Halide::Internal::Simplify::u
IRMatcher::Wild< 4 > u
Definition: Simplify_Internal.h:183
Halide::Internal::Load
Load a value from a named symbol if predicate is true.
Definition: IR.h:199
Halide::Internal::Free
Free the resources associated with the given buffer.
Definition: IR.h:388
Halide::Internal::Realize
Allocate a multi-dimensional buffer of the given type and size.
Definition: IR.h:402
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AddAtomicMutex.h:21
Halide::Internal::VariadicVisitor< Simplify, Expr, Stmt >::dispatch
HALIDE_ALWAYS_INLINE Stmt dispatch(const Stmt &s, Args &&... args)
Definition: IRVisitor.h:323
Halide::Internal::Or
Logical or - is at least one of the expression true.
Definition: IR.h:166
Halide::Internal::EQ
Is the first expression equal to the second.
Definition: IR.h:103
Halide::Internal::Simplify::ExprInfo::intersect
void intersect(const ExprInfo &other)
Definition: Simplify_Internal.h:72
Halide::Internal::Provide
This defines the value of a function at a multi-dimensional location.
Definition: IR.h:336
Halide::Internal::Simplify::truths
std::set< Expr, IRDeepCompare > truths
Definition: Simplify_Internal.h:223
Halide::Internal::Max
The greater of two values.
Definition: IR.h:94
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:173
Halide::Internal::Simplify::ScopedFact::truths
std::vector< Expr > truths
Definition: Simplify_Internal.h:230
Halide::Internal::Simplify::VarInfo::old_uses
int old_uses
Definition: Simplify_Internal.h:169
Halide::Internal::Simplify::no_overflow
HALIDE_ALWAYS_INLINE bool no_overflow(Type t)
Definition: Simplify_Internal.h:163
Halide::Internal::Let
A let expression, like you might find in a functional language.
Definition: IR.h:253
Halide::Internal::Simplify::ExprInfo
Definition: Simplify_Internal.h:37
Halide::Internal::Simplify::ExprInfo::alignment
ModulusRemainder alignment
Definition: Simplify_Internal.h:42
Halide::Internal::Simplify::x
IRMatcher::Wild< 0 > x
Definition: Simplify_Internal.h:179
Halide::Internal::Simplify::ExprInfo::min
int64_t min
Definition: Simplify_Internal.h:39
Halide::Internal::Ramp
A linear ramp vector node.
Definition: IR.h:229
HALIDE_ALWAYS_INLINE
#define HALIDE_ALWAYS_INLINE
Definition: HalideRuntime.h:32
Halide::Internal::Simplify::bounds_and_alignment_info
Scope< ExprInfo > bounds_and_alignment_info
Definition: Simplify_Internal.h:176
IRVisitor.h
Halide::Internal::Simplify::c3
IRMatcher::WildConst< 3 > c3
Definition: Simplify_Internal.h:188
Halide::Expr::type
HALIDE_ALWAYS_INLINE Type type() const
Get the type of this expression node.
Definition: Expr.h:320
Halide::Internal::Simplify::ScopedFact::falsehoods
std::vector< Expr > falsehoods
Definition: Simplify_Internal.h:230
Halide::Internal::Simplify::ExprInfo::max_defined
bool max_defined
Definition: Simplify_Internal.h:40
Halide::Type::bits
HALIDE_ALWAYS_INLINE int bits() const
Return the bit size of a single element of this type.
Definition: Type.h:331
Halide::Internal::Simplify::mutate_let_body
Expr mutate_let_body(const Expr &e, ExprInfo *bounds)
Definition: Simplify_Internal.h:269
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:450
Halide::Internal::Simplify::no_overflow_int
HALIDE_ALWAYS_INLINE bool no_overflow_int(Type t)
Definition: Simplify_Internal.h:152
int64_t
signed __INT64_TYPE__ int64_t
Definition: runtime_internal.h:18
Halide::Internal::Simplify::c1
IRMatcher::WildConst< 1 > c1
Definition: Simplify_Internal.h:186
Halide::Internal::Store
Store a 'value' to the buffer called 'name' at a given 'index' if 'predicate' is true.
Definition: IR.h:315
Halide::Internal::Simplify::ExprInfo::trim_bounds_using_alignment
void trim_bounds_using_alignment()
Definition: Simplify_Internal.h:44
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:225
Halide::Internal::Variable
A named variable.
Definition: IR.h:651
Halide::Internal::Simplify::ScopedFact::bounds_pop_list
std::vector< const Variable * > bounds_pop_list
Definition: Simplify_Internal.h:229
IRMatch.h
Halide::Internal::Min
The lesser of two values.
Definition: IR.h:85
Halide::Internal::Simplify::ScopedFact::~ScopedFact
~ScopedFact()
Halide::Internal::ProducerConsumer
This node is a helpful annotation to do with permissions.
Definition: IR.h:297
Halide::Internal::Mod
The remainder of a / b.
Definition: IR.h:76
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:276
Halide::Internal::Simplify::z
IRMatcher::Wild< 2 > z
Definition: Simplify_Internal.h:181
Halide::Internal::Simplify::ScopedFact::simplify
Simplify * simplify
Definition: Simplify_Internal.h:226
Halide::Internal::Simplify::c2
IRMatcher::WildConst< 2 > c2
Definition: Simplify_Internal.h:187
Halide::Type::is_scalar
HALIDE_ALWAYS_INLINE bool is_scalar() const
Is this type a scalar type? (lanes() == 1).
Definition: Type.h:378
Halide::Internal::Simplify::VarInfo::new_uses
int new_uses
Definition: Simplify_Internal.h:169
Halide::Internal::Call
A function call.
Definition: IR.h:464
Halide::Internal::Simplify::should_commute
HALIDE_ALWAYS_INLINE bool should_commute(const Expr &a, const Expr &b)
Definition: Simplify_Internal.h:210
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:39
Halide::Type::is_int
HALIDE_ALWAYS_INLINE bool is_int() const
Is this type a signed integer type?
Definition: Type.h:396
Halide::Internal::Simplify::v
IRMatcher::Wild< 5 > v
Definition: Simplify_Internal.h:184
Halide::Internal::Select
A ternary operator.
Definition: IR.h:186
Halide::Internal::Simplify::ExprInfo::min_defined
bool min_defined
Definition: Simplify_Internal.h:40
Halide::Internal::Simplify::no_overflow_scalar_int
HALIDE_ALWAYS_INLINE bool no_overflow_scalar_int(Type t)
Definition: Simplify_Internal.h:157
Halide::Internal::Simplify::scoped_truth
ScopedFact scoped_truth(const Expr &fact)
Definition: Simplify_Internal.h:249
Halide::Expr
A fragment of Halide syntax.
Definition: Expr.h:256
Halide::Internal::ModulusRemainder::remainder
int64_t remainder
Definition: ModulusRemainder.h:39
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:786
Halide::Internal::GT
Is the first expression greater than the second.
Definition: IR.h:139
Halide::Internal::Atomic
Lock all the Store nodes in the body statement.
Definition: IR.h:809
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:729
Halide::Internal::Variable::name
std::string name
Definition: IR.h:652
Halide::Internal::Simplify::mutate
HALIDE_ALWAYS_INLINE Expr mutate(const Expr &e, ExprInfo *b)
Definition: Simplify_Internal.h:115
Halide::Internal::Simplify::const_int
bool const_int(const Expr &e, int64_t *i)
Halide::Internal::UIntImm
Unsigned integer constants.
Definition: Expr.h:225
Halide::max
Expr max(const FuncRef &a, const FuncRef &b)
Definition: Func.h:580
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:223
Halide::Internal::IfThenElse
An if-then-else block.
Definition: IR.h:440
Halide::Internal::Sub
The difference of two expressions.
Definition: IR.h:47
Halide::Internal::IRHandle::as
const T * as() const
Downcast this ir node to its actual type (e.g.
Definition: Expr.h:203
Halide::Internal::And
Logical and - are both expressions true.
Definition: IR.h:157
Halide::Internal::Simplify::mutate
Stmt mutate(const Stmt &s)
Definition: Simplify_Internal.h:137
Halide::Internal::Simplify::w
IRMatcher::Wild< 3 > w
Definition: Simplify_Internal.h:182
Halide::Internal::StringImm
String constants.
Definition: Expr.h:243
Halide::Internal::Not
Logical not - true if the expression false.
Definition: IR.h:175
Halide::Internal::Simplify::ScopedFact::ScopedFact
ScopedFact(Simplify *s)
Definition: Simplify_Internal.h:237
Halide::Internal::LT
Is the first expression less than the second.
Definition: IR.h:121
Halide::Internal::Simplify::in_vector_loop
bool in_vector_loop
Definition: Simplify_Internal.h:193
Halide::Internal::Simplify::mutate_let_body
Stmt mutate_let_body(const Stmt &s, ExprInfo *)
Definition: Simplify_Internal.h:266
Halide::Internal::Mul
The product of two expressions.
Definition: IR.h:56
Halide::Internal::Block
A sequence of statements to be executed in-order.
Definition: IR.h:417
Halide::Internal::IntrusivePtr::same_as
HALIDE_ALWAYS_INLINE bool same_as(const IntrusivePtr &other) const
Definition: IntrusivePtr.h:163