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 12 namespace Halide { 13 namespace Internal { 14 15 /** Return true if an expression uses a likely tag that isn't captured 16 * by an enclosing Select, Min, or Max. */ 17 bool has_uncaptured_likely_tag(const Expr &e); 18 19 /** Return true if an expression uses a likely tag. */ 20 bool has_likely_tag(const Expr &e); 21 22 /** Partitions loop bodies into a prologue, a steady state, and an 23 * epilogue. Finds the steady state by hunting for use of clamped 24 * ramps, or the 'likely' intrinsic. */ 25 Stmt partition_loops(Stmt s); 26 27 } // namespace Internal 28 } // namespace Halide 29 30 #endif 31