MCPcopy Create free account
hub / github.com/creatale/node-dv / loadCudaSupportLib

Function loadCudaSupportLib

deps/opencv/modules/core/src/gpumat.cpp:188–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186# endif
187
188static bool loadCudaSupportLib()
189{
190 void* handle;
191 const std::string name = getCudaSupportLibName();
192 dlerror();
193 handle = dlopen(name.c_str(), RTLD_LAZY);
194 if (!handle)
195 {
196 LOGE("Cannot dlopen %s: %s", name.c_str(), dlerror());
197 return false;
198 }
199
200 deviceInfoFactory = (DeviceInfoFactoryType)dlsym(handle, "deviceInfoFactory");
201 if (!deviceInfoFactory)
202 {
203 LOGE("Cannot dlsym deviceInfoFactory: %s", dlerror());
204 dlclose(handle);
205 return false;
206 }
207
208 gpuFactory = (GpuFactoryType)dlsym(handle, "gpuFactory");
209 if (!gpuFactory)
210 {
211 LOGE("Cannot dlsym gpuFactory: %s", dlerror());
212 dlclose(handle);
213 return false;
214 }
215
216 return true;
217}
218
219# else
220# error "Dynamic CUDA support is not implemented for this platform!"

Callers 2

gpuFuncTableFunction · 0.85
deviceInfoFuncTableFunction · 0.85

Calls 2

getCudaSupportLibNameFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected