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

Method register_example

lite/example/cpp_example/main.cpp:48–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48bool lite::example::register_example(
49 std::string example_name, const ExampleFunc& fuction) {
50 auto map = get_example_function_map();
51 if (map->find(example_name) != map->end()) {
52 printf("example_name: %s Error!!! This example is registed yet\n",
53 example_name.c_str());
54 return false;
55 }
56 (*map)[example_name] = fuction;
57 return true;
58}
59
60std::shared_ptr<Tensor> lite::example::parse_npy(
61 const std::string& path, LiteBackend backend) {

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected