mirror of https://github.com/BOINC/boinc.git
- client (Win) look for CUDA as nvcuda.dll
svn path=/trunk/boinc/; revision=15372
This commit is contained in:
parent
304c1dc934
commit
f0cb602f42
|
@ -4728,3 +4728,9 @@ David 5 June 2008
|
||||||
util.inc
|
util.inc
|
||||||
util_basics.inc (new)
|
util_basics.inc (new)
|
||||||
xml.inc
|
xml.inc
|
||||||
|
|
||||||
|
David 6 June 2008
|
||||||
|
- client (Win) look for CUDA as nvcuda.dll
|
||||||
|
|
||||||
|
lib/
|
||||||
|
coproc.C
|
||||||
|
|
|
@ -102,6 +102,7 @@ void COPROC_CUDA::get(COPROCS& coprocs) {
|
||||||
int (__stdcall* __cudaGetDeviceProperties) ( cudaDeviceProp*, int );
|
int (__stdcall* __cudaGetDeviceProperties) ( cudaDeviceProp*, int );
|
||||||
int bufsize=256;
|
int bufsize=256;
|
||||||
char buf[256], path[256];
|
char buf[256], path[256];
|
||||||
|
#if 0
|
||||||
HKEY key;
|
HKEY key;
|
||||||
retval = RegOpenKeyEx(
|
retval = RegOpenKeyEx(
|
||||||
HKEY_LOCAL_MACHINE,
|
HKEY_LOCAL_MACHINE,
|
||||||
|
@ -115,8 +116,10 @@ void COPROC_CUDA::get(COPROCS& coprocs) {
|
||||||
RegCloseKey(key);
|
RegCloseKey(key);
|
||||||
if (retval != ERROR_SUCCESS) return;
|
if (retval != ERROR_SUCCESS) return;
|
||||||
sprintf(path, "%s\\bin\\cudart.dll", buf);
|
sprintf(path, "%s\\bin\\cudart.dll", buf);
|
||||||
|
|
||||||
HMODULE cudalib = LoadLibrary(path);
|
HMODULE cudalib = LoadLibrary(path);
|
||||||
|
#else
|
||||||
|
HMODULE cudalib = LoadLibrary("nvcuda.dll");
|
||||||
|
#endif
|
||||||
__cudaGetDeviceCount = (int(__stdcall*)(int*)) GetProcAddress(cudalib, "cudaGetDeviceCount");
|
__cudaGetDeviceCount = (int(__stdcall*)(int*)) GetProcAddress(cudalib, "cudaGetDeviceCount");
|
||||||
if(!__cudaGetDeviceCount) return;
|
if(!__cudaGetDeviceCount) return;
|
||||||
__cudaGetDeviceProperties = (int(__stdcall*)(cudaDeviceProp*, int)) GetProcAddress( cudalib, "cudaGetDeviceProperties" );
|
__cudaGetDeviceProperties = (int(__stdcall*)(cudaDeviceProp*, int)) GetProcAddress( cudalib, "cudaGetDeviceProperties" );
|
||||||
|
|
Loading…
Reference in New Issue