Removing nall from kernel calls. Changing ellipsoid neighbor calls to use a correct block size.
This commit is contained in:
@ -179,11 +179,9 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
int GX, NGX;
|
||||
int stride=this->nbor->nbor_pitch();
|
||||
int ainum=this->ans->inum();
|
||||
int anall=this->atom->nall();
|
||||
|
||||
if (this->_multiple_forms) {
|
||||
if (this->_last_ellipse>0) {
|
||||
@ -191,7 +189,8 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
this->time_nbor1.start();
|
||||
GX=static_cast<int>(ceil(static_cast<double>(this->_last_ellipse)/
|
||||
(BX/this->_threads_per_atom)));
|
||||
this->pack_nbors(GX,BX, 0, this->_last_ellipse,ELLIPSE_ELLIPSE,
|
||||
NGX=static_cast<int>(ceil(static_cast<double>(this->_last_ellipse)/BX));
|
||||
this->pack_nbors(NGX,BX, 0, this->_last_ellipse,ELLIPSE_ELLIPSE,
|
||||
ELLIPSE_ELLIPSE,_shared_types,_lj_types);
|
||||
this->time_nbor1.stop();
|
||||
|
||||
@ -202,13 +201,13 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->special_lj.begin(), &this->sigma_epsilon.begin(),
|
||||
&this->_lj_types, &this->nbor->dev_nbor.begin(), &stride,
|
||||
&this->ans->dev_ans.begin(),&ainum,&this->ans->dev_engv.begin(),
|
||||
&this->dev_error.begin(), &eflag, &vflag, &this->_last_ellipse, &anall,
|
||||
&this->dev_error.begin(), &eflag, &vflag, &this->_last_ellipse,
|
||||
&this->_threads_per_atom);
|
||||
this->time_ellipsoid.stop();
|
||||
|
||||
// ------------ ELLIPSE_SPHERE ---------------
|
||||
this->time_nbor2.start();
|
||||
this->pack_nbors(GX,BX, 0, this->_last_ellipse,ELLIPSE_SPHERE,
|
||||
this->pack_nbors(NGX,BX, 0, this->_last_ellipse,ELLIPSE_SPHERE,
|
||||
ELLIPSE_SPHERE,_shared_types,_lj_types);
|
||||
this->time_nbor2.stop();
|
||||
|
||||
@ -219,7 +218,7 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->special_lj.begin(), &this->sigma_epsilon.begin(),
|
||||
&this->_lj_types, &this->nbor->dev_nbor.begin(), &stride,
|
||||
&this->ans->dev_ans.begin(),&ainum,&this->ans->dev_engv.begin(),
|
||||
&this->dev_error.begin(), &eflag, &vflag, &this->_last_ellipse, &anall,
|
||||
&this->dev_error.begin(), &eflag, &vflag, &this->_last_ellipse,
|
||||
&this->_threads_per_atom);
|
||||
this->time_ellipsoid2.stop();
|
||||
|
||||
@ -236,7 +235,9 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum()-
|
||||
this->_last_ellipse)/
|
||||
(BX/this->_threads_per_atom)));
|
||||
this->pack_nbors(GX,BX,this->_last_ellipse,this->ans->inum(),
|
||||
NGX=static_cast<int>(ceil(static_cast<double>(this->ans->inum()-
|
||||
this->_last_ellipse)/BX));
|
||||
this->pack_nbors(NGX,BX,this->_last_ellipse,this->ans->inum(),
|
||||
SPHERE_ELLIPSE,SPHERE_ELLIPSE,_shared_types,_lj_types);
|
||||
this->time_nbor3.stop();
|
||||
|
||||
@ -248,7 +249,7 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->sigma_epsilon.begin(), &this->_lj_types,
|
||||
&this->nbor->dev_nbor.begin(), &stride, &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &this->dev_error.begin(), &eflag,
|
||||
&vflag, &this->_last_ellipse, &ainum, &anall, &this->_threads_per_atom);
|
||||
&vflag, &this->_last_ellipse, &ainum, &this->_threads_per_atom);
|
||||
this->time_ellipsoid3.stop();
|
||||
} else {
|
||||
this->ans->dev_ans.zero();
|
||||
@ -270,7 +271,7 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->lj3.begin(), &this->special_lj.begin(), &stride,
|
||||
&this->nbor->dev_packed.begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &this->dev_error.begin(),
|
||||
&eflag, &vflag, &this->_last_ellipse, &ainum, &anall,
|
||||
&eflag, &vflag, &this->_last_ellipse, &ainum,
|
||||
&this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_lj.set_size(GX,BX);
|
||||
@ -278,14 +279,16 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->lj3.begin(), &this->_lj_types, &this->special_lj.begin(),
|
||||
&stride, &this->nbor->dev_packed.begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &this->dev_error.begin(), &eflag,
|
||||
&vflag, &this->_last_ellipse, &ainum, &anall,
|
||||
&this->_threads_per_atom);
|
||||
&vflag, &this->_last_ellipse, &ainum, &this->_threads_per_atom);
|
||||
}
|
||||
}
|
||||
this->time_lj.stop();
|
||||
} else {
|
||||
GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
NGX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/BX));
|
||||
this->time_nbor1.start();
|
||||
this->pack_nbors(GX, BX, 0, this->ans->inum(),SPHERE_SPHERE,
|
||||
this->pack_nbors(NGX, BX, 0, this->ans->inum(),SPHERE_SPHERE,
|
||||
ELLIPSE_ELLIPSE,_shared_types,_lj_types);
|
||||
this->time_nbor1.stop();
|
||||
this->time_ellipsoid.start();
|
||||
@ -295,7 +298,7 @@ void RESquaredT::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->special_lj.begin(), &this->sigma_epsilon.begin(),
|
||||
&this->_lj_types, &this->nbor->dev_nbor.begin(), &stride,
|
||||
&this->ans->dev_ans.begin(), &ainum, &this->ans->dev_engv.begin(),
|
||||
&this->dev_error.begin(), &eflag, &vflag, &ainum, &anall,
|
||||
&this->dev_error.begin(), &eflag, &vflag, &ainum,
|
||||
&this->_threads_per_atom);
|
||||
this->time_ellipsoid.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user