~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to lib/gpu/lal_lj.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
}
94
94
 
95
95
template <class numtyp, class acctyp>
 
96
void LJT::reinit(const int ntypes, double **host_cutsq, double **host_lj1,
 
97
                 double **host_lj2, double **host_lj3,
 
98
                 double **host_lj4, double **host_offset) {
 
99
  // Allocate a host write buffer for data initialization
 
100
  UCL_H_Vec<numtyp> host_write(_lj_types*_lj_types*32,*(this->ucl_device),
 
101
                               UCL_WRITE_ONLY);
 
102
  
 
103
  for (int i=0; i<_lj_types*_lj_types; i++)
 
104
    host_write[i]=0.0;
 
105
  
 
106
  this->atom->type_pack4(ntypes,_lj_types,lj1,host_write,host_lj1,host_lj2,
 
107
                         host_cutsq);
 
108
  this->atom->type_pack4(ntypes,_lj_types,lj3,host_write,host_lj3,host_lj4,
 
109
                         host_offset);
 
110
}
 
111
 
 
112
template <class numtyp, class acctyp>
96
113
void LJT::clear() {
97
114
  if (!_allocated)
98
115
    return;