Loading...
Searching...
No Matches
Halide::Internal::IRMatcher::CmpOp< Op, A, B > Struct Template Reference

`#include <IRMatch.h>`

## Classes

struct | pattern_tag

## Public Member Functions

template<uint32_t bound>
HALIDE_ALWAYS_INLINE bool | match (const BaseExprNode &e, MatcherState &state) const noexcept
template<uint32_t bound, typename Op2, typename A2, typename B2>
HALIDE_ALWAYS_INLINE bool | match (const CmpOp< Op2, A2, B2 > &op, MatcherState &state) const noexcept
HALIDE_ALWAYS_INLINE void | make_folded_const (halide_scalar_value_t &val, halide_type_t &ty, MatcherState &state) const noexcept
HALIDE_ALWAYS_INLINE Expr | make (MatcherState &state, halide_type_t type_hint) const

## Public Attributes

A | a
B | b

## Static Public Attributes

static constexpr uint32_t | binds = bindings<A>::mask | bindings<B>::mask
static constexpr IRNodeType | min_node_type = Op::_node_type
static constexpr IRNodeType | max_node_type = Op::_node_type
static constexpr bool | canonical
static constexpr bool | foldable = A::foldable && B::foldable

## Detailed Description

template<typename Op, typename A, typename B>
struct Halide::Internal::IRMatcher::CmpOp< Op, A, B >

Definition at line 731 of file IRMatch.h.

## Member Function Documentation

## match() [1/2]

template<typename Op, typename A, typename B>
template<uint32_t bound>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match | ( | const BaseExprNode & | e,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 747 of file IRMatch.h.

References a, b, HALIDE_ALWAYS_INLINE, Halide::Internal::IRMatcher::bindings< T >::mask, and match().

Referenced by match(), and match().

## match() [2/2]

template<typename Op, typename A, typename B>
template<uint32_t bound, typename Op2, typename A2, typename B2>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match | ( | const CmpOp< Op2, A2, B2 > & | op,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 757 of file IRMatch.h.

References a, b, HALIDE_ALWAYS_INLINE, Halide::Internal::IRMatcher::bindings< T >::mask, match(), and Halide::Internal::IRMatcher::unwrap().

## make_folded_const()

template<typename Op, typename A, typename B>

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::CmpOp< Op, A, B >::make_folded_const | ( | halide_scalar_value_t & | val,
|  | halide_type_t & | ty,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 766 of file IRMatch.h.

References a, b, Halide::Internal::IRMatcher::constant_fold_cmp_op(), halide_scalar_value_t::f64, halide_type_bfloat, halide_type_float, halide_type_int, halide_type_uint, halide_scalar_value_t::i64, halide_scalar_value_t::u, and halide_scalar_value_t::u64.

## make()

template<typename Op, typename A, typename B>

HALIDE_ALWAYS_INLINE Expr Halide::Internal::IRMatcher::CmpOp< Op, A, B >::make | ( | MatcherState & | state,
|  | halide_type_t | type_hint ) const

inline

Definition at line 800 of file IRMatch.h.

References a, b, and Halide::Expr::type().

## Member Data Documentation

## a

template<typename Op, typename A, typename B>

A Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a

Definition at line 733 of file IRMatch.h.

Referenced by make(), make_folded_const(), match(), match(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), and Halide::Internal::IRMatcher::operator<<().

## b

template<typename Op, typename A, typename B>

B Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b

Definition at line 734 of file IRMatch.h.

Referenced by make(), make_folded_const(), match(), match(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), Halide::Internal::IRMatcher::operator<<(), and Halide::Internal::IRMatcher::operator<<().

## binds

template<typename Op, typename A, typename B>

uint32_t Halide::Internal::IRMatcher::CmpOp< Op, A, B >::binds = bindings<A>::mask | bindings<B>::mask

static constexpr

Definition at line 736 of file IRMatch.h.

## min_node_type

template<typename Op, typename A, typename B>

IRNodeType Halide::Internal::IRMatcher::CmpOp< Op, A, B >::min_node_type = Op::_node_type

static constexpr

Definition at line 738 of file IRMatch.h.

## max_node_type

template<typename Op, typename A, typename B>

IRNodeType Halide::Internal::IRMatcher::CmpOp< Op, A, B >::max_node_type = Op::_node_type

static constexpr

Definition at line 739 of file IRMatch.h.

## canonical

template<typename Op, typename A, typename B>

bool Halide::Internal::IRMatcher::CmpOp< Op, A, B >::canonical

static constexpr

Initial value:
= (A::canonical &&
B::canonical &&
(!commutative(Op::_node_type) || A::max_node_type >= B::min_node_type) &&
(Op::_node_type != IRNodeType::GE) &&
(Op::_node_type != IRNodeType::GT))
Halide::Internal::IRMatcher::commutative
constexpr bool commutative(IRNodeType t)
Definition IRMatch.h:615
Halide::Internal::IRNodeType::GT
@ GT
Definition Expr.h:49
Halide::Internal::IRNodeType::GE
@ GE
Definition Expr.h:50

Definition at line 740 of file IRMatch.h.

## foldable

template<typename Op, typename A, typename B>

bool Halide::Internal::IRMatcher::CmpOp< Op, A, B >::foldable = A::foldable && B::foldable

static constexpr

Definition at line 763 of file IRMatch.h.

The documentation for this struct was generated from the following file:

- src/IRMatch.h