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

« back to all changes in this revision

Viewing changes to lib/cuda/pair_buck_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:
20
20
 
21
21
   This software is distributed under the GNU General Public License.
22
22
------------------------------------------------------------------------- */
23
 
__device__ inline F_FLOAT PairBuckCuda_Eval(const F_FLOAT &rsq, const int ij_type, F_FLOAT &factor_lj, int &eflag, ENERGY_FLOAT &evdwl)
 
23
__device__ inline F_CFLOAT PairBuckCuda_Eval(const F_CFLOAT &rsq, const int ij_type, F_CFLOAT &factor_lj, int &eflag, ENERGY_CFLOAT &evdwl)
24
24
{
25
 
  const F_FLOAT r2inv = F_F(1.0) / rsq;
26
 
  const F_FLOAT r6inv = r2inv * r2inv * r2inv;
27
 
  const F_FLOAT r = _RSQRT_(r2inv);
28
 
  const F_FLOAT rexp = _EXP_(-r * _rhoinv[ij_type]);
29
 
  const F_FLOAT forcebuck = _buck1[ij_type] * r * rexp - _buck2[ij_type] * r6inv;
 
25
  const F_CFLOAT r2inv = F_F(1.0) / rsq;
 
26
  const F_CFLOAT r6inv = r2inv * r2inv * r2inv;
 
27
  const F_CFLOAT r = _RSQRT_(r2inv);
 
28
  const F_CFLOAT rexp = _EXP_(-r * _rhoinv[ij_type]);
 
29
  const F_CFLOAT forcebuck = _buck1[ij_type] * r * rexp - _buck2[ij_type] * r6inv;
30
30
 
31
31
  if(eflag) evdwl += factor_lj * (_a[ij_type] * rexp - _c[ij_type] * r6inv -
32
32
                                    _offset[ij_type]);