diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-11-01 15:05:13 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-11-01 15:05:13 +0100 |
commit | f70f68fcd465f421b566b199e23e66c1f186b01d (patch) | |
tree | 1699757401101eabac1e2bffc67b5ddc23cf1aeb /cuda/2d/util.cu | |
parent | adda34cf902c246a75eb46800949dc15d5e84f37 (diff) | |
download | astra-f70f68fcd465f421b566b199e23e66c1f186b01d.tar.gz astra-f70f68fcd465f421b566b199e23e66c1f186b01d.tar.bz2 astra-f70f68fcd465f421b566b199e23e66c1f186b01d.tar.xz astra-f70f68fcd465f421b566b199e23e66c1f186b01d.zip |
Separate cuda from astra headers further
Diffstat (limited to 'cuda/2d/util.cu')
-rw-r--r-- | cuda/2d/util.cu | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/cuda/2d/util.cu b/cuda/2d/util.cu index 9c1bb28..871e139 100644 --- a/cuda/2d/util.cu +++ b/cuda/2d/util.cu @@ -274,29 +274,4 @@ void reportCudaError(cudaError_t err) } -_AstraExport std::string getCudaDeviceString(int device) -{ - char buf[1024]; - cudaError_t err; - if (device == -1) { - err = cudaGetDevice(&device); - if (err != cudaSuccess) { - return "Error getting current GPU index"; - } - } - - cudaDeviceProp prop; - err = cudaGetDeviceProperties(&prop, device); - if (err != cudaSuccess) { - snprintf(buf, 1024, "GPU #%d: Invalid device (%d): %s", device, err, cudaGetErrorString(err)); - return buf; - } - - long mem = prop.totalGlobalMem / (1024*1024); - snprintf(buf, 1024, "GPU #%d: %s, with %ldMB", device, prop.name, mem); - return buf; -} - - - } |