Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
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 Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b, Halide::Internal::IRMatcher::cast(), and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match().

Referenced by Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match(), and Halide::Internal::IRMatcher::CmpOp< Op, A, B >::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 Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b, Halide::Internal::IRMatcher::cast(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::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 Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b, Halide::Internal::IRMatcher::cast(), halide_type_bfloat, halide_type_float, halide_type_int, halide_type_uint, 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 801 of file IRMatch.h.

References Halide::Internal::IRMatcher::CmpOp< Op, A, B >::a, Halide::Internal::IRMatcher::CmpOp< Op, A, B >::b, and Halide::Internal::IRMatcher::cast().

## 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 Halide::Internal::IRMatcher::CmpOp< Op, A, B >::make(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::make_folded_const(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::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 Halide::Internal::IRMatcher::CmpOp< Op, A, B >::make(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::make_folded_const(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::match(), Halide::Internal::IRMatcher::CmpOp< Op, A, B >::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 >

constexpr 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 >

constexpr 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 >

constexpr 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 >

constexpr 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
Halide::Internal::IRNodeType::GE
@ GE

Definition at line 740 of file IRMatch.h.

## ◆ foldable

template<typename Op , typename A , typename B >

constexpr 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