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

Method register_parse_info_func

lite/src/global.cpp:110–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool lite::register_parse_info_func(
111 std::string info_type, const ParseInfoFunc& parse_func) {
112 LITE_LOCK_GUARD(parse_info_static_data().map_mutex);
113 auto& global_map = parse_info_static_data().parse_info_methods;
114 if (global_map.find(info_type) != global_map.end()) {
115 LITE_THROW(ssprintf(
116 "The parse info method %s is already registered.", info_type.c_str()));
117 return false;
118 } else {
119 global_map[info_type] = parse_func;
120 LITE_LOG("Registered infomation parser method %s.", info_type.c_str());
121 return true;
122 }
123}
124
125#if LITE_BUILD_WITH_MGE
126

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected