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

Method LoadNvOFAPI

src/opr/impl/nvof/NvOF.cpp:188–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void NvOFAPI::LoadNvOFAPI() {
189#if defined(_WIN32)
190#if defined(_WIN64)
191 HMODULE hModule = LoadLibrary(TEXT("nvofapi64.dll"));
192#else
193 HMODULE hModule = LoadLibrary(TEXT("nvofapi.dll"));
194#endif
195#else
196 void* hModule = dlopen("libnvidia-opticalflow.so.1", RTLD_LAZY);
197#endif
198 if (hModule == NULL) {
199 mgb_throw(
200 MegBrainError,
201 "NVOF: NVOF library file not found. Please ensure that the "
202 "NVIDIA driver is installed type: NV_OF_ERR_OF_NOT_AVAILABLE");
203 }
204
205 m_hModule = hModule;
206}
207
208#endif

Callers

nothing calls this directly

Calls 1

dlopenFunction · 0.50

Tested by

no test coverage detected