Class StructuralMapEngineBase#
Defined in File structural_mutate.h
Inheritance Relationships#
Base Type#
public tvm::ffi::StructuralMutatorObj(Class StructuralMutatorObj)
Class Documentation#
-
class StructuralMapEngineBase : public tvm::ffi::StructuralMutatorObj#
Shared state and variable-remap dispatch for both structural-map engines.
This base owns the identity-substitution environment used for FreeVar and DAG identities. Its variable-remap vtable thunks downcast to this common subobject, allowing the typed and dynamic engines to share the environment even when a Parent layer sits above this base.
Public Types
-
using StateTupleType = std::tuple<>#
Empty callback-state protocol used when no custom Parent layer is present.
Public Functions
-
inline explicit StructuralMapEngineBase(const StructuralMutatorVTable *vtable)#
Construct the shared engine base with the concrete engine’s vtable.
-
inline ~StructuralMapEngineBase()#
Protected Functions
-
inline StateTupleType StateTuple() const noexcept#
Return the empty state tuple exposed to typed map callbacks.
-
inline Expected<Any> VarRemapGetImpl(AnyView var) noexcept#
Look up a replacement in the identity-substitution environment.
- Parameters:
var – The borrowed variable identity to look up.
- Returns:
The owning replacement, FFI None on a miss, or an Error.
-
inline Expected<void> VarRemapSetImpl(AnyView var, AnyView mapped_value) noexcept#
Record a replacement in the identity-substitution environment.
- Parameters:
var – The borrowed variable identity to bind.
mapped_value – The borrowed replacement value.
- Returns:
Successful completion, or an Error if the binding cannot be stored.
Protected Attributes
Protected Static Functions
-
static inline TVMFFIAny DispatchVarRemapGet(StructuralMutatorObj *mutator, AnyView var) noexcept#
Dispatch variable-remap lookup through the mutator vtable.
-
static inline TVMFFIAny DispatchVarRemapSet(StructuralMutatorObj *mutator, AnyView var, AnyView mapped_value) noexcept#
Dispatch variable-remap insertion through the mutator vtable.
Friends
- friend class StructuralMapEngine
- friend class StructuralMapDynEngine
- friend class StructuralMutateEngine
-
using StateTupleType = std::tuple<>#