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

« back to all changes in this revision

Viewing changes to lib/gpu/lal_lj_coul_long.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:
80
80
 
81
81
  lj1.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
82
82
  this->atom->type_pack4(ntypes,lj_types,lj1,host_write,host_lj1,host_lj2,
83
 
                         host_cutsq, host_cut_ljsq);
 
83
           host_cutsq, host_cut_ljsq);
84
84
 
85
85
  lj3.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
86
86
  this->atom->type_pack4(ntypes,lj_types,lj3,host_write,host_lj3,host_lj4,
103
103
}
104
104
 
105
105
template <class numtyp, class acctyp>
 
106
void LJCoulLongT::reinit(const int ntypes, double **host_cutsq, double **host_lj1,
 
107
                         double **host_lj2, double **host_lj3, double **host_lj4,
 
108
                         double **host_offset, double **host_cut_ljsq) {
 
109
  // Allocate a host write buffer for data initialization
 
110
  UCL_H_Vec<numtyp> host_write(_lj_types*_lj_types*32,*(this->ucl_device),
 
111
                               UCL_WRITE_ONLY);
 
112
  
 
113
  for (int i=0; i<_lj_types*_lj_types; i++)
 
114
    host_write[i]=0.0;
 
115
  
 
116
  this->atom->type_pack4(ntypes,_lj_types,lj1,host_write,host_lj1,host_lj2,
 
117
                         host_cutsq, host_cut_ljsq);
 
118
  this->atom->type_pack4(ntypes,_lj_types,lj3,host_write,host_lj3,host_lj4,
 
119
                         host_offset);
 
120
}
 
121
 
 
122
template <class numtyp, class acctyp>
106
123
void LJCoulLongT::clear() {
107
124
  if (!_allocated)
108
125
    return;