merged in current master

This commit is contained in:
Steve Plimpton
2020-01-13 10:34:31 -07:00
parent bf20d72fc3
commit e8d11931ec
2720 changed files with 221313 additions and 28584 deletions

View File

@ -27,6 +27,8 @@ BaseThreeT::BaseThree() : _compiled(false), _max_bytes(0) {
#ifdef THREE_CONCURRENT
ans2=new Answer<numtyp,acctyp>();
#endif
pair_program=NULL;
ucl_device=NULL;
}
template <class numtyp, class acctyp>
@ -36,6 +38,12 @@ BaseThreeT::~BaseThree() {
#ifdef THREE_CONCURRENT
delete ans2;
#endif
k_three_center.clear();
k_three_end.clear();
k_three_end_vatom.clear();
k_pair.clear();
k_short_nbor.clear();
if (pair_program) delete pair_program;
}
template <class numtyp, class acctyp>
@ -87,6 +95,8 @@ int BaseThreeT::init_three(const int nlocal, const int nall,
if (success!=0)
return success;
if (ucl_device!=device->gpu) _compiled=false;
ucl_device=device->gpu;
atom=&device->atom;
@ -139,16 +149,6 @@ void BaseThreeT::clear_atomic() {
device->output_times(time_pair,*ans,*nbor,avg_split,_max_bytes+_max_an_bytes,
_gpu_overhead,_driver_overhead,_threads_per_atom,screen);
if (_compiled) {
k_three_center.clear();
k_three_end.clear();
k_three_end_vatom.clear();
k_pair.clear();
k_short_nbor.clear();
delete pair_program;
_compiled=false;
}
time_pair.clear();
hd_balancer.clear();
@ -161,7 +161,6 @@ void BaseThreeT::clear_atomic() {
// ucl_device will clean up the command queue in its destructor
// ucl_device->pop_command_queue();
#endif
device->clear();
}
// ---------------------------------------------------------------------------
@ -378,7 +377,7 @@ void BaseThreeT::compile_kernels(UCL_Device &dev, const void *pair_str,
return;
std::string vatom_name=std::string(three_end)+"_vatom";
if (pair_program) delete pair_program;
pair_program=new UCL_Program(dev);
pair_program->load_string(pair_str,device->compile_string().c_str());
k_three_center.set_function(*pair_program,three_center);