Fixed bugs for undefined tagint and ucl_powr ambiguity in kernels for OpenCL builds

This commit is contained in:
Trung Nguyen
2021-09-20 12:48:29 -05:00
parent 4e88cd158e
commit 42034bd1c9
2 changed files with 12 additions and 4 deletions

View File

@ -37,7 +37,18 @@ _texture( q_tex,int2);
#else #else
#define pos_tex x_ #define pos_tex x_
#define q_tex q_ #define q_tex q_
#ifdef LAMMPS_SMALLBIG
#define tagint int
#endif #endif
#ifdef LAMMPS_BIGBIG
#define tagint long
#endif
#ifdef LAMMPS_SMALLSMALL
#define tagint int
#endif
#endif // defined(NV_KERNEL) || defined(USE_HIP)
#if (SHUFFLE_AVAIL == 0) #if (SHUFFLE_AVAIL == 0)
@ -1042,7 +1053,7 @@ __kernel void k_amoeba_udirect2b(const __global numtyp4 *restrict x_,
} }
} else { } else {
pgamma = MIN(pti,coeff[jtype].y); // thole[jtype] pgamma = MIN(pti,coeff[jtype].y); // thole[jtype]
damp = pgamma * ucl_powr(r/damp,3.0); damp = pgamma * ucl_powr(r/damp,(numtyp)3.0);
if (damp < (numtyp)50.0) { if (damp < (numtyp)50.0) {
numtyp expdamp = ucl_exp(-damp); numtyp expdamp = ucl_exp(-damp);
scale3 = (numtyp)1.0 - expdamp; scale3 = (numtyp)1.0 - expdamp;

View File

@ -27,9 +27,6 @@ BaseAmoebaT::BaseAmoeba() : _compiled(false), _max_bytes(0), short_nbor_polar_av
nbor=new Neighbor(); nbor=new Neighbor();
pair_program=nullptr; pair_program=nullptr;
ucl_device=nullptr; ucl_device=nullptr;
#if defined(LAL_OCL_EV_JIT)
pair_program_noev=nullptr;
#endif
} }
template <class numtyp, class acctyp> template <class numtyp, class acctyp>