Halide  17.0.2
Halide compiler and libraries
PartitionLoops.h
Go to the documentation of this file.
1 #ifndef PARTITION_LOOPS_H
2 #define PARTITION_LOOPS_H
3 
4 /** \file
5  * Defines a lowering pass that partitions loop bodies into three
6  * to handle boundary conditions: A prologue, a simplified
7  * steady-stage, and an epilogue.
8  */
9 
10 #include "Expr.h"
11 #include "Scope.h"
12 
13 namespace Halide {
14 namespace Internal {
15 
16 /** Return true if an expression uses a likely tag that isn't captured by an
17  * enclosing Select, Min, or Max. The scope contains all vars that should be
18  * considered to have uncaptured likelies. */
19 bool has_uncaptured_likely_tag(const Expr &e, const Scope<> &scope);
20 
21 /** Return true if an expression uses a likely tag. The scope contains all vars
22  * in scope that should be considered to have likely tags. */
23 bool has_likely_tag(const Expr &e, const Scope<> &scope);
24 
25 /** Partitions loop bodies into a prologue, a steady state, and an
26  * epilogue. Finds the steady state by hunting for use of clamped
27  * ramps, or the 'likely' intrinsic. */
28 Stmt partition_loops(Stmt s);
29 
30 } // namespace Internal
31 } // namespace Halide
32 
33 #endif
This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide&#39;s bounds tools to query properties of it.
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt) ...
Not visible externally, similar to &#39;static&#39; linkage in C.
Defines the Scope class, which is used for keeping track of names in a scope while traversing IR...
bool has_uncaptured_likely_tag(const Expr &e, const Scope<> &scope)
Return true if an expression uses a likely tag that isn&#39;t captured by an enclosing Select...
bool has_likely_tag(const Expr &e, const Scope<> &scope)
Return true if an expression uses a likely tag.
Stmt partition_loops(Stmt s)
Partitions loop bodies into a prologue, a steady state, and an epilogue.