Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Public Attributes | List of all members
Halide::Internal::IRMatcher::Rewriter< Instance > Struct Template Reference

`#include <IRMatch.h>`

## Public Member Functions
HALIDE_ALWAYS_INLINE | Rewriter (Instance instance, halide_type_t ot, halide_type_t wt)
template<typename After >
HALIDE_NEVER_INLINE void | build_replacement (After after)
template<typename Before , typename After , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<After>::type>
HALIDE_ALWAYS_INLINE bool | operator() (Before before, After after)
template<typename Before , typename = typename enable_if_pattern<Before>::type>
HALIDE_ALWAYS_INLINE bool | operator() (Before before, const Expr &after) noexcept
template<typename Before , typename = typename enable_if_pattern<Before>::type>
HALIDE_ALWAYS_INLINE bool | operator() (Before before, int64_t after) noexcept
template<typename Before , typename After , typename Predicate , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<After>::type, typename = typename enable_if_pattern<Predicate>::type>
HALIDE_ALWAYS_INLINE bool | operator() (Before before, After after, Predicate pred)
template<typename Before , typename Predicate , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<Predicate>::type>
HALIDE_ALWAYS_INLINE bool | operator() (Before before, const Expr &after, Predicate pred)
template<typename Before , typename Predicate , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<Predicate>::type>
HALIDE_ALWAYS_INLINE bool | operator() (Before before, int64_t after, Predicate pred)

## Public Attributes
Instance | instance
Expr | result
MatcherState | state
halide_type_t | output_type
halide_type_t | wildcard_type
bool | validate

## Detailed Description

template<typename Instance>
struct Halide::Internal::IRMatcher::Rewriter< Instance >

Definition at line 2924 of file IRMatch.h.

## Constructor & Destructor Documentation

## ◆ Rewriter()

template<typename Instance >

HALIDE_ALWAYS_INLINE Halide::Internal::IRMatcher::Rewriter< Instance >::Rewriter | ( | Instance | instance,
|  | halide_type_t | ot,
|  | halide_type_t | wt
| ) |  |
| inline

Definition at line 2932 of file IRMatch.h.

## Member Function Documentation

## ◆ build_replacement()

template<typename Instance >
template<typename After >

HALIDE_NEVER_INLINE void Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement | ( | After | after | ) |
| inline

Definition at line 2937 of file IRMatch.h.

References debug, Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::IRMatcher::Rewriter< Instance >::output_type, Halide::Internal::IRMatcher::Rewriter< Instance >::result, and Halide::Internal::IRMatcher::Rewriter< Instance >::state.

Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().

## ◆ operator()() [1/6]

template<typename Instance >
template<typename Before , typename After , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<After>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Rewriter< Instance >::operator() | ( | Before | before,
|  | After | after
| ) |  |
| inline

Definition at line 2948 of file IRMatch.h.

References Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), debug, Halide::Internal::IRMatcher::fuzz_test_rule(), Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::IRMatcher::Rewriter< Instance >::output_type, Halide::Internal::IRMatcher::Rewriter< Instance >::result, Halide::Internal::IRMatcher::Rewriter< Instance >::state, Halide::Internal::IRMatcher::unwrap(), and Halide::Internal::IRMatcher::Rewriter< Instance >::wildcard_type.

## ◆ operator()() [2/6]

template<typename Instance >
template<typename Before , typename = typename enable_if_pattern<Before>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Rewriter< Instance >::operator() | ( | Before | before,
|  | const Expr & | after
| ) |  |
| inline noexcept

Definition at line 2971 of file IRMatch.h.

References debug, Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::IRMatcher::Rewriter< Instance >::result, Halide::Internal::IRMatcher::Rewriter< Instance >::state, and Halide::Internal::IRMatcher::unwrap().

## ◆ operator()() [3/6]

template<typename Instance >
template<typename Before , typename = typename enable_if_pattern<Before>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Rewriter< Instance >::operator() | ( | Before | before,
|  | int64_t | after
| ) |  |
| inline noexcept

Definition at line 2989 of file IRMatch.h.

