Fixing tagint and imageint issues in Kokkos package

This commit is contained in:
Stan Moore 2017-02-01 11:52:27 -07:00
parent 997142a4c1
commit 7ee45ec5f3
10 changed files with 35 additions and 35 deletions

View File

@ -957,10 +957,10 @@ struct AtomVecAngleKokkos_UnpackBorder {
_x(i+_first,0) = _buf(i,0);
_x(i+_first,1) = _buf(i,1);
_x(i+_first,2) = _buf(i,2);
_tag(i+_first) = static_cast<int> (_buf(i,3));
_tag(i+_first) = static_cast<tagint> (_buf(i,3));
_type(i+_first) = static_cast<int> (_buf(i,4));
_mask(i+_first) = static_cast<int> (_buf(i,5));
_molecule(i+_first) = static_cast<int> (_buf(i,6));
_molecule(i+_first) = static_cast<tagint> (_buf(i,6));
}
};

View File

@ -836,7 +836,7 @@ struct AtomVecAtomicKokkos_UnpackBorder {
_x(i+_first,0) = _buf(i,0);
_x(i+_first,1) = _buf(i,1);
_x(i+_first,2) = _buf(i,2);
_tag(i+_first) = static_cast<int> (_buf(i,3));
_tag(i+_first) = static_cast<tagint> (_buf(i,3));
_type(i+_first) = static_cast<int> (_buf(i,4));
_mask(i+_first) = static_cast<int> (_buf(i,5));
// printf("%i %i %lf %lf %lf %i BORDER\n",_tag(i+_first),i+_first,_x(i+_first,0),_x(i+_first,1),_x(i+_first,2),_type(i+_first));

View File

@ -905,10 +905,10 @@ struct AtomVecBondKokkos_UnpackBorder {
_x(i+_first,0) = _buf(i,0);
_x(i+_first,1) = _buf(i,1);
_x(i+_first,2) = _buf(i,2);
_tag(i+_first) = static_cast<int> (_buf(i,3));
_tag(i+_first) = static_cast<tagint> (_buf(i,3));
_type(i+_first) = static_cast<int> (_buf(i,4));
_mask(i+_first) = static_cast<int> (_buf(i,5));
_molecule(i+_first) = static_cast<int> (_buf(i,6));
_molecule(i+_first) = static_cast<tagint> (_buf(i,6));
}
};

View File

@ -872,7 +872,7 @@ struct AtomVecChargeKokkos_UnpackBorder {
_x(i+_first,0) = _buf(i,0);
_x(i+_first,1) = _buf(i,1);
_x(i+_first,2) = _buf(i,2);
_tag(i+_first) = static_cast<int> (_buf(i,3));
_tag(i+_first) = static_cast<tagint> (_buf(i,3));
_type(i+_first) = static_cast<int> (_buf(i,4));
_mask(i+_first) = static_cast<int> (_buf(i,5));
_q(i+_first) = _buf(i,6);

View File

@ -1029,10 +1029,10 @@ struct AtomVecMolecularKokkos_UnpackBorder {
_x(i+_first,0) = _buf(i,0);
_x(i+_first,1) = _buf(i,1);
_x(i+_first,2) = _buf(i,2);
_tag(i+_first) = static_cast<int> (_buf(i,3));
_tag(i+_first) = static_cast<tagint> (_buf(i,3));
_type(i+_first) = static_cast<int> (_buf(i,4));
_mask(i+_first) = static_cast<int> (_buf(i,5));
_molecule(i+_first) = static_cast<int> (_buf(i,6));
_molecule(i+_first) = static_cast<tagint> (_buf(i,6));
}
};

View File

