Halide
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
 
b
 

Static Public Attributes

constexpr static uint32_t binds = bindings<A>::mask | bindings<B>::mask
 
constexpr static IRNodeType min_node_type = Op::_node_type
 
constexpr static IRNodeType max_node_type = Op::_node_type
 
constexpr static bool canonical
 
constexpr static 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 751 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
inlinenoexcept

◆ 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
inlinenoexcept

◆ make_folded_const()

◆ make()

Member Data Documentation

◆ a

◆ b

◆ binds

template<typename Op , typename A , typename B >
constexpr static uint32_t Halide::Internal::IRMatcher::CmpOp< Op, A, B >::binds = bindings<A>::mask | bindings<B>::mask
staticconstexpr

Definition at line 756 of file IRMatch.h.

◆ min_node_type

template<typename Op , typename A , typename B >
constexpr static IRNodeType Halide::Internal::IRMatcher::CmpOp< Op, A, B >::min_node_type = Op::_node_type
staticconstexpr

Definition at line 758 of file IRMatch.h.

◆ max_node_type

template<typename Op , typename A , typename B >
constexpr static IRNodeType Halide::Internal::IRMatcher::CmpOp< Op, A, B >::max_node_type = Op::_node_type
staticconstexpr

Definition at line 759 of file IRMatch.h.

◆ canonical

template<typename Op , typename A , typename B >
constexpr static bool Halide::Internal::IRMatcher::CmpOp< Op, A, B >::canonical
staticconstexpr
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))

Definition at line 760 of file IRMatch.h.

◆ foldable

template<typename Op , typename A , typename B >
constexpr static bool Halide::Internal::IRMatcher::CmpOp< Op, A, B >::foldable = A::foldable && B::foldable
staticconstexpr

Definition at line 783 of file IRMatch.h.


The documentation for this struct was generated from the following file:
Halide::Internal::IRMatcher::commutative
constexpr bool commutative(IRNodeType t)
Definition: IRMatch.h:627
Halide::Internal::IRNodeType::GE
@ GE
Halide::Internal::IRNodeType::GT
@ GT