tvm
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | List of all members
tvm::tirx::ObjectVisitorWithConstraintContext Class Reference

Native object dispatch over one constraint-aware structural visitor. More...

#include <object_functor_with_constraint_context.h>

Inheritance diagram for tvm::tirx::ObjectVisitorWithConstraintContext:
Collaboration diagram for tvm::tirx::ObjectVisitorWithConstraintContext:

Public Member Functions

 ObjectVisitorWithConstraintContext ()
 
 ObjectVisitorWithConstraintContext (const ObjectVisitorWithConstraintContext &)=delete
 
ObjectVisitorWithConstraintContext & operator= (const ObjectVisitorWithConstraintContext &)=delete
 
virtual ffi::Optional< ffi::VisitInterrupt > Visit (ffi::AnyView value)
 Dispatch a borrowed value, preserving structural error context.
 
ffi::Expected< ffi::Optional< ffi::VisitInterrupt > > VisitExpected (ffi::AnyView value) noexcept
 
- Public Member Functions inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj
 StructuralVisitorWithConstraintContextObj ()
 Construct a visitor using constraint-aware default descent.
 
void AppendConstraint (const sym::Constraint &constraint)
 Add a fact to the current scope, creating its child context on the first append.
 
template<typename F >
auto WithConstraintScope (F &&f) -> decltype(f())
 Run an Expected-returning callback in a constraint scope. Use AppendConstraint to add facts. Scopes without facts keep the incoming context. Success and visit interrupts restore the incoming position. Terminal errors propagate without restoration; discard the traversal context after failure.
 
ffi::Expected< ffi::Optional< ffi::VisitInterrupt > > DefaultVisitExpected (ffi::AnyView value) noexcept
 Descend with the sparse specialized hook, or the ordinary fallback. Call this from a Visit callback to descend its matched node exactly once. Calling it from that node's registered hook re-enters the same hook.
 
 TVM_FFI_DECLARE_OBJECT_INFO ("tirx.StructuralVisitorWithConstraintContext", StructuralVisitorWithConstraintContextObj, ffi::StructuralVisitorObj)
 

Protected Types

using VTable = ObjectFunctor< ffi::Optional< ffi::VisitInterrupt >(const ffi::Object *, ObjectVisitorWithConstraintContext *)>
 

Protected Member Functions

 ObjectVisitorWithConstraintContext (const VTable *table)
 
- Protected Member Functions inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj
 StructuralVisitorWithConstraintContextObj (const ffi::StructuralVisitorVTable *vtable)
 
StateTupleType StateTuple () const noexcept
 

Static Protected Member Functions

static void InitVTable (VTable *table)
 
template<typename Self , typename Node >
static void SetDispatch (VTable *table)
 

Additional Inherited Members

- Public Types inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj
using VisitorObjType = StructuralVisitorWithConstraintContextObj
 
using StateTupleType = std::tuple< const sym::ConstraintContext & >
 
- Public Attributes inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj
sym::ConstraintContext constraints
 Active effective premises. Consumers must not append during traversal. Retain this handle and constraints->LocalSize() for a stable position, or use constraints->ToArray() for an independent sequence of handles. The context itself remains live.
 

Detailed Description

Native object dispatch over one constraint-aware structural visitor.

Override Visit for general dispatch. Derived visitors initialize a native table with InitVTable and SetDispatch; unregistered values use structural fallback. Allocate with ffi::make_object. The inherited constraints handle is the active context.

Member Typedef Documentation

◆ VTable

using tvm::tirx::ObjectVisitorWithConstraintContext::VTable = ObjectFunctor<ffi::Optional<ffi::VisitInterrupt>( const ffi::Object*, ObjectVisitorWithConstraintContext*)>
protected

Constructor & Destructor Documentation

◆ ObjectVisitorWithConstraintContext() [1/3]

tvm::tirx::ObjectVisitorWithConstraintContext::ObjectVisitorWithConstraintContext ( )
inline

◆ ObjectVisitorWithConstraintContext() [2/3]

tvm::tirx::ObjectVisitorWithConstraintContext::ObjectVisitorWithConstraintContext ( const ObjectVisitorWithConstraintContext &  )
delete

◆ ObjectVisitorWithConstraintContext() [3/3]

tvm::tirx::ObjectVisitorWithConstraintContext::ObjectVisitorWithConstraintContext ( const VTable *  table)
inlineexplicitprotected

Member Function Documentation

◆ InitVTable()

static void tvm::tirx::ObjectVisitorWithConstraintContext::InitVTable ( VTable *  table)
inlinestaticprotected

◆ operator=()

ObjectVisitorWithConstraintContext & tvm::tirx::ObjectVisitorWithConstraintContext::operator= ( const ObjectVisitorWithConstraintContext &  )
delete

◆ SetDispatch()

template<typename Self , typename Node >
static void tvm::tirx::ObjectVisitorWithConstraintContext::SetDispatch ( VTable *  table)
inlinestaticprotected

◆ Visit()

virtual ffi::Optional< ffi::VisitInterrupt > tvm::tirx::ObjectVisitorWithConstraintContext::Visit ( ffi::AnyView  value)
virtual

Dispatch a borrowed value, preserving structural error context.

◆ VisitExpected()

ffi::Expected< ffi::Optional< ffi::VisitInterrupt > > tvm::tirx::ObjectVisitorWithConstraintContext::VisitExpected ( ffi::AnyView  value)
inlinenoexcept

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