Skip to content
Snippets Groups Projects
Commit 9e23f054 authored by stamoor's avatar stamoor
Browse files

Fixing Kokkos bug

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14940 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 8ee124a4
No related branches found
No related tags found
No related merge requests found
...@@ -293,18 +293,18 @@ void NeighborKokkosExecute<Device>:: ...@@ -293,18 +293,18 @@ void NeighborKokkosExecute<Device>::
/* else which = 0; */ /* else which = 0; */
if (which == 0){ if (which == 0){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
}else if (minimum_image_check(delx,dely,delz)){ }else if (minimum_image_check(delx,dely,delz)){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
else if (which > 0) { else if (which > 0) {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS);
else n++ else n++;
} }
} else { } else {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
} }
} }
...@@ -338,18 +338,18 @@ void NeighborKokkosExecute<Device>:: ...@@ -338,18 +338,18 @@ void NeighborKokkosExecute<Device>::
/* else which = 0; */ /* else which = 0; */
if (which == 0){ if (which == 0){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
}else if (minimum_image_check(delx,dely,delz)){ }else if (minimum_image_check(delx,dely,delz)){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
else if (which > 0) { else if (which > 0) {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS);
else n++ else n++;
} }
} else { } else {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
} }
...@@ -452,18 +452,18 @@ void NeighborKokkosExecute<DeviceType>::build_ItemCuda(typename Kokkos::TeamPoli ...@@ -452,18 +452,18 @@ void NeighborKokkosExecute<DeviceType>::build_ItemCuda(typename Kokkos::TeamPoli
/* else which = 0; */ /* else which = 0; */
if (which == 0){ if (which == 0){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
}else if (minimum_image_check(delx,dely,delz)){ }else if (minimum_image_check(delx,dely,delz)){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
else if (which > 0) { else if (which > 0) {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS);
else n++ else n++;
} }
} else { } else {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
} }
...@@ -521,18 +521,18 @@ void NeighborKokkosExecute<DeviceType>::build_ItemCuda(typename Kokkos::TeamPoli ...@@ -521,18 +521,18 @@ void NeighborKokkosExecute<DeviceType>::build_ItemCuda(typename Kokkos::TeamPoli
/* else which = 0; */ /* else which = 0; */
if (which == 0){ if (which == 0){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
}else if (minimum_image_check(delx,dely,delz)){ }else if (minimum_image_check(delx,dely,delz)){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
else if (which > 0) { else if (which > 0) {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS);
else n++ else n++;
} }
} else { } else {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
} }
...@@ -613,18 +613,18 @@ void NeighborKokkosExecute<Device>:: ...@@ -613,18 +613,18 @@ void NeighborKokkosExecute<Device>::
/* else which = 0; */ /* else which = 0; */
if (which == 0){ if (which == 0){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
}else if (minimum_image_check(delx,dely,delz)){ }else if (minimum_image_check(delx,dely,delz)){
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
else if (which > 0) { else if (which > 0) {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); if(n<neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS);
else n++ else n++;
} }
} else { } else {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
} }
} }
...@@ -658,7 +658,7 @@ void NeighborKokkosExecute<Device>:: ...@@ -658,7 +658,7 @@ void NeighborKokkosExecute<Device>::
if (rsq <= cutneighsq(itype,jtype)) { if (rsq <= cutneighsq(itype,jtype)) {
if(n<neigh_list.maxneighs) neighbors_i(n++) = j; if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
else n++ else n++;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment