Commit 9f733fb3 authored by Trung Nguyen's avatar Trung Nguyen
Browse files

Removed unused variables

parent 6de02080
Loading
Loading
Loading
Loading
+6 −27
Original line number Diff line number Diff line
@@ -184,7 +184,6 @@ __kernel void k_tersoff_short_nbor(const __global numtyp4 *restrict x_,
              n_stride,nbor_end,nbor);

    numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i];
    int itype=ix.w;

    int ncount = 0;
    int m = nbor;
@@ -198,7 +197,6 @@ __kernel void k_tersoff_short_nbor(const __global numtyp4 *restrict x_,
      j &= NEIGHMASK;

      numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
      int jtype=jx.w;

      // Compute r12
      numtyp delx = ix.x-jx.x;
@@ -303,7 +301,6 @@ __kernel void k_tersoff_zeta(const __global numtyp4 *restrict x_,
      delr1.y = jx.y-ix.y;
      delr1.z = jx.z-ix.z;
      numtyp rsq1 = delr1.x*delr1.x+delr1.y*delr1.y+delr1.z*delr1.z;
      //if (rsq1 >= cutsq[ijparam]) continue;

      // compute zeta_ij
      z = (acctyp)0;
@@ -714,7 +711,7 @@ __kernel void k_tersoff_three_end(const __global numtyp4 *restrict x_,
  for (int i=0; i<6; i++)
    virial[i]=(acctyp)0;

  __local int red_acc[2*BLOCK_PAIR];
  __local int red_acc[BLOCK_PAIR];

  __syncthreads();

@@ -748,7 +745,6 @@ __kernel void k_tersoff_three_end(const __global numtyp4 *restrict x_,
      numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
      int jtype=jx.w;
      jtype=map[jtype];
      int ijparam=elem2param[itype*nelements*nelements+jtype*nelements+jtype];

      // Compute r12
      numtyp delr1[3];
@@ -756,7 +752,6 @@ __kernel void k_tersoff_three_end(const __global numtyp4 *restrict x_,
      delr1[1] = jx.y-ix.y;
      delr1[2] = jx.z-ix.z;
      numtyp rsq1 = delr1[0]*delr1[0] + delr1[1]*delr1[1] + delr1[2]*delr1[2];
      //if (rsq1 >= cutsq[ijparam]) continue;

      numtyp mdelr1[3];
      mdelr1[0] = -delr1[0];
@@ -796,21 +791,14 @@ __kernel void k_tersoff_three_end(const __global numtyp4 *restrict x_,
        k &= NEIGHMASK;
        if (k == i) {
          ijnum = nbor_k;
          red_acc[2*m+0] = ijnum;
          red_acc[2*m+1] = offset_k;
          red_acc[m] = ijnum;
          break;
        }
      }

      numtyp r1 = ucl_sqrt(rsq1);
      numtyp r1inv = ucl_rsqrt(rsq1);
      int offset_kf;
      if (ijnum >= 0) {
        offset_kf = offset_k;
      } else {
        ijnum = red_acc[2*m+0];
        offset_kf = red_acc[2*m+1];
      }
      if (ijnum < 0) ijnum = red_acc[m];

      // idx to zetaij is shifted by n_stride relative to ijnum in dev_short_nbor
      int idx = ijnum;
@@ -952,7 +940,7 @@ __kernel void k_tersoff_three_end_vatom(const __global numtyp4 *restrict x_,
  for (int i=0; i<6; i++)
    virial[i]=(acctyp)0;

  __local int red_acc[2*BLOCK_PAIR];
  __local int red_acc[BLOCK_PAIR];

  __syncthreads();

@@ -986,7 +974,6 @@ __kernel void k_tersoff_three_end_vatom(const __global numtyp4 *restrict x_,
      numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
      int jtype=jx.w;
      jtype=map[jtype];
      int ijparam=elem2param[itype*nelements*nelements+jtype*nelements+jtype];

      // Compute r12
      numtyp delr1[3];
@@ -994,7 +981,6 @@ __kernel void k_tersoff_three_end_vatom(const __global numtyp4 *restrict x_,
      delr1[1] = jx.y-ix.y;
      delr1[2] = jx.z-ix.z;
      numtyp rsq1 = delr1[0]*delr1[0] + delr1[1]*delr1[1] + delr1[2]*delr1[2];
      //if (rsq1 >= cutsq[ijparam]) continue;

      numtyp mdelr1[3];
      mdelr1[0] = -delr1[0];
@@ -1034,21 +1020,14 @@ __kernel void k_tersoff_three_end_vatom(const __global numtyp4 *restrict x_,
        k &= NEIGHMASK;
        if (k == i) {
          ijnum = nbor_k;
          red_acc[2*m+0] = ijnum;
          red_acc[2*m+1] = offset_k;
          red_acc[m] = ijnum;
          break;
        }
      }

      numtyp r1 = ucl_sqrt(rsq1);
      numtyp r1inv = ucl_rsqrt(rsq1);
      int offset_kf;
      if (ijnum >= 0) {
        offset_kf = offset_k;
      } else {
        ijnum = red_acc[2*m+0];
        offset_kf = red_acc[2*m+1];
      }
      if (ijnum < 0) ijnum = red_acc[m];

      // idx to zetaij is shifted by n_stride relative to ijnum in dev_short_nbor
      int idx = ijnum;