Loading...
Searching...
No Matches
Halide::Internal::IRMatcher::Intrin< intrin, Args > Struct Template Reference

`#include <IRMatch.h>`

## Classes

struct | pattern_tag

## Public Member Functions

template<int i, uint32_t bound, typename = typename std::enable_if<(i < sizeof...(Args))>::type>
HALIDE_ALWAYS_INLINE bool | match_args (int, const Call &c, MatcherState &state) const noexcept
template<int i, uint32_t binds>
HALIDE_ALWAYS_INLINE bool | match_args (double, const Call &c, MatcherState &state) const noexcept
template<uint32_t bound>
HALIDE_ALWAYS_INLINE bool | match (const BaseExprNode &e, MatcherState &state) const noexcept
template<int i, typename = typename std::enable_if<(i < sizeof...(Args))>::type>
HALIDE_ALWAYS_INLINE void | print_args (int, std::ostream &s) const
template<int i>
HALIDE_ALWAYS_INLINE void | print_args (double, std::ostream &s) const
HALIDE_ALWAYS_INLINE void | print_args (std::ostream &s) const
HALIDE_ALWAYS_INLINE Expr | make (MatcherState &state, halide_type_t type_hint) const
HALIDE_ALWAYS_INLINE void | make_folded_const (halide_scalar_value_t &val, halide_type_t &ty, MatcherState &state) const noexcept
HALIDE_ALWAYS_INLINE | Intrin (Args... args) noexcept

## Public Attributes

std::tuple< Args... > | args
OptionalIntrinType< intrin > | optional_type_hint

## Static Public Attributes

static constexpr uint32_t | binds = bitwise_or_reduce((bindings<Args>::mask)...)
static constexpr IRNodeType | min_node_type = IRNodeType::Call
static constexpr IRNodeType | max_node_type = IRNodeType::Call
static constexpr bool | canonical = and_reduce((Args::canonical)...)
static constexpr bool | foldable = true

## Detailed Description

template<Call::IntrinsicOp intrin, typename... Args>
struct Halide::Internal::IRMatcher::Intrin< intrin, Args >

Definition at line 1339 of file IRMatch.h.

## Constructor & Destructor Documentation

## Intrin()

template<Call::IntrinsicOp intrin, typename... Args>

HALIDE_ALWAYS_INLINE Halide::Internal::IRMatcher::Intrin< intrin, Args >::Intrin | ( | Args... | args | ) |

inline noexcept

Definition at line 1502 of file IRMatch.h.

References args.

## Member Function Documentation

## match_args() [1/2]

