Minor optimization of tersoff kernel TagPairTersoffComputeShortNeigh
Change-Id: If70e524b6bf30d3bcdacf732cf3aab897e2843d4
This commit is contained in:
committed by
Nicholas Curtis
parent
705d314879
commit
3b3ef7e9a5
@ -298,6 +298,7 @@ void PairTersoffKokkos<DeviceType>::operator()(TagPairTersoffComputeShortNeigh,
|
||||
const X_FLOAT xtmp = x(i,0);
|
||||
const X_FLOAT ytmp = x(i,1);
|
||||
const X_FLOAT ztmp = x(i,2);
|
||||
const F_FLOAT cutmax_sq = cutmax*cutmax;
|
||||
|
||||
const int jnum = d_numneigh[i];
|
||||
int inside = 0;
|
||||
@ -310,7 +311,7 @@ void PairTersoffKokkos<DeviceType>::operator()(TagPairTersoffComputeShortNeigh,
|
||||
const X_FLOAT delz = ztmp - x(j,2);
|
||||
const F_FLOAT rsq = delx*delx + dely*dely + delz*delz;
|
||||
|
||||
if (rsq < cutmax*cutmax) {
|
||||
if (rsq < cutmax_sq) {
|
||||
d_neighbors_short(i,inside) = j;
|
||||
inside++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user