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

Method load

lite/load_and_run/src/helpers/json_loader.cpp:300–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300std::unique_ptr<JsonLoader::Value> JsonLoader::load(
301 const char* content, const size_t size) {
302 m_buf = content;
303 skip_whitespace();
304 std::unique_ptr<JsonLoader::Value> value = parse_value();
305 skip_whitespace();
306
307 if (m_state != State::OK) {
308 return nullptr;
309 }
310 mgb_assert(size == static_cast<size_t>(m_buf - content));
311
312 return value;
313}
314
315std::unique_ptr<JsonLoader::Value> JsonLoader::load(const char* path) {
316 std::unique_ptr<std::FILE, void (*)(std::FILE*)> fin(

Callers 12

TESTFunction · 0.45
mgb_larFunction · 0.45
shared_weight_withMethod · 0.45
load_modelMethod · 0.45
get_model_io_info_dftMethod · 0.45
parse_jsonMethod · 0.45
parse_stringMethod · 0.45
utils.cppFile · 0.45
config_modelMethod · 0.45
set_Copr_IOMethod · 0.45
load_modelMethod · 0.45

Calls 3

loadFunction · 0.50
getMethod · 0.45
dataMethod · 0.45

Tested by 2

TESTFunction · 0.36
mgb_larFunction · 0.36