diff options
Diffstat (limited to 'include/CudaLibrary.hpp')
-rw-r--r-- | include/CudaLibrary.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/CudaLibrary.hpp b/include/CudaLibrary.hpp index ac35113..134d19c 100644 --- a/include/CudaLibrary.hpp +++ b/include/CudaLibrary.hpp @@ -50,8 +50,11 @@ struct Cuda { dlerror(); // clear void *lib = dlopen("libcuda.so", RTLD_LAZY); if(!lib) { - fprintf(stderr, "Error: failed to load libcuda.so, error: %s\n", dlerror()); - return false; + lib = dlopen("libcuda.so.1", RTLD_LAZY); + if(!lib) { + fprintf(stderr, "Error: failed to load libcuda.so and libcuda.so.1, error: %s\n", dlerror()); + return false; + } } cuInit = (CUINIT)load_symbol(lib, "cuInit"); @@ -126,4 +129,4 @@ private: } private: void *library = nullptr; -};
\ No newline at end of file +}; |