tAdded more syncthreads() to contactsearch - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 4bd862bc4ff2de3e91848eada8ce04ef62fa2888
 (DIR) parent e2202b0f5f11217657a8a2ee95d01fc5fd562114
 (HTM) Author: Anders Damsgaard <adc@geo.au.dk>
       Date:   Sun, 30 Sep 2012 21:42:44 +0200
       
       Added more syncthreads() to contactsearch
       
       Diffstat:
         M src/contactsearch.cuh               |       5 ++++-
       
       1 file changed, 4 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh
       t@@ -196,6 +196,7 @@ __device__ void findContactsInCell(int3 targetCell,
          if (findDistMod(&targetCell, &distmod) == -1)
            return; // Target cell lies outside the grid
        
       +  __syncthreads();
        
          //// Check and process particle-particle collisions
        
       t@@ -209,6 +210,8 @@ __device__ void findContactsInCell(int3 targetCell,
          // Make sure cell is not empty
          if (startIdx != 0xffffffff) {
        
       +    __syncthreads();
       +
            // Highest particle index in cell + 1
            unsigned int endIdx = dev_cellEnd[cellID];
        
       t@@ -226,7 +229,7 @@ __device__ void findContactsInCell(int3 targetCell,
                // Read the original index of particle B
                unsigned int idx_b_orig = dev_gridParticleIndex[idx_b];
        
       -        __syncthreads();
       +        //__syncthreads();
        
                // Distance between particle centers (Float4 -> Float3)
                Float3 x_ab = MAKE_FLOAT3(x_a.x - x_b.x,