Feb2021 GPU Package Update - GPU Package Files

This commit is contained in:
Michael Brown
2021-02-15 08:20:50 -08:00
parent 16004e8f45
commit e7e2d2323b
345 changed files with 13424 additions and 7708 deletions

View File

@ -127,7 +127,7 @@ int GayBerneT::init(const int ntypes, const double gamma,
host_write[i*4+2]=host_shape[i][2];
}
UCL_H_Vec<numtyp4> view4;
view4.view((numtyp4*)host_write.begin(),shape.numel(),*(this->ucl_device));
view4.view(host_write,shape.numel());
ucl_copy(shape,view4,false);
well.alloc(ntypes,*(this->ucl_device),UCL_READ_ONLY);
@ -136,7 +136,7 @@ int GayBerneT::init(const int ntypes, const double gamma,
host_write[i*4+1]=host_well[i][1];
host_write[i*4+2]=host_well[i][2];
}
view4.view((numtyp4*)host_write.begin(),well.numel(),*(this->ucl_device));
view4.view(host_write,well.numel());
ucl_copy(well,view4,false);
_allocated=true;
@ -184,19 +184,8 @@ double GayBerneT::host_memory_usage() const {
// Calculate energies, forces, and torques
// ---------------------------------------------------------------------------
template <class numtyp, class acctyp>
void GayBerneT::loop(const bool _eflag, const bool _vflag) {
int GayBerneT::loop(const int eflag, const int vflag) {
const int BX=this->block_size();
int eflag, vflag;
if (_eflag)
eflag=1;
else
eflag=0;
if (_vflag)
vflag=1;
else
vflag=0;
int GX=0, NGX;
int stride=this->nbor->nbor_pitch();
int ainum=this->ans->inum();
@ -213,8 +202,8 @@ void GayBerneT::loop(const bool _eflag, const bool _vflag) {
this->time_nbor1.stop();
this->time_ellipsoid.start();
this->k_ellipsoid.set_size(GX,BX);
this->k_ellipsoid.run(&this->atom->x, &this->atom->quat,
this->k_elps_sel->set_size(GX,BX);
this->k_elps_sel->run(&this->atom->x, &this->atom->quat,
&this->shape, &this->well, &this->gamma_upsilon_mu,
&this->sigma_epsilon, &this->_lj_types,
&this->lshape, &this->nbor->dev_nbor, &stride,
@ -230,7 +219,7 @@ void GayBerneT::loop(const bool _eflag, const bool _vflag) {
this->time_ellipsoid2.stop();
this->time_lj.start();
this->time_lj.stop();
return;
return ainum;
}
// ------------ SPHERE_ELLIPSE ---------------
@ -246,8 +235,8 @@ void GayBerneT::loop(const bool _eflag, const bool _vflag) {
this->time_nbor2.stop();
this->time_ellipsoid2.start();
this->k_sphere_ellipsoid.set_size(GX,BX);
this->k_sphere_ellipsoid.run(&this->atom->x, &this->atom->quat,
this->k_sphere_elps_sel->set_size(GX,BX);
this->k_sphere_elps_sel->run(&this->atom->x, &this->atom->quat,
&this->shape, &this->well,
&this->gamma_upsilon_mu,
&this->sigma_epsilon, &this->_lj_types,
@ -276,8 +265,8 @@ void GayBerneT::loop(const bool _eflag, const bool _vflag) {
this->time_lj.start();
if (this->_last_ellipse<this->ans->inum()) {
if (this->_shared_types) {
this->k_lj_fast.set_size(GX,BX);
this->k_lj_fast.run(&this->atom->x, &this->lj1, &this->lj3,
this->k_lj_sel->set_size(GX,BX);
this->k_lj_sel->run(&this->atom->x, &this->lj1, &this->lj3,
&this->gamma_upsilon_mu, &stride,
&this->nbor->dev_packed, &this->ans->force,
&this->ans->engv, &this->dev_error, &eflag,
@ -303,8 +292,8 @@ void GayBerneT::loop(const bool _eflag, const bool _vflag) {
ELLIPSE_ELLIPSE,_shared_types,_lj_types);
this->time_nbor1.stop();
this->time_ellipsoid.start();
this->k_ellipsoid.set_size(GX,BX);
this->k_ellipsoid.run(&this->atom->x, &this->atom->quat,
this->k_elps_sel->set_size(GX,BX);
this->k_elps_sel->run(&this->atom->x, &this->atom->quat,
&this->shape, &this->well, &this->gamma_upsilon_mu,
&this->sigma_epsilon, &this->_lj_types, &this->lshape,
&this->nbor->dev_nbor, &stride, &this->ans->force,
@ -312,6 +301,7 @@ void GayBerneT::loop(const bool _eflag, const bool _vflag) {
&eflag, &vflag, &ainum, &this->_threads_per_atom);
this->time_ellipsoid.stop();
}
return ainum;
}
template class GayBerne<PRECISION,ACC_PRECISION>;