| 52 | } |
| 53 | |
| 54 | static void writeCacheFile(const Content* net, std::pair<const void*, size_t> buffer) { |
| 55 | bool res = FileLoader::write(net->cacheFile.c_str(), buffer); |
| 56 | if (!res) { |
| 57 | MNN_ERROR("Write Cache File error!\n"); |
| 58 | return; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | static Content* loadModelFile(const char* file) { |
| 63 | if (nullptr == file) { |
no test coverage detected