tThreads per block limited to 256 - sphere - GPU-based 3D discrete element meth… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit bcca6eaf973e97dbcf0d970ce22ff944864f0276 | |
parent 6bbe20b846311d165bb831422b509c93f00bfa30 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 13 Mar 2013 23:58:38 +0100 | |
Threads per block limited to 256 | |
Diffstat: | |
M src/device.cu | 5 ++++- | |
1 file changed, 4 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/src/device.cu b/src/device.cu | |
t@@ -529,6 +529,8 @@ __host__ void DEM::startTime() | |
unsigned int blocksPerGrid = iDivUp(np, threadsPerBlock); | |
dim3 dimGrid(blocksPerGrid, 1, 1); // Blocks arranged in 1D grid | |
dim3 dimBlock(threadsPerBlock, 1, 1); // Threads arranged in 1D block | |
+ unsigned int blocksPerGridBonds = iDivUp(params.nb0, threadsPerBlock); | |
+ dim3 dimGridBonds(blocksPerGridBonds, 1, 1); // Blocks arranged in 1D grid | |
// Shared memory per block | |
unsigned int smemSize = sizeof(unsigned int)*(threadsPerBlock+1); | |
t@@ -731,7 +733,8 @@ __host__ void DEM::startTime() | |
// Process particle pairs | |
if (params.nb0 > 0) { | |
- bondsLinear<<< 1, params.nb0 >>>( | |
+ //bondsLinear<<< 1, params.nb0 >>>( | |
+ bondsLinear<<<dimGridBonds, dimBlock>>>( | |
dev_bonds, | |
dev_bonds_delta, | |
dev_bonds_omega, |