Halide
Halide::Internal::IRMatcher::MatcherState Struct Reference

To save stack space, the matcher objects are largely stateless and immutable. More...

#include <IRMatch.h>

Public Member Functions

HALIDE_ALWAYS_INLINE void set_binding (int i, const BaseExprNode &n) noexcept
 
const HALIDE_ALWAYS_INLINE BaseExprNodeget_binding (int i) const noexcept
 
HALIDE_ALWAYS_INLINE void set_bound_const (int i, int64_t s, halide_type_t t) noexcept
 
HALIDE_ALWAYS_INLINE void set_bound_const (int i, uint64_t u, halide_type_t t) noexcept
 
HALIDE_ALWAYS_INLINE void set_bound_const (int i, double f, halide_type_t t) noexcept
 
HALIDE_ALWAYS_INLINE void set_bound_const (int i, halide_scalar_value_t val, halide_type_t t) noexcept
 
HALIDE_ALWAYS_INLINE void get_bound_const (int i, halide_scalar_value_t &val, halide_type_t &type) const noexcept
 
HALIDE_ALWAYS_INLINE MatcherState () noexcept
 

Public Attributes

const BaseExprNodebindings [max_wild]
 
halide_scalar_value_t bound_const [max_wild]
 
halide_type_t bound_const_type [max_wild]
 

Static Public Attributes

static constexpr uint16_t signed_integer_overflow = 0x8000
 
static constexpr uint16_t special_values_mask = 0x8000
 

Detailed Description

To save stack space, the matcher objects are largely stateless and immutable.

This state object is built up during matching and then consumed when constructing a replacement Expr.

Definition at line 76 of file IRMatch.h.

Constructor & Destructor Documentation

◆ MatcherState()

HALIDE_ALWAYS_INLINE Halide::Internal::IRMatcher::MatcherState::MatcherState ( )
inlinenoexcept

Definition at line 127 of file IRMatch.h.

Member Function Documentation

◆ set_binding()

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::MatcherState::set_binding ( int  i,
const BaseExprNode n 
)
inlinenoexcept

Definition at line 87 of file IRMatch.h.

Referenced by Halide::Internal::IRMatcher::fuzz_test_rule().

◆ get_binding()

const HALIDE_ALWAYS_INLINE BaseExprNode* Halide::Internal::IRMatcher::MatcherState::get_binding ( int  i) const
inlinenoexcept

◆ set_bound_const() [1/4]

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::MatcherState::set_bound_const ( int  i,
int64_t  s,
halide_type_t  t 
)
inlinenoexcept

◆ set_bound_const() [2/4]

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::MatcherState::set_bound_const ( int  i,
uint64_t  u,
halide_type_t  t 
)
inlinenoexcept

◆ set_bound_const() [3/4]

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::MatcherState::set_bound_const ( int  i,
double  f,
halide_type_t  t 
)
inlinenoexcept

◆ set_bound_const() [4/4]

HALIDE_ALWAYS_INLINE void Halide::Internal::IRMatcher::MatcherState::set_bound_const ( int  i,
halide_scalar_value_t  val,
halide_type_t  t 
)
inlinenoexcept

Definition at line 115 of file IRMatch.h.

References bound_const, and bound_const_type.

◆ get_bound_const()

Member Data Documentation

◆ bindings

const BaseExprNode* Halide::Internal::IRMatcher::MatcherState::bindings[max_wild]

Definition at line 77 of file IRMatch.h.

◆ bound_const

halide_scalar_value_t Halide::Internal::IRMatcher::MatcherState::bound_const[max_wild]

Definition at line 78 of file IRMatch.h.

Referenced by get_bound_const(), and set_bound_const().

◆ signed_integer_overflow

◆ special_values_mask

◆ bound_const_type

halide_type_t Halide::Internal::IRMatcher::MatcherState::bound_const_type[max_wild]

Definition at line 84 of file IRMatch.h.

Referenced by get_bound_const(), and set_bound_const().


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