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

Method set_impl

src/core/impl/utils/persistent_cache.cpp:21–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 std::make_shared<InMemoryPersistentCache>();
20
21std::shared_ptr<PersistentCache> PersistentCache::set_impl(
22 std::shared_ptr<PersistentCache> impl) {
23 mgb_assert(impl);
24 merge_old_cache(impl);
25 sm_impl.swap(impl);
26 return impl;
27}
28
29void PersistentCache::merge_old_cache(std::shared_ptr<PersistentCache> impl) {
30 MGB_LOCK_GUARD(PersistentCache::inst().m_mtx);

Callers 4

TESTFunction · 0.45
ProfilerMockMethod · 0.45
~ProfilerMockMethod · 0.45
CachedProfilerMethod · 0.45

Calls 1

swapMethod · 0.45

Tested by 3

TESTFunction · 0.36
ProfilerMockMethod · 0.36
~ProfilerMockMethod · 0.36