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

Method clear_all

src/core/impl/graph/var_node_mem_mgr.cpp:82–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81#if MGB_THREAD_SAFE
82size_t StaticDeviceMemoryManager::clear_all() {
83 size_t ret = 0;
84 for (auto&& i : m_storage) {
85 update_max(ret, i.second.use_count());
86 }
87 m_storage.clear();
88 return ret;
89}
90
91std::shared_ptr<StaticDeviceMemoryManager> StaticDeviceMemoryManager::
92 make_default_impl() {

Callers 2

Calls 3

update_maxFunction · 0.85
use_countMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected