git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15248 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-07-01 23:27:26 +00:00
parent 8366b35459
commit 9656958169
245 changed files with 4890 additions and 4832 deletions

View File

@ -9,7 +9,7 @@
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
__________________________________________________________________________
begin :
begin :
email : ndactrung@gmail.com
***************************************************************************/
@ -33,21 +33,21 @@ LJCubicT::LJCubic() : BaseAtomic<numtyp,acctyp>(), _allocated(false) {
}
template <class numtyp, class acctyp>
LJCubicT::~LJCubic() {
LJCubicT::~LJCubic() {
clear();
}
template <class numtyp, class acctyp>
int LJCubicT::bytes_per_atom(const int max_nbors) const {
return this->bytes_per_atom_atomic(max_nbors);
}
template <class numtyp, class acctyp>
int LJCubicT::init(const int ntypes,
int LJCubicT::init(const int ntypes,
double **host_cutsq, double **host_cut_inner_sq,
double **host_cut_inner, double **host_sigma,
double **host_epsilon, double **host_lj1,
double **host_lj2, double **host_lj3, double **host_lj4,
double **host_cut_inner, double **host_sigma,
double **host_epsilon, double **host_lj1,
double **host_lj2, double **host_lj3, double **host_lj4,
double *host_special_lj, const int nlocal,
const int nall, const int max_nbors,
const int maxspecial, const double cell_size,
@ -77,11 +77,11 @@ int LJCubicT::init(const int ntypes,
lj1.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
this->atom->type_pack4(ntypes,lj_types,lj1,host_write,host_lj1,host_lj2,
host_cutsq);
host_cutsq);
lj2.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
this->atom->type_pack4(ntypes,lj_types,lj2,host_write,host_cut_inner_sq,
host_cut_inner,host_sigma,host_epsilon);
host_cut_inner,host_sigma,host_epsilon);
lj3.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
this->atom->type_pack2(ntypes,lj_types,lj3,host_write,host_lj3,host_lj4);
@ -132,7 +132,7 @@ void LJCubicT::loop(const bool _eflag, const bool _vflag) {
vflag=1;
else
vflag=0;
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
(BX/this->_threads_per_atom)));
@ -144,12 +144,12 @@ void LJCubicT::loop(const bool _eflag, const bool _vflag) {
this->k_pair_fast.run(&this->atom->x, &lj1, &lj2, &lj3, &sp_lj,
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
&this->ans->force, &this->ans->engv, &eflag,
&vflag, &ainum, &nbor_pitch,
&vflag, &ainum, &nbor_pitch,
&this->_threads_per_atom);
} else {
this->k_pair.set_size(GX,BX);
this->k_pair.run(&this->atom->x, &lj1, &lj2, &lj3, &_lj_types, &sp_lj,
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
this->k_pair.run(&this->atom->x, &lj1, &lj2, &lj3, &_lj_types, &sp_lj,
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
&this->ans->force, &this->ans->engv, &eflag, &vflag,
&ainum, &nbor_pitch, &this->_threads_per_atom);
}