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

« back to all changes in this revision

Viewing changes to lib/cuda/pair_lj_smooth_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 PairLJSmoothCuda_Eval(const F_FLOAT &rsq, const int ij_type, F_FLOAT &factor_lj, int &eflag, ENERGY_FLOAT &evdwl)
 
24
__device__ inline F_CFLOAT PairLJSmoothCuda_Eval(const F_CFLOAT &rsq, const int ij_type, F_CFLOAT &factor_lj, int &eflag, ENERGY_CFLOAT &evdwl)
25
25
{
26
 
  F_FLOAT fskin, t, tsq, forcelj;
27
 
  const F_FLOAT r2inv = F_F(1.0) / rsq;
28
 
  const F_FLOAT r = _RSQRT_(r2inv);
29
 
  const F_FLOAT r6inv = r2inv * r2inv * r2inv;
30
 
 
31
 
 
32
 
  X_FLOAT cut_lj_innersq = (_cut_innersq_global > X_F(0.0) ? _cut_innersq_global : _cut_innersq[ij_type]);
 
26
  F_CFLOAT fskin, t, tsq, forcelj;
 
27
  const F_CFLOAT r2inv = F_F(1.0) / rsq;
 
28
  const F_CFLOAT r = _RSQRT_(r2inv);
 
29
  const F_CFLOAT r6inv = r2inv * r2inv * r2inv;
 
30
 
 
31
 
 
32
  X_CFLOAT cut_lj_innersq = (_cut_innersq_global > X_F(0.0) ? _cut_innersq_global : _cut_innersq[ij_type]);
33
33
 
34
34
  if(rsq < cut_lj_innersq) {
35
35
    forcelj = r6inv * (_lj1[ij_type] * r6inv - _lj2[ij_type]);
43
43
  }
44
44
 
45
45
  if(eflag) {
46
 
    ENERGY_FLOAT evdwl_tmp;
 
46
    ENERGY_CFLOAT evdwl_tmp;
47
47
 
48
48
    if(rsq < cut_lj_innersq) {
49
49
      evdwl_tmp = r6inv * (_lj3[ij_type] * r6inv - _lj4[ij_type]) -