@ -250,7 +250,7 @@ struct DomainPBCFunctor {
x(i,0) += period[0];
if (DEFORM_VREMAP && (mask[i] & deform_groupbit)) v(i,0) += h_rate[0];
imageint idim = image[i] & IMGMASK;
const int otherdims = image[i] ^ idim;
const imageint otherdims = image[i] ^ idim;
idim--;
idim &= IMGMASK;
image[i] = otherdims | idim;
@ -260,7 +260,7 @@ struct DomainPBCFunctor {
x(i,0) = MAX(x(i,0),lo[0]);
if (DEFORM_VREMAP && (mask[i] & deform_groupbit)) v(i,0) -= h_rate[0];
imageint idim = image[i] & IMGMASK;
const int otherdims = image[i] ^ idim;
const imageint otherdims = image[i] ^ idim;
idim++;
idim &= IMGMASK;
image[i] = otherdims | idim;

View File

@ -1046,7 +1046,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeLJCoulomb<NEIGHFLAG,
const X_FLOAT ztmp = x(i,2);
const F_FLOAT qi = q(i);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const int jnum = d_numneigh[i];
F_FLOAT fxtmp, fytmp, fztmp;
@ -1056,7 +1056,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeLJCoulomb<NEIGHFLAG,
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const int jtype = type(j);
const int jtag = tag(j);
const tagint jtag = tag(j);
const F_FLOAT qj = q(j);
if (NEIGHFLAG != FULL) {
@ -1201,7 +1201,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeTabulatedLJCoulomb<N
const X_FLOAT ztmp = x(i,2);
const F_FLOAT qi = q(i);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const int jnum = d_numneigh[i];
F_FLOAT fxtmp, fytmp, fztmp;
@ -1211,7 +1211,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeTabulatedLJCoulomb<N
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const int jtype = type(j);
const int jtag = tag(j);
const tagint jtag = tag(j);
const F_FLOAT qj = q(j);
if (NEIGHFLAG != FULL) {
@ -1580,7 +1580,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf<NEIGHFLAG>,
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const int jnum = d_numneigh[i];
F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3], dBOp_i[3], dln_BOp_pi_i[3], dln_BOp_pi2_i[3];
@ -1605,7 +1605,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf<NEIGHFLAG>,
for (int jj = 0; jj < jnum; jj++) {
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
d_bo_first[j] = j*maxbo;
d_hb_first[j] = j*maxhb;
@ -1802,7 +1802,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf_LessAtomics<
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const int jnum = d_numneigh[i];
F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3];
@ -1826,7 +1826,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf_LessAtomics<
for (int jj = 0; jj < jnum; jj++) {
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
d_bo_first[j] = j*maxbo;
d_hb_first[j] = j*maxhb;
@ -2752,7 +2752,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeTorsion<NEIGHFLAG,EV
const int i = d_ilist[ii];
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const X_FLOAT xtmp = x(i,0);
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
@ -2768,7 +2768,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeTorsion<NEIGHFLAG,EV
for (int jj = j_start; jj < j_end; jj++) {
int j = d_bo_list[jj];
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
const int jtype = type(j);
const int j_index = jj - j_start;
@ -3113,7 +3113,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeHydrogen<NEIGHFLAG,E
const X_FLOAT xtmp = x(i,0);
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itag = tag(i);
const tagint itag = tag(i);
const int j_start = d_bo_first[i];
const int j_end = j_start + d_bo_num[i];
@ -3140,7 +3140,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeHydrogen<NEIGHFLAG,E
for (int kk = k_start; kk < k_end; kk++) {
int k = d_hb_list[kk];
k &= NEIGHMASK;
const int ktag = tag(k);
const tagint ktag = tag(k);
const int ktype = type(k);
delik[0] = x(k,0) - xtmp;
@ -3153,7 +3153,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeHydrogen<NEIGHFLAG,E
const int jj = hblist[itr];
int j = d_bo_list[jj];
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
if (jtag == ktag) continue;
const int jtype = type(j);
@ -3247,14 +3247,14 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxUpdateBond<NEIGHFLAG>, cons
Kokkos::View<F_FLOAT**, typename DAT::t_ffloat_2d_dl::array_layout,DeviceType,Kokkos::MemoryTraits<AtomicF<NEIGHFLAG>::value> > a_Cdbopi2 = d_Cdbopi2;
const int i = d_ilist[ii];
const int itag = tag(i);
const tagint itag = tag(i);
const int j_start = d_bo_first[i];
const int j_end = j_start + d_bo_num[i];
for (int jj = j_start; jj < j_end; jj++) {
int j = d_bo_list[jj];
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
const int j_index = jj - j_start;
const F_FLOAT Cdbo_i = d_Cdbo(i,j_index);
const F_FLOAT Cdbopi_i = d_Cdbopi(i,j_index);
@ -3302,7 +3302,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeBond1<NEIGHFLAG,EVFL
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const F_FLOAT imass = paramssing(itype).mass;
const F_FLOAT val_i = paramssing(itype).valency;
const int j_start = d_bo_first[i];
@ -3313,7 +3313,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeBond1<NEIGHFLAG,EVFL
for (int jj = j_start; jj < j_end; jj++) {
int j = d_bo_list[jj];
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;
@ -3438,7 +3438,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeBond2<NEIGHFLAG,EVFL
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
const F_FLOAT imass = paramssing(itype).mass;
const F_FLOAT val_i = paramssing(itype).valency;
const int j_start = d_bo_first[i];
@ -3451,7 +3451,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeBond2<NEIGHFLAG,EVFL
for (int jj = j_start; jj < j_end; jj++) {
int j = d_bo_list[jj];
j &= NEIGHMASK;
const int jtag = tag(j);
const tagint jtag = tag(j);
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;

View File

@ -314,7 +314,7 @@ void PairTersoffKokkos<DeviceType>::operator()(TagPairTersoffComputeHalf<NEIGHFL
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
F_FLOAT fi[3], fj[3], fk[3];
@ -331,7 +331,7 @@ void PairTersoffKokkos<DeviceType>::operator()(TagPairTersoffComputeHalf<NEIGHFL
int j = d_neighbors_short(i,jj);
j &= NEIGHMASK;
const int jtype = type(j);
const int jtag = tag(j);
const tagint jtag = tag(j);
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;

View File

@ -314,7 +314,7 @@ void PairTersoffMODKokkos<DeviceType>::operator()(TagPairTersoffMODComputeHalf<N
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const int tagitag = tag(i);
F_FLOAT fi[3], fj[3], fk[3];
@ -331,7 +331,7 @@ void PairTersoffMODKokkos<DeviceType>::operator()(TagPairTersoffMODComputeHalf<N
int j = d_neighbors_short(i,jj);
j &= NEIGHMASK;
const int jtype = type(j);
const int jtag = tag(j);
const tagint jtag = tag(j);
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;

View File

@ -328,7 +328,7 @@ void PairTersoffZBLKokkos<DeviceType>::operator()(TagPairTersoffZBLComputeHalf<N
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
const int itag = tag(i);
const tagint itag = tag(i);
F_FLOAT fi[3], fj[3], fk[3];
@ -345,7 +345,7 @@ void PairTersoffZBLKokkos<DeviceType>::operator()(TagPairTersoffZBLComputeHalf<N
int j = d_neighbors_short(i,jj);
j &= NEIGHMASK;
const int jtype = type(j);
const int jtag = tag(j);
const tagint jtag = tag(j);
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;