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::Intrin< intrin, Args > Struct Template Reference

`#include <IRMatch.h>`

## Classes
struct | pattern_tag

## Public Member Functions
template<int i, uint32_t bound, typename = std::enable_if_t<(i < sizeof...(Args))>>
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 = std::enable_if_t<(i < sizeof...(Args))>>
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 1340 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 1503 of file IRMatch.h.

## Member Function Documentation

## ◆ match_args() [1/2]

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

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

Definition at line 1358 of file IRMatch.h.

References Halide::Internal::IRMatcher::Intrin< intrin, Args >::args, Halide::Internal::IRMatcher::cast(), and Halide::Internal::IRMatcher::Intrin< intrin, Args >::match_args().

Referenced by Halide::Internal::IRMatcher::Intrin< intrin, Args >::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 1365 of file IRMatch.h.

## ◆ 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 1370 of file IRMatch.h.

References Halide::Internal::Call, Halide::Internal::IRMatcher::cast(), Halide::Internal::Call::is_intrinsic(), and Halide::Internal::IRMatcher::Intrin< intrin, Args >::optional_type_hint.

## ◆ print_args() [1/3]

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

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

Definition at line 1382 of file IRMatch.h.

References Halide::Internal::IRMatcher::Intrin< intrin, Args >::args, and Halide::Internal::IRMatcher::cast().

Referenced by Halide::Internal::IRMatcher::operator<<().

## ◆ 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 1391 of file IRMatch.h.

## ◆ 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 1395 of file IRMatch.h.

References Halide::Internal::IRMatcher::cast().

## ◆ 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 1400 of file IRMatch.h.

References Halide::Internal::Call::abs, Halide::Internal::IRMatcher::abs(), Halide::Internal::Call::absd, Halide::Internal::IRMatcher::absd(), Halide::Internal::IRMatcher::Intrin< intrin, Args >::args, Halide::Internal::IRMatcher::cast(), 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(), Halide::Internal::IRMatcher::Intrin< intrin, Args >::make(), Halide::Internal::Call::mul_shift_right, Halide::Internal::IRMatcher::mul_shift_right(), Halide::Internal::IRMatcher::Intrin< intrin, Args >::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 Halide::Internal::IRMatcher::Intrin< intrin, Args >::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 1460 of file IRMatch.h.

References Halide::Internal::IRMatcher::Intrin< intrin, Args >::args, Halide::Internal::IRMatcher::cast(), halide_type_t::code, halide_type_int, internal_error, Halide::Internal::Call::shift_left, and Halide::Internal::Call::shift_right.

## Member Data Documentation

## ◆ args

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

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

Definition at line 1342 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Intrin< intrin, Args >::make(), Halide::Internal::IRMatcher::Intrin< intrin, Args >::make_folded_const(), Halide::Internal::IRMatcher::Intrin< intrin, Args >::match_args(), and Halide::Internal::IRMatcher::Intrin< intrin, Args >::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 1347 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Intrin< intrin, Args >::make(), Halide::Internal::IRMatcher::Intrin< intrin, Args >::match(), and Halide::Internal::IRMatcher::saturating_cast().

## ◆ binds

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

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

Definition at line 1349 of file IRMatch.h.

## ◆ min_node_type

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

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

Definition at line 1351 of file IRMatch.h.

## ◆ max_node_type

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

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

Definition at line 1352 of file IRMatch.h.

## ◆ canonical

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

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

Definition at line 1353 of file IRMatch.h.

## ◆ foldable

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

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

Definition at line 1458 of file IRMatch.h.

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

- src/IRMatch.h