forked from lijiext/lammps
recover compilation with -DLAMMPS_BIGBIG and fix whitespace and formatting issues
This commit is contained in:
parent
c482a04f80
commit
514271c984
|
@ -204,10 +204,10 @@ void LJTIP4PLongT::loop(const bool _eflag, const bool _vflag) {
|
|||
GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
this->k_pair.set_size(GX,BX);
|
||||
if (vflag){
|
||||
this->ansO.resize_ib(ainum*3);
|
||||
if (vflag) {
|
||||
this->ansO.resize_ib(ainum*3);
|
||||
} else {
|
||||
this->ansO.resize_ib(ainum);
|
||||
this->ansO.resize_ib(ainum);
|
||||
}
|
||||
this->ansO.zero();
|
||||
this->device->gpu->sync();
|
||||
|
@ -229,8 +229,8 @@ void LJTIP4PLongT::loop(const bool _eflag, const bool _vflag) {
|
|||
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void LJTIP4PLongT::copy_relations_data(int n, int* tag, int *map_array,
|
||||
int map_size, int *sametag, int max_same, int ago){
|
||||
void LJTIP4PLongT::copy_relations_data(int n, tagint *tag, int *map_array,
|
||||
int map_size, int *sametag, int max_same, int ago) {
|
||||
int nall = n;
|
||||
const int hn_sz = n*4; // matrix size = col size * col number
|
||||
hneight.resize_ib(hn_sz);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
//
|
||||
// begin :
|
||||
// email : thevsevak@gmail.com
|
||||
// ***************************************************************************/
|
||||
// ***************************************************************************
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
|
||||
|
@ -29,12 +29,12 @@ texture<int2> q_tex;
|
|||
#define q_tex q_
|
||||
#endif
|
||||
|
||||
ucl_inline int atom_mapping(const __global int *map, int glob){
|
||||
return map[glob];
|
||||
ucl_inline int atom_mapping(const __global int *map, int glob) {
|
||||
return map[glob];
|
||||
}
|
||||
|
||||
ucl_inline int closest_image(int i, int j, const __global int* sametag,
|
||||
const __global numtyp4 *restrict x_)
|
||||
const __global numtyp4 *restrict x_)
|
||||
{
|
||||
if (j < 0) return j;
|
||||
|
||||
|
@ -66,7 +66,7 @@ ucl_inline int closest_image(int i, int j, const __global int* sametag,
|
|||
|
||||
ucl_inline void compute_newsite(int iO, int iH1, int iH2,
|
||||
__global numtyp4 *xM, numtyp q,
|
||||
numtyp alpha, const __global numtyp4 *restrict x_){
|
||||
numtyp alpha, const __global numtyp4 *restrict x_) {
|
||||
numtyp4 xO; fetch4(xO,iO,pos_tex);
|
||||
numtyp4 xH1; fetch4(xH1,iH1,pos_tex);
|
||||
numtyp4 xH2; fetch4(xH2,iH2,pos_tex);
|
||||
|
@ -238,7 +238,7 @@ __kernel void k_lj_tip4p_newsite(const __global numtyp4 *restrict x_,
|
|||
iO = i;
|
||||
numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i];
|
||||
int itype = ix.w;
|
||||
if (itype == typeO){
|
||||
if (itype == typeO) {
|
||||
int iH1, iH2, iO;
|
||||
iH1 = hneigh[i*4 ];
|
||||
iH2 = hneigh[i*4+1];
|
||||
|
@ -404,7 +404,7 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_,
|
|||
fd.y = dely*force_coul;
|
||||
fd.z = delz*force_coul;
|
||||
if (itype == typeH) {
|
||||
if (jtype == typeH){
|
||||
if (jtype == typeH) {
|
||||
virial[0] += delx*fd.x;
|
||||
virial[1] += dely*fd.y;
|
||||
virial[2] += delz*fd.z;
|
||||
|
@ -438,7 +438,7 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_,
|
|||
vdi.y = xO.y*cO + xH1.y*cH + xH2.y*cH;
|
||||
vdi.z = xO.z*cO + xH1.z*cH + xH2.z*cH;
|
||||
//vdi.w = vdi.w;
|
||||
if (jtype != typeH){
|
||||
if (jtype != typeH) {
|
||||
numtyp4 xjH1; fetch4(xjH1,jH1,pos_tex);
|
||||
numtyp4 xjH2; fetch4(xjH2,jH2,pos_tex);
|
||||
numtyp4 xjO; fetch4(xjO,jO,pos_tex);
|
||||
|
@ -565,4 +565,4 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_,
|
|||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void k_lj_tip4p_long_fast(){}
|
||||
__kernel void k_lj_tip4p_long_fast() {}
|
||||
|
|
|
@ -61,8 +61,8 @@ public:
|
|||
double host_memory_usage() const;
|
||||
|
||||
/// Copy data from LAMMPS_NS
|
||||
void copy_relations_data(int n,int* tag, int *map_array, int map_size,
|
||||
int *sametag, int max_same, int ago);
|
||||
void copy_relations_data(int n, tagint* tag, int *map_array, int map_size,
|
||||
int *sametag, int max_same, int ago);
|
||||
|
||||
/// Reimplement BaseCharge pair loop with host neighboring
|
||||
void compute(const int f_ago, const int inum_full, const int nall,
|
||||
|
|
|
@ -138,9 +138,9 @@ double ljtip4p_long_gpu_bytes() {
|
|||
return LJTIP4PLMF.host_memory_usage();
|
||||
}
|
||||
|
||||
void ljtip4p_long_copy_molecule_data(int n, int* tag,
|
||||
int *map_array, int map_size,
|
||||
int *sametag, int max_same, int ago){
|
||||
void ljtip4p_long_copy_molecule_data(int n, tagint* tag,
|
||||
int *map_array, int map_size,
|
||||
int *sametag, int max_same, int ago) {
|
||||
LJTIP4PLMF.copy_relations_data(n, tag, map_array, map_size, sametag, max_same, ago);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ void ljtip4p_long_gpu_compute(const int ago, const int inum, const int nall,
|
|||
bool &success, double *host_q, const int nlocal,
|
||||
double *boxlo, double *prd);
|
||||
double ljtip4p_long_gpu_bytes();
|
||||
void ljtip4p_long_copy_molecule_data(int, int* , int *,
|
||||
int, int *, int , int);
|
||||
void ljtip4p_long_copy_molecule_data(int, tagint *, int *,
|
||||
int, int *, int, int);
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
Loading…
Reference in New Issue