https://github.com/halide/Halide
Raw File
Tip revision: cc6e06d0a8109daee522ffd41f7f82c49e991df0 authored by Andrew Adams on 03 April 2023, 23:43:52 UTC
Increase test threshold for mullapudi histogram test
Tip revision: cc6e06d
PartitionLoops.h
#ifndef PARTITION_LOOPS_H
#define PARTITION_LOOPS_H

/** \file
 * Defines a lowering pass that partitions loop bodies into three
 * to handle boundary conditions: A prologue, a simplified
 * steady-stage, and an epilogue.
 */

#include "Expr.h"

namespace Halide {
namespace Internal {

/** Return true if an expression uses a likely tag that isn't captured
 * by an enclosing Select, Min, or Max. */
bool has_uncaptured_likely_tag(const Expr &e);

/** Return true if an expression uses a likely tag. */
bool has_likely_tag(const Expr &e);

/** Partitions loop bodies into a prologue, a steady state, and an
 * epilogue. Finds the steady state by hunting for use of clamped
 * ramps, or the 'likely' intrinsic. */
Stmt partition_loops(Stmt s);

}  // namespace Internal
}  // namespace Halide

#endif
back to top