URI:
       tslight rearranging of output - 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 a3f8391f6d7702842e46e8ead63ad008d89106f3
   DIR parent f924918c5ac9717d5ebc6cb8143e854c7c445e95
  HTML Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Mon, 30 Jun 2014 10:18:23 +0200
       
       slight rearranging of output
       
       Diffstat:
         M src/device.cu                       |      13 ++++++++-----
       
       1 file changed, 8 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/src/device.cu b/src/device.cu
       t@@ -89,7 +89,8 @@ __host__ void DEM::initializeGPU(void)
                cudaDriverGetVersion(&cudaDriverVersion);
                cudaRuntimeGetVersion(&cudaRuntimeVersion);
        
       -        ncudacores = prop.multiProcessorCount*cudaCoresPerSM(prop.major, prop.minor);
       +        ncudacores = prop.multiProcessorCount
       +            *cudaCoresPerSM(prop.major, prop.minor);
                if (ncudacores > max_ncudacores) {
                    max_ncudacores = ncudacores;
                    cudadevice = d;
       t@@ -106,10 +107,12 @@ __host__ void DEM::initializeGPU(void)
                }
            }
        
       -    // Comment following line when using a system only containing exclusive mode
       -    // GPUs
       -    cout << "  Using CUDA device ID " << cudadevice << '.' << std::endl;
       -    cudaChooseDevice(&cudadevice, &prop); 
       +    cout << " Using CUDA device ID " << cudadevice << " with "
       +         << max_ncudacores << " cores." << std::endl;
       +
       +    // Comment following line when using a system only containing
       +    // exclusive mode GPUs
       +    cudaChooseDevice(&cudadevice, &prop);
        
            checkForCudaErrors("While initializing CUDA device");
        }