Template Function tvm::ffi::StructuralVisit#
Defined in File structural_visit.h
Function Documentation#
-
template<typename ...Callbacks>
Optional<VisitInterrupt> tvm::ffi::StructuralVisit(AnyView root, Callbacks&&... callbacks)# Throwing error over tvm::ffi::StructuralVisitExpected.
See tvm::ffi::StructuralVisitExpected for callback semantics and traversal behavior.
- Template Parameters:
Callbacks – Callback types.
- Parameters:
root – The root value to visit.
callbacks – Callbacks invoked for matching nodes. Each callback takes
(value, StructuralVisitorObj*)and should returnExpected<Optional<VisitInterrupt>>.
- Throws:
Error – if traversal or a callback returned an error.
- Returns:
std::nulloptif traversal completed, or the interrupt that halted it.