Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdded break when contact is found in contact list - sphere - GPU-based 3D disc…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit c398f9510e7217e16bea1edabeaa5f2cea4cb22d
parent 4d12eb6ddfdb27fcdd047f02ebfb0d7f8de02d9d
Author: Anders Damsgaard <[email protected]>
Date: Wed, 10 Oct 2012 11:37:13 +0200
Added break when contact is found in contact list
Diffstat:
M src/contactsearch.cuh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh
t@@ -259,10 +259,12 @@ __device__ void findContactsInCell(int3 targetCell,
for (int i=0; i<devC_nc; ++i) {
__syncthreads();
cidx = dev_contacts[(unsigned int)(idx_a_orig*devC_nc+i)];
- if (cidx == idx_b_orig) // Write to position of same contact
- cpos = i;
if (cidx == devC_np) // Write to position of now-deleted contact
cpos = i;
+ else if (cidx == idx_b_orig) { // Write to position of same contact
+ cpos = i;
+ break;
+ }
}
__syncthreads();
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.