Halide
12.0.1
Halide compiler and libraries
|
An alternative template-metaprogramming approach to expression matching. More...
Classes | |
struct | MatcherState |
To save stack space, the matcher objects are largely stateless and immutable. More... | |
struct | enable_if_pattern |
struct | bindings |
struct | SpecificExpr |
struct | WildConstInt |
struct | WildConstUInt |
struct | WildConstFloat |
struct | WildConst |
struct | Wild |
struct | IntLiteral |
struct | BinOp |
struct | CmpOp |
struct | Intrin |
struct | NotOp |
struct | SelectOp |
struct | BroadcastOp |
struct | RampOp |
struct | VectorReduceOp |
struct | NegateOp |
struct | CastOp |
struct | Fold |
struct | Overflows |
struct | Overflow |
struct | IsConst |
struct | CanProve |
struct | IsFloat |
struct | IsInt |
struct | IsUInt |
struct | IsScalar |
struct | IsMaxValue |
struct | IsMinValue |
struct | Rewriter |
Functions | |
HALIDE_NEVER_INLINE Expr | make_const_special_expr (halide_type_t ty) |
HALIDE_ALWAYS_INLINE Expr | make_const_expr (halide_scalar_value_t val, halide_type_t ty) |
bool | equal_helper (const BaseExprNode &a, const BaseExprNode &b) noexcept |
HALIDE_ALWAYS_INLINE bool | equal (const BaseExprNode &a, const BaseExprNode &b) noexcept |
std::ostream & | operator<< (std::ostream &s, const SpecificExpr &e) |
template<int i> | |
std::ostream & | operator<< (std::ostream &s, const WildConstInt< i > &c) |
template<int i> | |
std::ostream & | operator<< (std::ostream &s, const WildConstUInt< i > &c) |
template<int i> | |
std::ostream & | operator<< (std::ostream &s, const WildConstFloat< i > &c) |
template<int i> | |
std::ostream & | operator<< (std::ostream &s, const WildConst< i > &c) |
template<int i> | |
std::ostream & | operator<< (std::ostream &s, const Wild< i > &op) |
HALIDE_ALWAYS_INLINE int64_t | unwrap (IntLiteral t) |
template<typename T , typename = typename std::decay<T>::type::pattern_tag> | |
HALIDE_ALWAYS_INLINE T | pattern_arg (T t) |
HALIDE_ALWAYS_INLINE IntLiteral | pattern_arg (int64_t x) |
template<typename T > | |
HALIDE_ALWAYS_INLINE void | assert_is_lvalue_if_expr () |
HALIDE_ALWAYS_INLINE SpecificExpr | pattern_arg (const Expr &e) |
template<typename T , typename = typename std::decay<T>::type::pattern_tag, typename = typename std::enable_if<!std::is_same<typename std::decay<T>::type, SpecificExpr>::value>::type> | |
HALIDE_ALWAYS_INLINE T | unwrap (T t) |
HALIDE_ALWAYS_INLINE const BaseExprNode & | unwrap (const SpecificExpr &e) |
std::ostream & | operator<< (std::ostream &s, const IntLiteral &op) |
template<typename Op > | |
int64_t | constant_fold_bin_op (halide_type_t &, int64_t, int64_t) noexcept |
template<typename Op > | |
uint64_t | constant_fold_bin_op (halide_type_t &, uint64_t, uint64_t) noexcept |
template<typename Op > | |
double | constant_fold_bin_op (halide_type_t &, double, double) noexcept |
constexpr bool | commutative (IRNodeType t) |
template<typename Op > | |
uint64_t | constant_fold_cmp_op (int64_t, int64_t) noexcept |
template<typename Op > | |
uint64_t | constant_fold_cmp_op (uint64_t, uint64_t) noexcept |
template<typename Op > | |
uint64_t | constant_fold_cmp_op (double, double) noexcept |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Add, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Sub, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Mul, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Div, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< And, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Or, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Min, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Max, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const CmpOp< LE, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const CmpOp< LT, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const CmpOp< GE, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const CmpOp< GT, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const CmpOp< EQ, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const CmpOp< NE, A, B > &op) |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BinOp< Mod, A, B > &op) |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator+ (A &&a, B &&b) noexcept -> BinOp< Add, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | add (A &&a, B &&b) -> decltype(IRMatcher::operator+(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Add > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Add > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Add > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator- (A &&a, B &&b) noexcept -> BinOp< Sub, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | sub (A &&a, B &&b) -> decltype(IRMatcher::operator-(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Sub > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Sub > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Sub > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator* (A &&a, B &&b) noexcept -> BinOp< Mul, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | mul (A &&a, B &&b) -> decltype(IRMatcher::operator*(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Mul > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Mul > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Mul > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator/ (A &&a, B &&b) noexcept -> BinOp< Div, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | div (A &&a, B &&b) -> decltype(IRMatcher::operator/(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Div > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Div > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Div > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator% (A &&a, B &&b) noexcept -> BinOp< Mod, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | mod (A &&a, B &&b) -> decltype(IRMatcher::operator%(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Mod > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Mod > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Mod > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | min (A &&a, B &&b) noexcept -> BinOp< Min, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Min > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Min > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Min > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | max (A &&a, B &&b) noexcept -> BinOp< Max, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Max > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Max > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Max > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator< (A &&a, B &&b) noexcept -> CmpOp< LT, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | lt (A &&a, B &&b) -> decltype(IRMatcher::operator<(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< LT > (int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< LT > (uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< LT > (double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator> (A &&a, B &&b) noexcept -> CmpOp< GT, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | gt (A &&a, B &&b) -> decltype(IRMatcher::operator>(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< GT > (int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< GT > (uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< GT > (double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator<= (A &&a, B &&b) noexcept -> CmpOp< LE, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | le (A &&a, B &&b) -> decltype(IRMatcher::operator<=(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< LE > (int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< LE > (uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< LE > (double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator>= (A &&a, B &&b) noexcept -> CmpOp< GE, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | ge (A &&a, B &&b) -> decltype(IRMatcher::operator>=(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< GE > (int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< GE > (uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< GE > (double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator== (A &&a, B &&b) noexcept -> CmpOp< EQ, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | eq (A &&a, B &&b) -> decltype(IRMatcher::operator==(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< EQ > (int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< EQ > (uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< EQ > (double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator!= (A &&a, B &&b) noexcept -> CmpOp< NE, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | ne (A &&a, B &&b) -> decltype(IRMatcher::operator!=(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< NE > (int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< NE > (uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_cmp_op< NE > (double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator|| (A &&a, B &&b) noexcept -> BinOp< Or, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | or_op (A &&a, B &&b) -> decltype(IRMatcher::operator||(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< Or > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< Or > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< Or > (halide_type_t &t, double a, double b) noexcept |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | operator&& (A &&a, B &&b) noexcept -> BinOp< And, decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | and_op (A &&a, B &&b) -> decltype(IRMatcher::operator&&(a, b)) |
template<> | |
HALIDE_ALWAYS_INLINE int64_t | constant_fold_bin_op< And > (halide_type_t &t, int64_t a, int64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE uint64_t | constant_fold_bin_op< And > (halide_type_t &t, uint64_t a, uint64_t b) noexcept |
template<> | |
HALIDE_ALWAYS_INLINE double | constant_fold_bin_op< And > (halide_type_t &t, double a, double b) noexcept |
constexpr uint32_t | bitwise_or_reduce () |
template<typename... Args> | |
constexpr uint32_t | bitwise_or_reduce (uint32_t first, Args... rest) |
constexpr bool | and_reduce () |
template<typename... Args> | |
constexpr bool | and_reduce (bool first, Args... rest) |
constexpr int | const_min (int a, int b) |
template<typename... Args> | |
std::ostream & | operator<< (std::ostream &s, const Intrin< Args... > &op) |
template<typename... Args> | |
HALIDE_ALWAYS_INLINE auto | intrin (Call::IntrinsicOp intrinsic_op, Args... args) noexcept -> Intrin< decltype(pattern_arg(args))... > |
template<typename A , typename B > | |
auto | widening_add (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | widening_sub (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | widening_mul (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | saturating_add (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | saturating_sub (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | halving_add (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | halving_sub (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | rounding_halving_add (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | rounding_halving_sub (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | shift_left (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | shift_right (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | rounding_shift_left (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B > | |
auto | rounding_shift_right (A &&a, B &&b) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b))> |
template<typename A , typename B , typename C > | |
auto | mul_shift_right (A &&a, B &&b, C &&c) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b)), decltype(pattern_arg(c))> |
template<typename A , typename B , typename C > | |
auto | rounding_mul_shift_right (A &&a, B &&b, C &&c) noexcept -> Intrin< decltype(pattern_arg(a)), decltype(pattern_arg(b)), decltype(pattern_arg(c))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | operator! (A &&a) noexcept -> NotOp< decltype(pattern_arg(a))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | not_op (A &&a) -> decltype(IRMatcher::operator!(a)) |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const NotOp< A > &op) |
template<typename C , typename T , typename F > | |
std::ostream & | operator<< (std::ostream &s, const SelectOp< C, T, F > &op) |
template<typename C , typename T , typename F > | |
HALIDE_ALWAYS_INLINE auto | select (C &&c, T &&t, F &&f) noexcept -> SelectOp< decltype(pattern_arg(c)), decltype(pattern_arg(t)), decltype(pattern_arg(f))> |
template<typename A , typename B > | |
std::ostream & | operator<< (std::ostream &s, const BroadcastOp< A, B > &op) |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | broadcast (A &&a, B lanes) noexcept -> BroadcastOp< decltype(pattern_arg(a)), decltype(pattern_arg(lanes))> |
template<typename A , typename B , typename C > | |
std::ostream & | operator<< (std::ostream &s, const RampOp< A, B, C > &op) |
template<typename A , typename B , typename C > | |
HALIDE_ALWAYS_INLINE auto | ramp (A &&a, B &&b, C &&c) noexcept -> RampOp< decltype(pattern_arg(a)), decltype(pattern_arg(b)), decltype(pattern_arg(c))> |
template<typename A , typename B , VectorReduce::Operator reduce_op> | |
std::ostream & | operator<< (std::ostream &s, const VectorReduceOp< A, B, reduce_op > &op) |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | h_add (A &&a, B lanes) noexcept -> VectorReduceOp< decltype(pattern_arg(a)), decltype(pattern_arg(lanes)), VectorReduce::Add > |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | h_min (A &&a, B lanes) noexcept -> VectorReduceOp< decltype(pattern_arg(a)), decltype(pattern_arg(lanes)), VectorReduce::Min > |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | h_max (A &&a, B lanes) noexcept -> VectorReduceOp< decltype(pattern_arg(a)), decltype(pattern_arg(lanes)), VectorReduce::Max > |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | h_and (A &&a, B lanes) noexcept -> VectorReduceOp< decltype(pattern_arg(a)), decltype(pattern_arg(lanes)), VectorReduce::And > |
template<typename A , typename B > | |
HALIDE_ALWAYS_INLINE auto | h_or (A &&a, B lanes) noexcept -> VectorReduceOp< decltype(pattern_arg(a)), decltype(pattern_arg(lanes)), VectorReduce::Or > |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const NegateOp< A > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | operator- (A &&a) noexcept -> NegateOp< decltype(pattern_arg(a))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | negate (A &&a) -> decltype(IRMatcher::operator-(a)) |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const CastOp< A > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | cast (halide_type_t t, A &&a) noexcept -> CastOp< decltype(pattern_arg(a))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | fold (A &&a) noexcept -> Fold< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const Fold< A > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | overflows (A &&a) noexcept -> Overflows< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const Overflows< A > &op) |
std::ostream & | operator<< (std::ostream &s, const Overflow &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_const (A &&a) noexcept -> IsConst< decltype(pattern_arg(a))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_const (A &&a, int64_t value) noexcept -> IsConst< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const IsConst< A > &op) |
template<typename A , typename Prover > | |
HALIDE_ALWAYS_INLINE auto | can_prove (A &&a, Prover *p) noexcept -> CanProve< decltype(pattern_arg(a)), Prover > |
template<typename A , typename Prover > | |
std::ostream & | operator<< (std::ostream &s, const CanProve< A, Prover > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_float (A &&a) noexcept -> IsFloat< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const IsFloat< A > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_int (A &&a, int bits=0) noexcept -> IsInt< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const IsInt< A > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_uint (A &&a, int bits=0) noexcept -> IsUInt< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const IsUInt< A > &op) |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_scalar (A &&a) noexcept -> IsScalar< decltype(pattern_arg(a))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_max_value (A &&a) noexcept -> IsMaxValue< decltype(pattern_arg(a))> |
template<typename A > | |
HALIDE_ALWAYS_INLINE auto | is_min_value (A &&a) noexcept -> IsMinValue< decltype(pattern_arg(a))> |
template<typename A > | |
std::ostream & | operator<< (std::ostream &s, const IsScalar< A > &op) |
template<typename Before , typename After , typename Predicate , typename = typename std::enable_if<std::decay<Before>::type::foldable && std::decay<After>::type::foldable>::type> | |
HALIDE_NEVER_INLINE void | fuzz_test_rule (Before &&before, After &&after, Predicate &&pred, halide_type_t wildcard_type, halide_type_t output_type) noexcept |
template<typename Before , typename After , typename Predicate , typename = typename std::enable_if<!(std::decay<Before>::type::foldable && std::decay<After>::type::foldable)>::type> | |
HALIDE_ALWAYS_INLINE void | fuzz_test_rule (Before &&before, After &&after, Predicate &&pred, halide_type_t, halide_type_t, int dummy=0) noexcept |
HALIDE_ALWAYS_INLINE bool | evaluate_predicate (bool x, MatcherState &) noexcept |
template<typename Pattern , typename = typename enable_if_pattern<Pattern>::type> | |
HALIDE_ALWAYS_INLINE bool | evaluate_predicate (Pattern p, MatcherState &state) |
template<typename Instance , typename = typename enable_if_pattern<Instance>::type> | |
HALIDE_ALWAYS_INLINE auto | rewriter (Instance instance, halide_type_t output_type, halide_type_t wildcard_type) noexcept -> Rewriter< decltype(pattern_arg(instance))> |
Construct a rewriter for the given instance, which may be a pattern with concrete expressions as leaves, or just an expression. More... | |
template<typename Instance , typename = typename enable_if_pattern<Instance>::type> | |
HALIDE_ALWAYS_INLINE auto | rewriter (Instance instance, halide_type_t output_type) noexcept -> Rewriter< decltype(pattern_arg(instance))> |
HALIDE_ALWAYS_INLINE auto | rewriter (const Expr &e, halide_type_t wildcard_type) noexcept -> Rewriter< decltype(pattern_arg(e))> |
HALIDE_ALWAYS_INLINE auto | rewriter (const Expr &e) noexcept -> Rewriter< decltype(pattern_arg(e))> |
Variables | |
constexpr int | max_wild = 6 |
An alternative template-metaprogramming approach to expression matching.
Potentially more efficient. We lift the expression pattern into a type, and then use force-inlined functions to generate efficient matching and reconstruction code for any pattern. Pattern elements are either one of the classes in the namespace IRMatcher, or are non-null Exprs (represented as BaseExprNode &).
Pattern elements that are fully specified by their pattern can be built into an expression using the make method. Some patterns, such as a broadcast that matches any number of lanes, don't have enough information to recreate an Expr.
|
inline |
Definition at line 149 of file IRMatch.h.
References halide_type_t::lanes, Halide::Internal::make_signed_integer_overflow(), Halide::Internal::IRMatcher::MatcherState::signed_integer_overflow, and Halide::Internal::IRMatcher::MatcherState::special_values_mask.
Referenced by Halide::Internal::IRMatcher::Overflow::make(), and make_const_expr().
HALIDE_ALWAYS_INLINE Expr Halide::Internal::IRMatcher::make_const_expr | ( | halide_scalar_value_t | val, |
halide_type_t | ty | ||
) |
Definition at line 160 of file IRMatch.h.
References halide_type_t::code, halide_scalar_value_t::f64, halide_type_bfloat, halide_type_float, halide_type_int, halide_type_uint, halide_scalar_value_t::i64, halide_type_t::lanes, Halide::Internal::Broadcast::make(), Halide::Internal::FloatImm::make(), Halide::Internal::IntImm::make(), Halide::Internal::UIntImm::make(), make_const_special_expr(), Halide::Internal::IRMatcher::MatcherState::special_values_mask, halide_scalar_value_t::u, and halide_scalar_value_t::u64.
Referenced by fuzz_test_rule(), Halide::Internal::IRMatcher::WildConstInt< i >::make(), Halide::Internal::IRMatcher::WildConstUInt< i >::make(), Halide::Internal::IRMatcher::WildConstFloat< i >::make(), Halide::Internal::IRMatcher::WildConst< i >::make(), and Halide::Internal::IRMatcher::Fold< A >::make().
|
noexcept |
Referenced by equal().
|
noexcept |
Definition at line 195 of file IRMatch.h.
References equal_helper().
Referenced by Halide::Internal::IRMatcher::SpecificExpr::match(), and Halide::Internal::IRMatcher::Wild< i >::match().
|
inline |
Definition at line 229 of file IRMatch.h.
References Halide::Internal::IRMatcher::SpecificExpr::expr.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const WildConstInt< i > & | c | ||
) |
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const WildConstUInt< i > & | c | ||
) |
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const WildConstFloat< i > & | c | ||
) |
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const WildConst< i > & | c | ||
) |
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const Wild< i > & | op | ||
) |
HALIDE_ALWAYS_INLINE int64_t Halide::Internal::IRMatcher::unwrap | ( | IntLiteral | t | ) |
Definition at line 594 of file IRMatch.h.
References Halide::Internal::IRMatcher::IntLiteral::v.
Referenced by Halide::Internal::IRMatcher::BinOp< Op, A, B >::match(), Halide::Internal::IRMatcher::BroadcastOp< A, B >::match(), Halide::Internal::IRMatcher::CastOp< A >::match(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match(), Halide::Internal::IRMatcher::NotOp< A >::match(), Halide::Internal::IRMatcher::RampOp< A, B, C >::match(), Halide::Internal::IRMatcher::SelectOp< C, T, F >::match(), Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::match(), Halide::Internal::IRMatcher::NegateOp< A >::match(), and Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().
HALIDE_ALWAYS_INLINE T Halide::Internal::IRMatcher::pattern_arg | ( | T | t | ) |
Definition at line 602 of file IRMatch.h.
Referenced by broadcast(), can_prove(), cast(), fold(), h_add(), h_and(), h_max(), h_min(), h_or(), halving_add(), halving_sub(), intrin(), is_const(), is_float(), is_int(), is_max_value(), is_min_value(), is_scalar(), is_uint(), max(), min(), mul_shift_right(), operator!(), operator!=(), operator%(), operator&&(), operator*(), operator+(), operator-(), operator/(), operator<(), operator<=(), operator==(), operator>(), operator>=(), operator||(), overflows(), ramp(), rewriter(), rounding_halving_add(), rounding_halving_sub(), rounding_mul_shift_right(), rounding_shift_left(), rounding_shift_right(), saturating_add(), saturating_sub(), select(), shift_left(), shift_right(), widening_add(), widening_mul(), and widening_sub().
HALIDE_ALWAYS_INLINE IntLiteral Halide::Internal::IRMatcher::pattern_arg | ( | int64_t | x | ) |
HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::assert_is_lvalue_if_expr | ( | ) |
HALIDE_ALWAYS_INLINE SpecificExpr Halide::Internal::IRMatcher::pattern_arg | ( | const Expr & | e | ) |
Definition at line 616 of file IRMatch.h.
References Halide::Expr::get().
HALIDE_ALWAYS_INLINE T Halide::Internal::IRMatcher::unwrap | ( | T | t | ) |
HALIDE_ALWAYS_INLINE const BaseExprNode& Halide::Internal::IRMatcher::unwrap | ( | const SpecificExpr & | e | ) |
Definition at line 632 of file IRMatch.h.
References Halide::Internal::IRMatcher::SpecificExpr::expr.
|
inline |
Definition at line 636 of file IRMatch.h.
References Halide::Internal::IRMatcher::IntLiteral::v.
|
noexcept |
|
noexcept |
|
noexcept |
|
constexpr |
Definition at line 650 of file IRMatch.h.
References Halide::Internal::Add, Halide::Internal::And, Halide::Internal::EQ, Halide::Internal::Max, Halide::Internal::Min, Halide::Internal::Mul, Halide::Internal::NE, and Halide::Internal::Or.
|
noexcept |
|
noexcept |
|
noexcept |
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Add, A, B > & | op | ||
) |
Definition at line 866 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Sub, A, B > & | op | ||
) |
Definition at line 872 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Mul, A, B > & | op | ||
) |
Definition at line 878 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Div, A, B > & | op | ||
) |
Definition at line 884 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< And, A, B > & | op | ||
) |
Definition at line 890 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Or, A, B > & | op | ||
) |
Definition at line 896 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Min, A, B > & | op | ||
) |
Definition at line 902 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Max, A, B > & | op | ||
) |
Definition at line 908 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CmpOp< LE, A, B > & | op | ||
) |
Definition at line 914 of file IRMatch.h.
References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CmpOp< LT, A, B > & | op | ||
) |
Definition at line 920 of file IRMatch.h.
References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CmpOp< GE, A, B > & | op | ||
) |
Definition at line 926 of file IRMatch.h.
References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CmpOp< GT, A, B > & | op | ||
) |
Definition at line 932 of file IRMatch.h.
References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CmpOp< EQ, A, B > & | op | ||
) |
Definition at line 938 of file IRMatch.h.
References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CmpOp< NE, A, B > & | op | ||
) |
Definition at line 944 of file IRMatch.h.
References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const BinOp< Mod, A, B > & | op | ||
) |
Definition at line 950 of file IRMatch.h.
References Halide::Internal::IRMatcher::BinOp< Op, A, B >::a, and Halide::Internal::IRMatcher::BinOp< Op, A, B >::b.
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::add | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator+(a, b)) |
Definition at line 963 of file IRMatch.h.
References operator+().
|
noexcept |
Definition at line 970 of file IRMatch.h.
References Halide::Internal::add_would_overflow(), and Halide::Internal::IRMatcher::MatcherState::signed_integer_overflow.
Referenced by fuzz_test_rule().
|
noexcept |
|
noexcept |
|
noexcept |
Definition at line 989 of file IRMatch.h.
References pattern_arg().
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::sub | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator-(a, b)) |
Definition at line 996 of file IRMatch.h.
References operator-().
|
noexcept |
Definition at line 1003 of file IRMatch.h.
References Halide::Internal::IRMatcher::MatcherState::signed_integer_overflow, and Halide::Internal::sub_would_overflow().
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::mul | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator*(a, b)) |
Definition at line 1029 of file IRMatch.h.
References operator*().
|
noexcept |
Definition at line 1036 of file IRMatch.h.
References Halide::Internal::mul_would_overflow(), and Halide::Internal::IRMatcher::MatcherState::signed_integer_overflow.
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::div | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator/(a, b)) |
Definition at line 1062 of file IRMatch.h.
References operator/().
|
noexcept |
Definition at line 1067 of file IRMatch.h.
References Halide::Internal::div_imp().
|
noexcept |
Definition at line 1072 of file IRMatch.h.
References Halide::Internal::div_imp().
|
noexcept |
Definition at line 1077 of file IRMatch.h.
References Halide::Internal::div_imp().
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::mod | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator%(a, b)) |
Definition at line 1089 of file IRMatch.h.
References operator%().
Referenced by Halide::Internal::GPUCompilationCache< ContextT, ModuleStateT >::kernel_state_setup(), and Halide::Internal::GPUCompilationCache< ContextT, ModuleStateT >::release_hold().
|
noexcept |
Definition at line 1096 of file IRMatch.h.
References Halide::Internal::mod_imp().
|
noexcept |
Definition at line 1101 of file IRMatch.h.
References Halide::Internal::mod_imp().
|
noexcept |
Definition at line 1106 of file IRMatch.h.
References Halide::Internal::mod_imp().
|
noexcept |
Definition at line 1111 of file IRMatch.h.
References pattern_arg().
Referenced by constant_fold_bin_op< Min >().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Definition at line 1133 of file IRMatch.h.
References pattern_arg().
Referenced by constant_fold_bin_op< Max >().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::lt | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator<(a, b)) |
Definition at line 1160 of file IRMatch.h.
References operator<().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::gt | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator>(a, b)) |
Definition at line 1185 of file IRMatch.h.
References operator>().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::le | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator<=(a, b)) |
Definition at line 1210 of file IRMatch.h.
References operator<=().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::ge | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator>=(a, b)) |
Definition at line 1235 of file IRMatch.h.
References operator>=().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::eq | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator==(a, b)) |
Definition at line 1260 of file IRMatch.h.
References operator==().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::ne | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator!=(a, b)) |
Definition at line 1285 of file IRMatch.h.
References operator!=().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::or_op | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator||(a, b)) |
Definition at line 1310 of file IRMatch.h.
References operator||().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::and_op | ( | A && | a, |
B && | b | ||
) | -> decltype(IRMatcher::operator&&(a, b)) |
Definition at line 1336 of file IRMatch.h.
References operator&&().
|
noexcept |
|
noexcept |
|
noexcept |
|
inlineconstexpr |
Definition at line 1356 of file IRMatch.h.
Referenced by bitwise_or_reduce().
|
constexpr |
Definition at line 1361 of file IRMatch.h.
References bitwise_or_reduce().
|
inlineconstexpr |
Definition at line 1365 of file IRMatch.h.
Referenced by and_reduce().
|
constexpr |
Definition at line 1370 of file IRMatch.h.
References and_reduce().
|
constexpr |
Definition at line 1375 of file IRMatch.h.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const Intrin< Args... > & | op | ||
) |
Definition at line 1495 of file IRMatch.h.
References Halide::Internal::IRMatcher::Intrin< Args >::intrin, and Halide::Internal::IRMatcher::Intrin< Args >::print_args().
|
noexcept |
Definition at line 1503 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 1508 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::widening_add.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1512 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::widening_sub.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1516 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::widening_mul.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1520 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::saturating_add.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1524 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::saturating_sub.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1528 of file IRMatch.h.
References Halide::Internal::Call::halving_add, and pattern_arg().
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1532 of file IRMatch.h.
References Halide::Internal::Call::halving_sub, and pattern_arg().
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1536 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::rounding_halving_add.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1540 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::rounding_halving_sub.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1544 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::shift_left.
|
noexcept |
Definition at line 1548 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::shift_right.
|
noexcept |
Definition at line 1552 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::rounding_shift_left.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1556 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::rounding_shift_right.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1560 of file IRMatch.h.
References Halide::Internal::Call::mul_shift_right, and pattern_arg().
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
Definition at line 1564 of file IRMatch.h.
References pattern_arg(), and Halide::Internal::Call::rounding_mul_shift_right.
Referenced by Halide::Internal::IRMatcher::Intrin< Args >::make().
|
noexcept |
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::not_op | ( | A && | a | ) | -> decltype(IRMatcher::operator!(a)) |
Definition at line 1615 of file IRMatch.h.
References operator!().
|
inline |
Definition at line 1621 of file IRMatch.h.
References Halide::Internal::IRMatcher::NotOp< A >::a.
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const SelectOp< C, T, F > & | op | ||
) |
Definition at line 1679 of file IRMatch.h.
References Halide::Internal::IRMatcher::SelectOp< C, T, F >::c, Halide::Internal::IRMatcher::SelectOp< C, T, F >::f, and Halide::Internal::IRMatcher::SelectOp< C, T, F >::t.
|
noexcept |
Definition at line 1685 of file IRMatch.h.
References pattern_arg().
|
inline |
Definition at line 1752 of file IRMatch.h.
References Halide::Internal::IRMatcher::BroadcastOp< A, B >::a, and Halide::Internal::IRMatcher::BroadcastOp< A, B >::lanes.
|
noexcept |
Definition at line 1758 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const RampOp< A, B, C > & | op | ||
) |
Definition at line 1816 of file IRMatch.h.
References Halide::Internal::IRMatcher::RampOp< A, B, C >::a, Halide::Internal::IRMatcher::RampOp< A, B, C >::b, and Halide::Internal::IRMatcher::RampOp< A, B, C >::lanes.
|
noexcept |
Definition at line 1822 of file IRMatch.h.
References pattern_arg().
Referenced by Halide::Internal::HexagonAlignmentAnalyzer::is_aligned_impl().
|
inline |
Definition at line 1874 of file IRMatch.h.
References Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::a, and Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::lanes.
|
noexcept |
Definition at line 1880 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 1886 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 1892 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 1898 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 1904 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const NegateOp< A > & | op | ||
) |
Definition at line 1974 of file IRMatch.h.
References Halide::Internal::IRMatcher::NegateOp< A >::a.
|
noexcept |
Definition at line 1980 of file IRMatch.h.
References pattern_arg().
HALIDE_ALWAYS_INLINE auto Halide::Internal::IRMatcher::negate | ( | A && | a | ) | -> decltype(IRMatcher::operator-(a)) |
Definition at line 1986 of file IRMatch.h.
References operator-().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CastOp< A > & | op | ||
) |
Definition at line 2026 of file IRMatch.h.
References Halide::Internal::IRMatcher::CastOp< A >::a, and Halide::Internal::IRMatcher::CastOp< A >::t.
|
noexcept |
Definition at line 2032 of file IRMatch.h.
References pattern_arg().
Referenced by cmdline::detail::lexical_cast(), and Halide::Internal::IRMatcher::CastOp< A >::make().
|
noexcept |
Definition at line 2081 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const Fold< A > & | op | ||
) |
Definition at line 2087 of file IRMatch.h.
References Halide::Internal::IRMatcher::Fold< A >::a.
|
noexcept |
Definition at line 2118 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const Overflows< A > & | op | ||
) |
Definition at line 2124 of file IRMatch.h.
References Halide::Internal::IRMatcher::Overflows< A >::a.
|
inline |
|
noexcept |
Definition at line 2200 of file IRMatch.h.
References pattern_arg().
Referenced by halide_handle_cplusplus_type::make().
|
noexcept |
Definition at line 2206 of file IRMatch.h.
References pattern_arg().
Referenced by Halide::Internal::IRMatcher::IsConst< A >::make_folded_const().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const IsConst< A > & | op | ||
) |
Definition at line 2212 of file IRMatch.h.
References Halide::Internal::IRMatcher::IsConst< A >::a, Halide::Internal::IRMatcher::IsConst< A >::check_v, and Halide::Internal::IRMatcher::IsConst< A >::v.
|
noexcept |
Definition at line 2248 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const CanProve< A, Prover > & | op | ||
) |
Definition at line 2254 of file IRMatch.h.
References Halide::Internal::IRMatcher::CanProve< A, Prover >::a.
|
noexcept |
Definition at line 2285 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const IsFloat< A > & | op | ||
) |
Definition at line 2291 of file IRMatch.h.
References Halide::Internal::IRMatcher::IsFloat< A >::a.
|
noexcept |
Definition at line 2323 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const IsInt< A > & | op | ||
) |
Definition at line 2329 of file IRMatch.h.
References Halide::Internal::IRMatcher::IsInt< A >::a, and Halide::Internal::IRMatcher::IsInt< A >::bits.
|
noexcept |
Definition at line 2365 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const IsUInt< A > & | op | ||
) |
Definition at line 2371 of file IRMatch.h.
References Halide::Internal::IRMatcher::IsUInt< A >::a, and Halide::Internal::IRMatcher::IsUInt< A >::bits.
|
noexcept |
Definition at line 2406 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 2441 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 2478 of file IRMatch.h.
References pattern_arg().
std::ostream& Halide::Internal::IRMatcher::operator<< | ( | std::ostream & | s, |
const IsScalar< A > & | op | ||
) |
Definition at line 2484 of file IRMatch.h.
References Halide::Internal::IRMatcher::IsScalar< A >::a.
|
noexcept |
Definition at line 2495 of file IRMatch.h.
References Halide::abs(), constant_fold_bin_op< Add >(), evaluate_predicate(), halide_scalar_value_t::f64, Halide::Internal::IRMatcher::MatcherState::get_binding(), Halide::Internal::IRMatcher::MatcherState::get_bound_const(), halide_type_bfloat, halide_type_float, halide_type_int, halide_type_uint, halide_scalar_value_t::i64, internal_error, halide_type_t::lanes, Halide::Internal::make_const(), make_const_expr(), max_wild, Halide::Internal::IRMatcher::MatcherState::set_binding(), Halide::Internal::IRMatcher::MatcherState::set_bound_const(), Halide::Internal::IRMatcher::MatcherState::special_values_mask, halide_scalar_value_t::u, and halide_scalar_value_t::u64.
Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().
|
noexcept |
|
noexcept |
Definition at line 2626 of file IRMatch.h.
Referenced by fuzz_test_rule(), and Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().
HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::evaluate_predicate | ( | Pattern | p, |
MatcherState & | state | ||
) |
Definition at line 2632 of file IRMatch.h.
References halide_type_t::lanes, Halide::Internal::IRMatcher::MatcherState::special_values_mask, halide_scalar_value_t::u, and halide_scalar_value_t::u64.
|
noexcept |
Construct a rewriter for the given instance, which may be a pattern with concrete expressions as leaves, or just an expression.
The second optional argument (wildcard_type) is a hint as to what the type of the wildcards is likely to be. If omitted it uses the same type as the expression itself. They are not required to be this type, but the rule will only be tested for wildcards of that type when testing is enabled.
The rewriter can be used to check to see if the instance is one of some number of patterns and if so rewrite it into another form, using its operator() method. See Simplify.cpp for a bunch of example usage.
Important: Any Exprs in patterns are captured by reference, not by value, so ensure they outlive the rewriter.
Definition at line 2833 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 2839 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 2844 of file IRMatch.h.
References pattern_arg().
|
noexcept |
Definition at line 2849 of file IRMatch.h.
References pattern_arg().
|
constexpr |
Definition at line 74 of file IRMatch.h.
Referenced by fuzz_test_rule(), Halide::Internal::IRMatcher::WildConstInt< i >::match(), Halide::Internal::IRMatcher::WildConstUInt< i >::match(), Halide::Internal::IRMatcher::WildConstFloat< i >::match(), and Halide::Internal::IRMatcher::WildConst< i >::match().