tonly print device info if verbose flag is set - sphere - GPU-based 3D discrete… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 639dd1b8bbce46456fd562c2a21def4e19092f87 | |
parent 55bcba190fabc5b556e3391c13d47db7cc8e9882 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 28 Jul 2014 10:20:14 +0200 | |
only print device info if verbose flag is set | |
Diffstat: | |
M src/device.cu | 6 ++++-- | |
1 file changed, 4 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/src/device.cu b/src/device.cu | |
t@@ -112,8 +112,10 @@ __host__ void DEM::initializeGPU(void) | |
// Only call cudaChooseDevice if the exlusive mode flag isn't set | |
if (exclusive_mode != 1) { | |
- cout << " Using CUDA device ID " << cudadevice << " with " | |
- << max_ncudacores << " cores." << std::endl; | |
+ if (verbose == 1) { | |
+ cout << " Using CUDA device ID " << cudadevice << " with " | |
+ << max_ncudacores << " cores." << std::endl; | |
+ } | |
cudaChooseDevice(&cudadevice, &prop); | |
} | |