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

Method load_lib

src/jit/impl/utils.cpp:142–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 }
141
142 void* load_lib(const std::string& name) override {
143 auto ret = dlopen(realpath(name).c_str(), RTLD_LAZY | RTLD_LOCAL);
144 mgb_throw_if(
145 !ret, SystemError, "failed to load library %s: %s", name.c_str(),
146 dlerror());
147 return ret;
148 }
149
150 void* resolve_func(void* handle, const std::string& func_name) override {
151 auto ret = dlsym(handle, func_name.c_str());

Callers

nothing calls this directly

Calls 2

dlopenFunction · 0.50
dlerrorFunction · 0.50

Tested by

no test coverage detected