MCPcopy Create free account
hub / github.com/alibaba/MNN / getCache

Method getCache

source/core/Session.cpp:227–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227std::pair<const void*, size_t> Session::getCache() {
228 // Set cancelled for quickly ending
229 for (auto& iter : mRuntime.first) {
230 iter.second->mCancelled = true;
231 }
232 waitAsyncResize();
233
234 for (auto iter : mRuntime.first) {
235 auto res = iter.second->onGetCache();
236 if (res.first != nullptr) {
237 return res;
238 }
239 }
240 return std::make_pair(nullptr, 0);
241}
242
243ErrorCode Session::run() const {
244 if (mNeedResize) {

Callers 2

updateCacheFileMethod · 0.45

Calls 1

onGetCacheMethod · 0.45

Tested by

no test coverage detected