MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / GraphNodePtr

Method GraphNodePtr

imperative/python/src/graph_rt.h:20–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19public:
20 GraphNodePtr(T* node)
21 : m_graph(node ? node->owner_graph()->shared_from_this() : nullptr),
22 m_node(node) {}
23 T* operator->() { return m_node; }
24 T& operator*() { return *m_node; }
25 operator bool() { return m_node; }

Callers

nothing calls this directly

Calls 2

shared_from_thisMethod · 0.80
owner_graphMethod · 0.45

Tested by

no test coverage detected