template<Call::IntrinsicOp intrin, typename... Args>
template<int i, uint32_t bound, typename = typename std::enable_if<(i < sizeof...(Args))>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Intrin< intrin, Args >::match_args | ( | int | ,
|  | const Call & | c,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 1357 of file IRMatch.h.

References Halide::Internal::Call::args, args, HALIDE_ALWAYS_INLINE, Halide::Internal::IRMatcher::bindings< T >::mask, match(), and match_args().

Referenced by match(), and match_args().

## match_args() [2/2]

template<Call::IntrinsicOp intrin, typename... Args>
template<int i, uint32_t binds>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Intrin< intrin, Args >::match_args | ( | double | ,
|  | const Call & | c,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 1364 of file IRMatch.h.

References HALIDE_ALWAYS_INLINE.

## match()

template<Call::IntrinsicOp intrin, typename... Args>
template<uint32_t bound>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Intrin< intrin, Args >::match | ( | const BaseExprNode & | e,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 1369 of file IRMatch.h.

References Halide::Internal::Call, HALIDE_ALWAYS_INLINE, Halide::Internal::Call::is_intrinsic(), match_args(), and optional_type_hint.

Referenced by match_args().

## print_args() [1/3]

template<Call::IntrinsicOp intrin, typename... Args>
template<int i, typename = typename std::enable_if<(i < sizeof...(Args))>::type>

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::Intrin< intrin, Args >::print_args | ( | int | ,
|  | std::ostream & | s ) const

inline

Definition at line 1381 of file IRMatch.h.

References args, HALIDE_ALWAYS_INLINE, and print_args().

Referenced by Halide::Internal::IRMatcher::operator<<(), print_args(), and print_args().

## print_args() [2/3]

template<Call::IntrinsicOp intrin, typename... Args>
template<int i>

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::Intrin< intrin, Args >::print_args | ( | double | ,
|  | std::ostream & | s ) const

inline

Definition at line 1390 of file IRMatch.h.

References HALIDE_ALWAYS_INLINE.

## print_args() [3/3]

template<Call::IntrinsicOp intrin, typename... Args>

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::Intrin< intrin, Args >::print_args | ( | std::ostream & | s | ) | const

inline

Definition at line 1394 of file IRMatch.h.

References print_args().

## make()

template<Call::IntrinsicOp intrin, typename... Args>

HALIDE_ALWAYS_INLINE Expr Halide::Internal::IRMatcher::Intrin< intrin, Args >::make | ( | MatcherState & | state,
|  | halide_type_t | type_hint ) const

inline

Definition at line 1399 of file IRMatch.h.

References Halide::Internal::Call::abs, Halide::Internal::IRMatcher::abs(), Halide::Internal::Call::absd, Halide::Internal::IRMatcher::absd(), args, Halide::Internal::Call::halving_add, Halide::Internal::IRMatcher::halving_add(), Halide::Internal::Call::halving_sub, Halide::Internal::IRMatcher::halving_sub(), internal_error, Halide::Internal::Call::likely, Halide::Internal::IRMatcher::likely(), Halide::Internal::Call::likely_if_innermost, Halide::Internal::IRMatcher::likely_if_innermost(), make(), Halide::Internal::Call::mul_shift_right, Halide::Internal::IRMatcher::mul_shift_right(), optional_type_hint, Halide::Internal::Call::rounding_halving_add, Halide::Internal::IRMatcher::rounding_halving_add(), Halide::Internal::Call::rounding_mul_shift_right, Halide::Internal::IRMatcher::rounding_mul_shift_right(), Halide::Internal::Call::rounding_shift_left, Halide::Internal::IRMatcher::rounding_shift_left(), Halide::Internal::Call::rounding_shift_right, Halide::Internal::IRMatcher::rounding_shift_right(), Halide::Internal::Call::saturating_add, Halide::Internal::IRMatcher::saturating_add(), Halide::Internal::Call::saturating_cast, Halide::Internal::IRMatcher::saturating_cast(), Halide::Internal::Call::saturating_sub, Halide::Internal::IRMatcher::saturating_sub(), Halide::Internal::Call::shift_left, Halide::Internal::Call::shift_right, Halide::Internal::Call::widen_right_add, Halide::Internal::IRMatcher::widen_right_add(), Halide::Internal::Call::widen_right_mul, Halide::Internal::IRMatcher::widen_right_mul(), Halide::Internal::Call::widen_right_sub, Halide::Internal::IRMatcher::widen_right_sub(), Halide::Internal::Call::widening_add, Halide::Internal::IRMatcher::widening_add(), Halide::Internal::Call::widening_mul, Halide::Internal::IRMatcher::widening_mul(), Halide::Internal::Call::widening_sub, and Halide::Internal::IRMatcher::widening_sub().

Referenced by make().

## make_folded_const()

template<Call::IntrinsicOp intrin, typename... Args>

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::Intrin< intrin, Args >::make_folded_const | ( | halide_scalar_value_t & | val,
|  | halide_type_t & | ty,
|  | MatcherState & | state ) const

inline noexcept

Definition at line 1459 of file IRMatch.h.

References args, halide_type_t::code, HALIDE_ALWAYS_INLINE, halide_type_int, halide_scalar_value_t::i64, internal_error, Halide::Internal::Call::shift_left, Halide::Internal::Call::shift_right, and halide_scalar_value_t::u.

## Member Data Documentation

## args

template<Call::IntrinsicOp intrin, typename... Args>

std::tuple<Args...> Halide::Internal::IRMatcher::Intrin< intrin, Args >::args

Definition at line 1341 of file IRMatch.h.

Referenced by Intrin(), make(), make_folded_const(), match_args(), and print_args().

## optional_type_hint

template<Call::IntrinsicOp intrin, typename... Args>

OptionalIntrinType<intrin> Halide::Internal::IRMatcher::Intrin< intrin, Args >::optional_type_hint

Definition at line 1346 of file IRMatch.h.

Referenced by make(), and match().

## binds

template<Call::IntrinsicOp intrin, typename... Args>

uint32_t Halide::Internal::IRMatcher::Intrin< intrin, Args >::binds = bitwise_or_reduce((bindings<Args>::mask)...)

static constexpr

Definition at line 1348 of file IRMatch.h.

## min_node_type

template<Call::IntrinsicOp intrin, typename... Args>

IRNodeType Halide::Internal::IRMatcher::Intrin< intrin, Args >::min_node_type = IRNodeType::Call

static constexpr

Definition at line 1350 of file IRMatch.h.

## max_node_type

template<Call::IntrinsicOp intrin, typename... Args>

IRNodeType Halide::Internal::IRMatcher::Intrin< intrin, Args >::max_node_type = IRNodeType::Call

static constexpr

Definition at line 1351 of file IRMatch.h.

## canonical

template<Call::IntrinsicOp intrin, typename... Args>

bool Halide::Internal::IRMatcher::Intrin< intrin, Args >::canonical = and_reduce((Args::canonical)...)

static constexpr

Definition at line 1352 of file IRMatch.h.

## foldable

template<Call::IntrinsicOp intrin, typename... Args>

bool Halide::Internal::IRMatcher::Intrin< intrin, Args >::foldable = true

static constexpr

Definition at line 1457 of file IRMatch.h.

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

- src/IRMatch.h