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

Method assert_destroy

src/core/impl/graph/cg_impl.cpp:116–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void ComputingGraph::assert_destroy(std::shared_ptr<ComputingGraph>& ptr) {
117 mgb_assert(
118 ptr.use_count() <= 2, "unexpected use_count: %zu", size_t(ptr.use_count()));
119 ptr.reset();
120}
121
122#if !MGB_THREAD_SAFE
123size_t ComputingGraph::prealloc_static_storage(size_t size) {

Callers

nothing calls this directly

Calls 2

use_countMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected