tonly print device info if verbose flag is set - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
HTML git clone git://src.adamsgaard.dk/sphere
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
DIR commit 639dd1b8bbce46456fd562c2a21def4e19092f87
DIR parent 55bcba190fabc5b556e3391c13d47db7cc8e9882
HTML Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
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(-)
---
DIR 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);
}