Loading...
Searching...
No Matches
FindIntrinsics.h
Go to the documentation of this file.
#ifndef HALIDE_FIND_INTRINSICS_H
#define HALIDE_FIND_INTRINSICS_H
/** \file
* Tools to replace common patterns with more readily recognizable intrinsics.
*/
#include "IR.h"
namespace Halide {
namespace Internal {
/** Implement intrinsics with non-intrinsic using equivalents. */
Expr lower_widen_right_add(const Expr &a, const Expr &b);
Expr lower_widen_right_mul(const Expr &a, const Expr &b);
Expr lower_widen_right_sub(const Expr &a, const Expr &b);
Expr lower_widening_add(const Expr &a, const Expr &b);
Expr lower_widening_mul(const Expr &a, const Expr &b);
Expr lower_widening_sub(const Expr &a, const Expr &b);
Expr lower_widening_shift_left(const Expr &a, const Expr &b);
Expr lower_widening_shift_right(const Expr &a, const Expr &b);
Expr lower_rounding_shift_left(const Expr &a, const Expr &b);
Expr lower_rounding_shift_right(const Expr &a, const Expr &b);
Expr lower_saturating_add(const Expr &a, const Expr &b);
Expr lower_saturating_sub(const Expr &a, const Expr &b);
Expr lower_saturating_cast(const Type &t, const Expr &a);
Expr lower_halving_add(const Expr &a, const Expr &b);
Expr lower_halving_sub(const Expr &a, const Expr &b);
Expr lower_rounding_halving_add(const Expr &a, const Expr &b);
Expr lower_sorted_avg(const Expr &a, const Expr &b);
Expr lower_mul_shift_right(const Expr &a, const Expr &b, const Expr &q);
Expr lower_rounding_mul_shift_right(const Expr &a, const Expr &b, const Expr &q);
/** Replace one of the above ops with equivalent arithmetic. */
Expr lower_intrinsic(const Call *op);
/** Replace common arithmetic patterns with intrinsics. */
Stmt find_intrinsics(const Stmt &s);
Expr find_intrinsics(const Expr &e);
/** The reverse of find_intrinsics. */
Expr lower_intrinsics(const Expr &e);
Stmt lower_intrinsics(const Stmt &s);
} // namespace Internal
} // namespace Halide
#endif
IR.h
Subtypes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::lower_sorted_avg
Expr lower_sorted_avg(const Expr &a, const Expr &b)
Halide::Internal::lower_widen_right_add
Expr lower_widen_right_add(const Expr &a, const Expr &b)
Implement intrinsics with non-intrinsic using equivalents.
Halide::Internal::lower_mul_shift_right
Expr lower_mul_shift_right(const Expr &a, const Expr &b, const Expr &q)
Halide::Internal::lower_halving_sub
Expr lower_halving_sub(const Expr &a, const Expr &b)
Halide::Internal::lower_halving_add
Expr lower_halving_add(const Expr &a, const Expr &b)
Halide::Internal::lower_rounding_halving_add
Expr lower_rounding_halving_add(const Expr &a, const Expr &b)
Halide::Internal::lower_widening_shift_left
Expr lower_widening_shift_left(const Expr &a, const Expr &b)
Halide::Internal::lower_saturating_add
Expr lower_saturating_add(const Expr &a, const Expr &b)
Halide::Internal::lower_widening_add
Expr lower_widening_add(const Expr &a, const Expr &b)
Halide::Internal::lower_saturating_cast
Expr lower_saturating_cast(const Type &t, const Expr &a)
Halide::Internal::lower_widening_shift_right
Expr lower_widening_shift_right(const Expr &a, const Expr &b)
Halide::Internal::lower_intrinsics
Expr lower_intrinsics(const Expr &e)
The reverse of find_intrinsics.
Halide::Internal::lower_widen_right_sub
Expr lower_widen_right_sub(const Expr &a, const Expr &b)
Halide::Internal::lower_widen_right_mul
Expr lower_widen_right_mul(const Expr &a, const Expr &b)
Halide::Internal::lower_rounding_shift_right
Expr lower_rounding_shift_right(const Expr &a, const Expr &b)
Halide::Internal::lower_widening_sub
Expr lower_widening_sub(const Expr &a, const Expr &b)
Halide::Internal::find_intrinsics
Stmt find_intrinsics(const Stmt &s)
Replace common arithmetic patterns with intrinsics.
Halide::Internal::lower_intrinsic
Expr lower_intrinsic(const Call *op)
Replace one of the above ops with equivalent arithmetic.
Halide::Internal::lower_rounding_mul_shift_right
Expr lower_rounding_mul_shift_right(const Expr &a, const Expr &b, const Expr &q)
Halide::Internal::lower_widening_mul
Expr lower_widening_mul(const Expr &a, const Expr &b)
Halide::Internal::lower_saturating_sub
Expr lower_saturating_sub(const Expr &a, const Expr &b)
Halide::Internal::lower_rounding_shift_left
Expr lower_rounding_shift_left(const Expr &a, const Expr &b)
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258
Halide::Internal::Call
A function call.
Definition IR.h:490
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427
Halide::Type
Types in the halide type system.
Definition Type.h:283