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

« back to all changes in this revision

Viewing changes to lib/gpu/lal_ellipsoid_nbor.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:
41
41
  int ii=GLOBAL_ID_X+start;
42
42
 
43
43
  if (ii<inum) {
44
 
    const __global int *nbor=dev_ij+ii;
45
 
    int i=*nbor;
46
 
    nbor+=nbor_pitch;
47
 
    int numj=*nbor;
48
 
    nbor+=nbor_pitch;
49
 
    const __global int *list_end=nbor+fast_mul(numj,nbor_pitch);
50
 
    __global int *packed=dev_nbor+ii+nbor_pitch+nbor_pitch;
 
44
    int i=dev_ij[ii];
 
45
    int nbor=ii+nbor_pitch;
 
46
    int numj=dev_ij[nbor];
 
47
    nbor+=nbor_pitch;
 
48
    int nbor_end=nbor+fast_mul(numj,nbor_pitch);
 
49
    int packed=ii+nbor_pitch+nbor_pitch;
51
50
  
52
51
    numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i];
53
52
    int iw=ix.w;
54
53
    int itype=fast_mul(iw,ntypes);
55
54
    int newj=0;  
56
 
    for ( ; nbor<list_end; nbor+=nbor_pitch) {
57
 
      int j=*nbor;
 
55
    for ( ; nbor<nbor_end; nbor+=nbor_pitch) {
 
56
      int j=dev_ij[nbor];
58
57
      j &= NEIGHMASK;
59
58
      numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
60
59
      int jtype=jx.w;
70
69
        rsq+=t*t;
71
70
 
72
71
        if (rsq<cf.x) {
73
 
          *packed=j;
 
72
          dev_nbor[packed]=j;
74
73
          packed+=nbor_pitch;
75
74
          newj++;
76
75
        }
105
104
  __syncthreads();
106
105
 
107
106
  if (ii<inum) {
108
 
    const __global int *nbor=dev_ij+ii;
109
 
    int i=*nbor;
110
 
    nbor+=nbor_pitch;
111
 
    int numj=*nbor;
112
 
    nbor+=nbor_pitch;
113
 
    const __global int *list_end=nbor+fast_mul(numj,nbor_pitch);
114
 
    __global int *packed=dev_nbor+ii+nbor_pitch+nbor_pitch;
 
107
    int i=dev_ij[ii];
 
108
    int nbor=ii+nbor_pitch;
 
109
    int numj=dev_ij[nbor];
 
110
    nbor+=nbor_pitch;
 
111
    int nbor_end=nbor+fast_mul(numj,nbor_pitch);
 
112
    int packed=ii+nbor_pitch+nbor_pitch;
115
113
  
116
114
    numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i];
117
115
    int iw=ix.w;
118
116
    int itype=fast_mul((int)MAX_SHARED_TYPES,iw);
119
117
 
120
118
    int newj=0;  
121
 
    for ( ; nbor<list_end; nbor+=nbor_pitch) {
122
 
      int j=*nbor;
 
119
    for ( ; nbor<nbor_end; nbor+=nbor_pitch) {
 
120
      int j=dev_ij[nbor];
123
121
      j &= NEIGHMASK;
124
122
      numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
125
123
      int jtype=jx.w;
135
133
        rsq+=t*t;
136
134
 
137
135
        if (rsq<cutsq[mtype]) {
138
 
          *packed=j;
 
136
          dev_nbor[packed]=j;
139
137
          packed+=nbor_pitch;
140
138
          newj++;
141
139
        }