Feb2021 GPU Package Update - GPU Package Files
This commit is contained in:
@ -121,20 +121,9 @@ double LJGROMACST::host_memory_usage() const {
|
||||
// Calculate energies, forces, and torques
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void LJGROMACST::loop(const bool _eflag, const bool _vflag) {
|
||||
int LJGROMACST::loop(const int eflag, const int vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
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=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
@ -142,8 +131,8 @@ void LJGROMACST::loop(const bool _eflag, const bool _vflag) {
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
if (shared_types) {
|
||||
this->k_pair_fast.set_size(GX,BX);
|
||||
this->k_pair_fast.run(&this->atom->x, &lj1, &lj3, &ljsw,
|
||||
this->k_pair_sel->set_size(GX,BX);
|
||||
this->k_pair_sel->run(&this->atom->x, &lj1, &lj3, &ljsw,
|
||||
&sp_lj, &this->nbor->dev_nbor,
|
||||
&this->_nbor_data->begin(),
|
||||
&this->ans->force, &this->ans->engv,
|
||||
@ -159,6 +148,7 @@ void LJGROMACST::loop(const bool _eflag, const bool _vflag) {
|
||||
&this->_threads_per_atom);
|
||||
}
|
||||
this->time_pair.stop();
|
||||
return GX;
|
||||
}
|
||||
|
||||
template class LJGROMACS<PRECISION,ACC_PRECISION>;
|
||||
|
||||
Reference in New Issue
Block a user