Pattern variable container.
More...
#include <pattern_match.h>
|
| void | InitMatch_ () const |
| |
| bool | Match_ (const T &value) const |
| |
| template<typename NodeRefType , typename = typename std::enable_if< !std::is_same<NodeRefType, T>::value && std::is_base_of<ffi::ObjectRef, NodeRefType>::value && std::is_base_of<ffi::ObjectRef, T>::value>::type> |
| bool | Match_ (const NodeRefType &value) const |
| |
| T | Eval () const |
| |
| T | EvalOr (const T &default_value) const |
| |
| bool | Match (const NodeType &value) const |
| | Check if value matches the current pattern.
|
| |
| bool | Match (const NodeType &value, Condition cond) const |
| | Check if value matches the current pattern.
|
| |
| const PVar< T > & | derived () const |
| |
|
| std::optional< T > | value_ |
| | The matched value.
|
| |
template<typename T>
class tvm::PVar< T >
Pattern variable container.
PVar is used as a "hole" in the pattern that can be matched.
- Template Parameters
-
- Note
- PVar is not thread safe. Do not use the same PVar in multiple threads.
◆ Nested
◆ Eval()
◆ EvalOr()
template<typename T >
| T tvm::PVar< T >::EvalOr |
( |
const T & |
default_value | ) |
const |
|
inline |
◆ InitMatch_()
◆ Match_() [1/2]
template<typename T >
template<typename NodeRefType , typename = typename std::enable_if< !std::is_same<NodeRefType, T>::value && std::is_base_of<ffi::ObjectRef, NodeRefType>::value && std::is_base_of<ffi::ObjectRef, T>::value>::type>
| bool tvm::PVar< T >::Match_ |
( |
const NodeRefType & |
value | ) |
const |
|
inline |
◆ Match_() [2/2]
template<typename T >
| bool tvm::PVar< T >::Match_ |
( |
const T & |
value | ) |
const |
|
inline |
◆ value_
The documentation for this class was generated from the following file: