class
SushiAI::Eager::ScopeTrace
Splits the nodes traced into one graph into segments, by the scope open at each.
- Declared in
include/SushiAI/eager/scope_trace.hpp
See also
include/SushiAI/eager/README.md
Public member functions
explicit ScopeTrace(const Graph::Graph &graph) noexceptStarts a trace over graph with no scope open.
Parameters
graphThe graph being traced; must outlive this object.
void open(std::string_view name)Opens a scope nested in the current one.
Parameters
nameScope name; not empty and without '/' or '#'.
void close()Closes the innermost open scope.
Precondition
At least one scope is open.
std::vector< Segment > seal()Ends the trace and returns its segments in node order.
Precondition
Every opened scope has been closed.
std::size_t depth() const noexceptReturns how many scopes are open.

