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

« back to all changes in this revision

Viewing changes to lib/cuda/pair_lj96_cut_cuda_kernel_nc.cu

  • 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:
21
21
   This software is distributed under the GNU General Public License.
22
22
------------------------------------------------------------------------- */
23
23
 
24
 
__device__ inline F_FLOAT PairLJ96CutCuda_Eval(const F_FLOAT &rsq, const int ij_type, F_FLOAT &factor_lj, int &eflag, ENERGY_FLOAT &evdwl)
 
24
__device__ inline F_CFLOAT PairLJ96CutCuda_Eval(const F_CFLOAT &rsq, const int ij_type, F_CFLOAT &factor_lj, int &eflag, ENERGY_CFLOAT &evdwl)
25
25
{
26
 
  const F_FLOAT r2inv = F_F(1.0) / rsq;
27
 
  const F_FLOAT r6inv = r2inv * r2inv * r2inv;
28
 
  const F_FLOAT r3inv = _SQRT_(r6inv);
29
 
  const F_FLOAT forcelj = r6inv * (_lj1[ij_type] * r3inv - _lj2[ij_type]);
 
26
  const F_CFLOAT r2inv = F_F(1.0) / rsq;
 
27
  const F_CFLOAT r6inv = r2inv * r2inv * r2inv;
 
28
  const F_CFLOAT r3inv = _SQRT_(r6inv);
 
29
  const F_CFLOAT forcelj = r6inv * (_lj1[ij_type] * r3inv - _lj2[ij_type]);
30
30
 
31
31
  if(eflag) evdwl += factor_lj * (r6inv * (_lj3[ij_type] * r3inv - _lj4[ij_type]) - _offset[ij_type]);
32
32