References debug, Halide::Internal::IRMatcher::fuzz_test_rule(), Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::make_const(), Halide::Internal::IRMatcher::Rewriter< Instance >::output_type, Halide::Internal::IRMatcher::Rewriter< Instance >::result, Halide::Internal::IRMatcher::Rewriter< Instance >::state, Halide::Internal::IRMatcher::unwrap(), and Halide::Internal::IRMatcher::Rewriter< Instance >::wildcard_type.

## ◆ operator()() [4/6]

template<typename Instance >
template<typename Before , typename After , typename Predicate , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<After>::type, typename = typename enable_if_pattern<Predicate>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Rewriter< Instance >::operator() | ( | Before | before,
|  | After | after,
|  | Predicate | pred
| ) |  |
| inline

Definition at line 3014 of file IRMatch.h.

References Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), debug, Halide::Internal::IRMatcher::evaluate_predicate(), Halide::Internal::IRMatcher::fuzz_test_rule(), Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::IRMatcher::Rewriter< Instance >::output_type, Halide::Internal::IRMatcher::Rewriter< Instance >::result, Halide::Internal::IRMatcher::Rewriter< Instance >::state, Halide::Internal::IRMatcher::unwrap(), and Halide::Internal::IRMatcher::Rewriter< Instance >::wildcard_type.

## ◆ operator()() [5/6]

template<typename Instance >
template<typename Before , typename Predicate , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<Predicate>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Rewriter< Instance >::operator() | ( | Before | before,
|  | const Expr & | after,
|  | Predicate | pred
| ) |  |
| inline

Definition at line 3043 of file IRMatch.h.

References debug, Halide::Internal::IRMatcher::evaluate_predicate(), Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::IRMatcher::Rewriter< Instance >::result, Halide::Internal::IRMatcher::Rewriter< Instance >::state, and Halide::Internal::IRMatcher::unwrap().

## ◆ operator()() [6/6]

template<typename Instance >
template<typename Before , typename Predicate , typename = typename enable_if_pattern<Before>::type, typename = typename enable_if_pattern<Predicate>::type>

HALIDE_ALWAYS_INLINE bool Halide::Internal::IRMatcher::Rewriter< Instance >::operator() | ( | Before | before,
|  | int64_t | after,
|  | Predicate | pred
| ) |  |
| inline

Definition at line 3066 of file IRMatch.h.

References debug, Halide::Internal::IRMatcher::evaluate_predicate(), Halide::Internal::IRMatcher::fuzz_test_rule(), Halide::Internal::IRMatcher::Rewriter< Instance >::instance, Halide::Internal::make_const(), Halide::Internal::IRMatcher::Rewriter< Instance >::output_type, Halide::Internal::IRMatcher::Rewriter< Instance >::result, Halide::Internal::IRMatcher::Rewriter< Instance >::state, Halide::Internal::IRMatcher::unwrap(), and Halide::Internal::IRMatcher::Rewriter< Instance >::wildcard_type.

## Member Data Documentation

## ◆ instance

template<typename Instance >

Instance Halide::Internal::IRMatcher::Rewriter< Instance >::instance

Definition at line 2925 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), and Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().

## ◆ result

template<typename Instance >

Expr Halide::Internal::IRMatcher::Rewriter< Instance >::result

Definition at line 2926 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), and Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().

## ◆ state

template<typename Instance >

MatcherState Halide::Internal::IRMatcher::Rewriter< Instance >::state

Definition at line 2927 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), and Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().

## ◆ output_type

template<typename Instance >

halide_type_t Halide::Internal::IRMatcher::Rewriter< Instance >::output_type

Definition at line 2928 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), and Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().

## ◆ wildcard_type

template<typename Instance >

halide_type_t Halide::Internal::IRMatcher::Rewriter< Instance >::wildcard_type

Definition at line 2928 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::Rewriter< Instance >::operator()().

## ◆ validate

template<typename Instance >

bool Halide::Internal::IRMatcher::Rewriter< Instance >::validate

Definition at line 2929 of file IRMatch.h.

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

- src/IRMatch.h