Bug Summary

File:gromacs/gmxlib/nonbonded/nb_kernel_sse4_1_single/nb_kernel_ElecCoul_VdwCSTab_GeomW4P1_sse4_1_single.c
Location:line 751, column 22
Description:Value stored to 'one' during its initialization is never read

Annotated Source Code

1/*
2 * This file is part of the GROMACS molecular simulation package.
3 *
4 * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
5 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 * and including many others, as listed in the AUTHORS file in the
7 * top-level source directory and at http://www.gromacs.org.
8 *
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
13 *
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 *
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
31 *
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
34 */
35/*
36 * Note: this file was generated by the GROMACS sse4_1_single kernel generator.
37 */
38#ifdef HAVE_CONFIG_H1
39#include <config.h>
40#endif
41
42#include <math.h>
43
44#include "../nb_kernel.h"
45#include "types/simple.h"
46#include "gromacs/math/vec.h"
47#include "nrnb.h"
48
49#include "gromacs/simd/math_x86_sse4_1_single.h"
50#include "kernelutil_x86_sse4_1_single.h"
51
52/*
53 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwCSTab_GeomW4P1_VF_sse4_1_single
54 * Electrostatics interaction: Coulomb
55 * VdW interaction: CubicSplineTable
56 * Geometry: Water4-Particle
57 * Calculate force/pot: PotentialAndForce
58 */
59void
60nb_kernel_ElecCoul_VdwCSTab_GeomW4P1_VF_sse4_1_single
61 (t_nblist * gmx_restrict nlist,
62 rvec * gmx_restrict xx,
63 rvec * gmx_restrict ff,
64 t_forcerec * gmx_restrict fr,
65 t_mdatoms * gmx_restrict mdatoms,
66 nb_kernel_data_t gmx_unused__attribute__ ((unused)) * gmx_restrict kernel_data,
67 t_nrnb * gmx_restrict nrnb)
68{
69 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
70 * just 0 for non-waters.
71 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
72 * jnr indices corresponding to data put in the four positions in the SIMD register.
73 */
74 int i_shift_offset,i_coord_offset,outeriter,inneriter;
75 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
76 int jnrA,jnrB,jnrC,jnrD;
77 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
78 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
79 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
80 real rcutoff_scalar;
81 real *shiftvec,*fshift,*x,*f;
82 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
83 real scratch[4*DIM3];
84 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
85 int vdwioffset0;
86 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
87 int vdwioffset1;
88 __m128 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
89 int vdwioffset2;
90 __m128 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
91 int vdwioffset3;
92 __m128 ix3,iy3,iz3,fix3,fiy3,fiz3,iq3,isai3;
93 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
94 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
95 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
96 __m128 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
97 __m128 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
98 __m128 dx30,dy30,dz30,rsq30,rinv30,rinvsq30,r30,qq30,c6_30,c12_30;
99 __m128 velec,felec,velecsum,facel,crf,krf,krf2;
100 real *charge;
101 int nvdwtype;
102 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
103 int *vdwtype;
104 real *vdwparam;
105 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
106 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
107 __m128i vfitab;
108 __m128i ifour = _mm_set1_epi32(4);
109 __m128 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF;
110 real *vftab;
111 __m128 dummy_mask,cutoff_mask;
112 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
113 __m128 one = _mm_set1_ps(1.0);
114 __m128 two = _mm_set1_ps(2.0);
115 x = xx[0];
116 f = ff[0];
117
118 nri = nlist->nri;
119 iinr = nlist->iinr;
120 jindex = nlist->jindex;
121 jjnr = nlist->jjnr;
122 shiftidx = nlist->shift;
123 gid = nlist->gid;
124 shiftvec = fr->shift_vec[0];
125 fshift = fr->fshift[0];
126 facel = _mm_set1_ps(fr->epsfac);
127 charge = mdatoms->chargeA;
128 nvdwtype = fr->ntype;
129 vdwparam = fr->nbfp;
130 vdwtype = mdatoms->typeA;
131
132 vftab = kernel_data->table_vdw->data;
133 vftabscale = _mm_set1_ps(kernel_data->table_vdw->scale);
134
135 /* Setup water-specific parameters */
136 inr = nlist->iinr[0];
137 iq1 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+1]));
138 iq2 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+2]));
139 iq3 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+3]));
140 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
141
142 /* Avoid stupid compiler warnings */
143 jnrA = jnrB = jnrC = jnrD = 0;
144 j_coord_offsetA = 0;
145 j_coord_offsetB = 0;
146 j_coord_offsetC = 0;
147 j_coord_offsetD = 0;
148
149 outeriter = 0;
150 inneriter = 0;
151
152 for(iidx=0;iidx<4*DIM3;iidx++)
153 {
154 scratch[iidx] = 0.0;
155 }
156
157 /* Start outer loop over neighborlists */
158 for(iidx=0; iidx<nri; iidx++)
159 {
160 /* Load shift vector for this list */
161 i_shift_offset = DIM3*shiftidx[iidx];
162
163 /* Load limits for loop over neighbors */
164 j_index_start = jindex[iidx];
165 j_index_end = jindex[iidx+1];
166
167 /* Get outer coordinate index */
168 inr = iinr[iidx];
169 i_coord_offset = DIM3*inr;
170
171 /* Load i particle coords and add shift vector */
172 gmx_mm_load_shift_and_4rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,
173 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2,&ix3,&iy3,&iz3);
174
175 fix0 = _mm_setzero_ps();
176 fiy0 = _mm_setzero_ps();
177 fiz0 = _mm_setzero_ps();
178 fix1 = _mm_setzero_ps();
179 fiy1 = _mm_setzero_ps();
180 fiz1 = _mm_setzero_ps();
181 fix2 = _mm_setzero_ps();
182 fiy2 = _mm_setzero_ps();
183 fiz2 = _mm_setzero_ps();
184 fix3 = _mm_setzero_ps();
185 fiy3 = _mm_setzero_ps();
186 fiz3 = _mm_setzero_ps();
187
188 /* Reset potential sums */
189 velecsum = _mm_setzero_ps();
190 vvdwsum = _mm_setzero_ps();
191
192 /* Start inner kernel loop */
193 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
194 {
195
196 /* Get j neighbor index, and coordinate index */
197 jnrA = jjnr[jidx];
198 jnrB = jjnr[jidx+1];
199 jnrC = jjnr[jidx+2];
200 jnrD = jjnr[jidx+3];
201 j_coord_offsetA = DIM3*jnrA;
202 j_coord_offsetB = DIM3*jnrB;
203 j_coord_offsetC = DIM3*jnrC;
204 j_coord_offsetD = DIM3*jnrD;
205
206 /* load j atom coordinates */
207 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
208 x+j_coord_offsetC,x+j_coord_offsetD,
209 &jx0,&jy0,&jz0);
210
211 /* Calculate displacement vector */
212 dx00 = _mm_sub_ps(ix0,jx0);
213 dy00 = _mm_sub_ps(iy0,jy0);
214 dz00 = _mm_sub_ps(iz0,jz0);
215 dx10 = _mm_sub_ps(ix1,jx0);
216 dy10 = _mm_sub_ps(iy1,jy0);
217 dz10 = _mm_sub_ps(iz1,jz0);
218 dx20 = _mm_sub_ps(ix2,jx0);
219 dy20 = _mm_sub_ps(iy2,jy0);
220 dz20 = _mm_sub_ps(iz2,jz0);
221 dx30 = _mm_sub_ps(ix3,jx0);
222 dy30 = _mm_sub_ps(iy3,jy0);
223 dz30 = _mm_sub_ps(iz3,jz0);
224
225 /* Calculate squared distance and things based on it */
226 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
227 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
228 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
229 rsq30 = gmx_mm_calc_rsq_ps(dx30,dy30,dz30);
230
231 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
232 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
233 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
234 rinv30 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq30);
235
236 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
237 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
238 rinvsq30 = _mm_mul_ps(rinv30,rinv30);
239
240 /* Load parameters for j particles */
241 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
242 charge+jnrC+0,charge+jnrD+0);
243 vdwjidx0A = 2*vdwtype[jnrA+0];
244 vdwjidx0B = 2*vdwtype[jnrB+0];
245 vdwjidx0C = 2*vdwtype[jnrC+0];
246 vdwjidx0D = 2*vdwtype[jnrD+0];
247
248 fjx0 = _mm_setzero_ps();
249 fjy0 = _mm_setzero_ps();
250 fjz0 = _mm_setzero_ps();
251
252 /**************************
253 * CALCULATE INTERACTIONS *
254 **************************/
255
256 r00 = _mm_mul_ps(rsq00,rinv00);
257
258 /* Compute parameters for interactions between i and j atoms */
259 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
260 vdwparam+vdwioffset0+vdwjidx0B,
261 vdwparam+vdwioffset0+vdwjidx0C,
262 vdwparam+vdwioffset0+vdwjidx0D,
263 &c6_00,&c12_00);
264
265 /* Calculate table index by multiplying r with table scale and truncate to integer */
266 rt = _mm_mul_ps(r00,vftabscale);
267 vfitab = _mm_cvttps_epi32(rt);
268 vfeps = _mm_sub_ps(rt,_mm_round_ps(rt, _MM_FROUND_FLOOR)__extension__ ({ __m128 __X = (rt); (__m128) __builtin_ia32_roundps
((__v4sf)__X, ((0x00 | 0x01))); })
);
269 vfitab = _mm_slli_epi32(vfitab,3);
270
271 /* CUBIC SPLINE TABLE DISPERSION */
272 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
273 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
274 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
275 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
276 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
277 Heps = _mm_mul_ps(vfeps,H);
278 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
279 VV = _mm_add_ps(Y,_mm_mul_ps(vfeps,Fp));
280 vvdw6 = _mm_mul_ps(c6_00,VV);
281 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
282 fvdw6 = _mm_mul_ps(c6_00,FF);
283
284 /* CUBIC SPLINE TABLE REPULSION */
285 vfitab = _mm_add_epi32(vfitab,ifour);
286 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
287 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
288 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
289 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
290 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
291 Heps = _mm_mul_ps(vfeps,H);
292 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
293 VV = _mm_add_ps(Y,_mm_mul_ps(vfeps,Fp));
294 vvdw12 = _mm_mul_ps(c12_00,VV);
295 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
296 fvdw12 = _mm_mul_ps(c12_00,FF);
297 vvdw = _mm_add_ps(vvdw12,vvdw6);
298 fvdw = _mm_xor_ps(signbit,_mm_mul_ps(_mm_add_ps(fvdw6,fvdw12),_mm_mul_ps(vftabscale,rinv00)));
299
300 /* Update potential sum for this i atom from the interaction with this j atom. */
301 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
302
303 fscal = fvdw;
304
305 /* Calculate temporary vectorial force */
306 tx = _mm_mul_ps(fscal,dx00);
307 ty = _mm_mul_ps(fscal,dy00);
308 tz = _mm_mul_ps(fscal,dz00);
309
310 /* Update vectorial force */
311 fix0 = _mm_add_ps(fix0,tx);
312 fiy0 = _mm_add_ps(fiy0,ty);
313 fiz0 = _mm_add_ps(fiz0,tz);
314
315 fjx0 = _mm_add_ps(fjx0,tx);
316 fjy0 = _mm_add_ps(fjy0,ty);
317 fjz0 = _mm_add_ps(fjz0,tz);
318
319 /**************************
320 * CALCULATE INTERACTIONS *
321 **************************/
322
323 /* Compute parameters for interactions between i and j atoms */
324 qq10 = _mm_mul_ps(iq1,jq0);
325
326 /* COULOMB ELECTROSTATICS */
327 velec = _mm_mul_ps(qq10,rinv10);
328 felec = _mm_mul_ps(velec,rinvsq10);
329
330 /* Update potential sum for this i atom from the interaction with this j atom. */
331 velecsum = _mm_add_ps(velecsum,velec);
332
333 fscal = felec;
334
335 /* Calculate temporary vectorial force */
336 tx = _mm_mul_ps(fscal,dx10);
337 ty = _mm_mul_ps(fscal,dy10);
338 tz = _mm_mul_ps(fscal,dz10);
339
340 /* Update vectorial force */
341 fix1 = _mm_add_ps(fix1,tx);
342 fiy1 = _mm_add_ps(fiy1,ty);
343 fiz1 = _mm_add_ps(fiz1,tz);
344
345 fjx0 = _mm_add_ps(fjx0,tx);
346 fjy0 = _mm_add_ps(fjy0,ty);
347 fjz0 = _mm_add_ps(fjz0,tz);
348
349 /**************************
350 * CALCULATE INTERACTIONS *
351 **************************/
352
353 /* Compute parameters for interactions between i and j atoms */
354 qq20 = _mm_mul_ps(iq2,jq0);
355
356 /* COULOMB ELECTROSTATICS */
357 velec = _mm_mul_ps(qq20,rinv20);
358 felec = _mm_mul_ps(velec,rinvsq20);
359
360 /* Update potential sum for this i atom from the interaction with this j atom. */
361 velecsum = _mm_add_ps(velecsum,velec);
362
363 fscal = felec;
364
365 /* Calculate temporary vectorial force */
366 tx = _mm_mul_ps(fscal,dx20);
367 ty = _mm_mul_ps(fscal,dy20);
368 tz = _mm_mul_ps(fscal,dz20);
369
370 /* Update vectorial force */
371 fix2 = _mm_add_ps(fix2,tx);
372 fiy2 = _mm_add_ps(fiy2,ty);
373 fiz2 = _mm_add_ps(fiz2,tz);
374
375 fjx0 = _mm_add_ps(fjx0,tx);
376 fjy0 = _mm_add_ps(fjy0,ty);
377 fjz0 = _mm_add_ps(fjz0,tz);
378
379 /**************************
380 * CALCULATE INTERACTIONS *
381 **************************/
382
383 /* Compute parameters for interactions between i and j atoms */
384 qq30 = _mm_mul_ps(iq3,jq0);
385
386 /* COULOMB ELECTROSTATICS */
387 velec = _mm_mul_ps(qq30,rinv30);
388 felec = _mm_mul_ps(velec,rinvsq30);
389
390 /* Update potential sum for this i atom from the interaction with this j atom. */
391 velecsum = _mm_add_ps(velecsum,velec);
392
393 fscal = felec;
394
395 /* Calculate temporary vectorial force */
396 tx = _mm_mul_ps(fscal,dx30);
397 ty = _mm_mul_ps(fscal,dy30);
398 tz = _mm_mul_ps(fscal,dz30);
399
400 /* Update vectorial force */
401 fix3 = _mm_add_ps(fix3,tx);
402 fiy3 = _mm_add_ps(fiy3,ty);
403 fiz3 = _mm_add_ps(fiz3,tz);
404
405 fjx0 = _mm_add_ps(fjx0,tx);
406 fjy0 = _mm_add_ps(fjy0,ty);
407 fjz0 = _mm_add_ps(fjz0,tz);
408
409 fjptrA = f+j_coord_offsetA;
410 fjptrB = f+j_coord_offsetB;
411 fjptrC = f+j_coord_offsetC;
412 fjptrD = f+j_coord_offsetD;
413
414 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
415
416 /* Inner loop uses 140 flops */
417 }
418
419 if(jidx<j_index_end)
420 {
421
422 /* Get j neighbor index, and coordinate index */
423 jnrlistA = jjnr[jidx];
424 jnrlistB = jjnr[jidx+1];
425 jnrlistC = jjnr[jidx+2];
426 jnrlistD = jjnr[jidx+3];
427 /* Sign of each element will be negative for non-real atoms.
428 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
429 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
430 */
431 dummy_mask = gmx_mm_castsi128_ps_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
432 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
433 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
434 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
435 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
436 j_coord_offsetA = DIM3*jnrA;
437 j_coord_offsetB = DIM3*jnrB;
438 j_coord_offsetC = DIM3*jnrC;
439 j_coord_offsetD = DIM3*jnrD;
440
441 /* load j atom coordinates */
442 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
443 x+j_coord_offsetC,x+j_coord_offsetD,
444 &jx0,&jy0,&jz0);
445
446 /* Calculate displacement vector */
447 dx00 = _mm_sub_ps(ix0,jx0);
448 dy00 = _mm_sub_ps(iy0,jy0);
449 dz00 = _mm_sub_ps(iz0,jz0);
450 dx10 = _mm_sub_ps(ix1,jx0);
451 dy10 = _mm_sub_ps(iy1,jy0);
452 dz10 = _mm_sub_ps(iz1,jz0);
453 dx20 = _mm_sub_ps(ix2,jx0);
454 dy20 = _mm_sub_ps(iy2,jy0);
455 dz20 = _mm_sub_ps(iz2,jz0);
456 dx30 = _mm_sub_ps(ix3,jx0);
457 dy30 = _mm_sub_ps(iy3,jy0);
458 dz30 = _mm_sub_ps(iz3,jz0);
459
460 /* Calculate squared distance and things based on it */
461 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
462 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
463 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
464 rsq30 = gmx_mm_calc_rsq_ps(dx30,dy30,dz30);
465
466 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
467 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
468 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
469 rinv30 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq30);
470
471 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
472 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
473 rinvsq30 = _mm_mul_ps(rinv30,rinv30);
474
475 /* Load parameters for j particles */
476 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
477 charge+jnrC+0,charge+jnrD+0);
478 vdwjidx0A = 2*vdwtype[jnrA+0];
479 vdwjidx0B = 2*vdwtype[jnrB+0];
480 vdwjidx0C = 2*vdwtype[jnrC+0];
481 vdwjidx0D = 2*vdwtype[jnrD+0];
482
483 fjx0 = _mm_setzero_ps();
484 fjy0 = _mm_setzero_ps();
485 fjz0 = _mm_setzero_ps();
486
487 /**************************
488 * CALCULATE INTERACTIONS *
489 **************************/
490
491 r00 = _mm_mul_ps(rsq00,rinv00);
492 r00 = _mm_andnot_ps(dummy_mask,r00);
493
494 /* Compute parameters for interactions between i and j atoms */
495 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
496 vdwparam+vdwioffset0+vdwjidx0B,
497 vdwparam+vdwioffset0+vdwjidx0C,
498 vdwparam+vdwioffset0+vdwjidx0D,
499 &c6_00,&c12_00);
500
501 /* Calculate table index by multiplying r with table scale and truncate to integer */
502 rt = _mm_mul_ps(r00,vftabscale);
503 vfitab = _mm_cvttps_epi32(rt);
504 vfeps = _mm_sub_ps(rt,_mm_round_ps(rt, _MM_FROUND_FLOOR)__extension__ ({ __m128 __X = (rt); (__m128) __builtin_ia32_roundps
((__v4sf)__X, ((0x00 | 0x01))); })
);
505 vfitab = _mm_slli_epi32(vfitab,3);
506
507 /* CUBIC SPLINE TABLE DISPERSION */
508 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
509 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
510 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
511 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
512 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
513 Heps = _mm_mul_ps(vfeps,H);
514 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
515 VV = _mm_add_ps(Y,_mm_mul_ps(vfeps,Fp));
516 vvdw6 = _mm_mul_ps(c6_00,VV);
517 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
518 fvdw6 = _mm_mul_ps(c6_00,FF);
519
520 /* CUBIC SPLINE TABLE REPULSION */
521 vfitab = _mm_add_epi32(vfitab,ifour);
522 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
523 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
524 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
525 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
526 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
527 Heps = _mm_mul_ps(vfeps,H);
528 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
529 VV = _mm_add_ps(Y,_mm_mul_ps(vfeps,Fp));
530 vvdw12 = _mm_mul_ps(c12_00,VV);
531 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
532 fvdw12 = _mm_mul_ps(c12_00,FF);
533 vvdw = _mm_add_ps(vvdw12,vvdw6);
534 fvdw = _mm_xor_ps(signbit,_mm_mul_ps(_mm_add_ps(fvdw6,fvdw12),_mm_mul_ps(vftabscale,rinv00)));
535
536 /* Update potential sum for this i atom from the interaction with this j atom. */
537 vvdw = _mm_andnot_ps(dummy_mask,vvdw);
538 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
539
540 fscal = fvdw;
541
542 fscal = _mm_andnot_ps(dummy_mask,fscal);
543
544 /* Calculate temporary vectorial force */
545 tx = _mm_mul_ps(fscal,dx00);
546 ty = _mm_mul_ps(fscal,dy00);
547 tz = _mm_mul_ps(fscal,dz00);
548
549 /* Update vectorial force */
550 fix0 = _mm_add_ps(fix0,tx);
551 fiy0 = _mm_add_ps(fiy0,ty);
552 fiz0 = _mm_add_ps(fiz0,tz);
553
554 fjx0 = _mm_add_ps(fjx0,tx);
555 fjy0 = _mm_add_ps(fjy0,ty);
556 fjz0 = _mm_add_ps(fjz0,tz);
557
558 /**************************
559 * CALCULATE INTERACTIONS *
560 **************************/
561
562 /* Compute parameters for interactions between i and j atoms */
563 qq10 = _mm_mul_ps(iq1,jq0);
564
565 /* COULOMB ELECTROSTATICS */
566 velec = _mm_mul_ps(qq10,rinv10);
567 felec = _mm_mul_ps(velec,rinvsq10);
568
569 /* Update potential sum for this i atom from the interaction with this j atom. */
570 velec = _mm_andnot_ps(dummy_mask,velec);
571 velecsum = _mm_add_ps(velecsum,velec);
572
573 fscal = felec;
574
575 fscal = _mm_andnot_ps(dummy_mask,fscal);
576
577 /* Calculate temporary vectorial force */
578 tx = _mm_mul_ps(fscal,dx10);
579 ty = _mm_mul_ps(fscal,dy10);
580 tz = _mm_mul_ps(fscal,dz10);
581
582 /* Update vectorial force */
583 fix1 = _mm_add_ps(fix1,tx);
584 fiy1 = _mm_add_ps(fiy1,ty);
585 fiz1 = _mm_add_ps(fiz1,tz);
586
587 fjx0 = _mm_add_ps(fjx0,tx);
588 fjy0 = _mm_add_ps(fjy0,ty);
589 fjz0 = _mm_add_ps(fjz0,tz);
590
591 /**************************
592 * CALCULATE INTERACTIONS *
593 **************************/
594
595 /* Compute parameters for interactions between i and j atoms */
596 qq20 = _mm_mul_ps(iq2,jq0);
597
598 /* COULOMB ELECTROSTATICS */
599 velec = _mm_mul_ps(qq20,rinv20);
600 felec = _mm_mul_ps(velec,rinvsq20);
601
602 /* Update potential sum for this i atom from the interaction with this j atom. */
603 velec = _mm_andnot_ps(dummy_mask,velec);
604 velecsum = _mm_add_ps(velecsum,velec);
605
606 fscal = felec;
607
608 fscal = _mm_andnot_ps(dummy_mask,fscal);
609
610 /* Calculate temporary vectorial force */
611 tx = _mm_mul_ps(fscal,dx20);
612 ty = _mm_mul_ps(fscal,dy20);
613 tz = _mm_mul_ps(fscal,dz20);
614
615 /* Update vectorial force */
616 fix2 = _mm_add_ps(fix2,tx);
617 fiy2 = _mm_add_ps(fiy2,ty);
618 fiz2 = _mm_add_ps(fiz2,tz);
619
620 fjx0 = _mm_add_ps(fjx0,tx);
621 fjy0 = _mm_add_ps(fjy0,ty);
622 fjz0 = _mm_add_ps(fjz0,tz);
623
624 /**************************
625 * CALCULATE INTERACTIONS *
626 **************************/
627
628 /* Compute parameters for interactions between i and j atoms */
629 qq30 = _mm_mul_ps(iq3,jq0);
630
631 /* COULOMB ELECTROSTATICS */
632 velec = _mm_mul_ps(qq30,rinv30);
633 felec = _mm_mul_ps(velec,rinvsq30);
634
635 /* Update potential sum for this i atom from the interaction with this j atom. */
636 velec = _mm_andnot_ps(dummy_mask,velec);
637 velecsum = _mm_add_ps(velecsum,velec);
638
639 fscal = felec;
640
641 fscal = _mm_andnot_ps(dummy_mask,fscal);
642
643 /* Calculate temporary vectorial force */
644 tx = _mm_mul_ps(fscal,dx30);
645 ty = _mm_mul_ps(fscal,dy30);
646 tz = _mm_mul_ps(fscal,dz30);
647
648 /* Update vectorial force */
649 fix3 = _mm_add_ps(fix3,tx);
650 fiy3 = _mm_add_ps(fiy3,ty);
651 fiz3 = _mm_add_ps(fiz3,tz);
652
653 fjx0 = _mm_add_ps(fjx0,tx);
654 fjy0 = _mm_add_ps(fjy0,ty);
655 fjz0 = _mm_add_ps(fjz0,tz);
656
657 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
658 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
659 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
660 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
661
662 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
663
664 /* Inner loop uses 141 flops */
665 }
666
667 /* End of innermost loop */
668
669 gmx_mm_update_iforce_4atom_swizzle_ps(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,fix3,fiy3,fiz3,
670 f+i_coord_offset,fshift+i_shift_offset);
671
672 ggid = gid[iidx];
673 /* Update potential energies */
674 gmx_mm_update_1pot_ps(velecsum,kernel_data->energygrp_elec+ggid);
675 gmx_mm_update_1pot_ps(vvdwsum,kernel_data->energygrp_vdw+ggid);
676
677 /* Increment number of inner iterations */
678 inneriter += j_index_end - j_index_start;
679
680 /* Outer loop uses 26 flops */
681 }
682
683 /* Increment number of outer iterations */
684 outeriter += nri;
685
686 /* Update outer/inner flops */
687
688 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W4_VF,outeriter*26 + inneriter*141)(nrnb)->n[eNR_NBKERNEL_ELEC_VDW_W4_VF] += outeriter*26 + inneriter
*141
;
689}
690/*
691 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwCSTab_GeomW4P1_F_sse4_1_single
692 * Electrostatics interaction: Coulomb
693 * VdW interaction: CubicSplineTable
694 * Geometry: Water4-Particle
695 * Calculate force/pot: Force
696 */
697void
698nb_kernel_ElecCoul_VdwCSTab_GeomW4P1_F_sse4_1_single
699 (t_nblist * gmx_restrict nlist,
700 rvec * gmx_restrict xx,
701 rvec * gmx_restrict ff,
702 t_forcerec * gmx_restrict fr,
703 t_mdatoms * gmx_restrict mdatoms,
704 nb_kernel_data_t gmx_unused__attribute__ ((unused)) * gmx_restrict kernel_data,
705 t_nrnb * gmx_restrict nrnb)
706{
707 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
708 * just 0 for non-waters.
709 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
710 * jnr indices corresponding to data put in the four positions in the SIMD register.
711 */
712 int i_shift_offset,i_coord_offset,outeriter,inneriter;
713 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
714 int jnrA,jnrB,jnrC,jnrD;
715 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
716 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
717 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
718 real rcutoff_scalar;
719 real *shiftvec,*fshift,*x,*f;
720 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
721 real scratch[4*DIM3];
722 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
723 int vdwioffset0;
724 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
725 int vdwioffset1;
726 __m128 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
727 int vdwioffset2;
728 __m128 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
729 int vdwioffset3;
730 __m128 ix3,iy3,iz3,fix3,fiy3,fiz3,iq3,isai3;
731 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
732 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
733 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
734 __m128 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
735 __m128 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
736 __m128 dx30,dy30,dz30,rsq30,rinv30,rinvsq30,r30,qq30,c6_30,c12_30;
737 __m128 velec,felec,velecsum,facel,crf,krf,krf2;
738 real *charge;
739 int nvdwtype;
740 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
741 int *vdwtype;
742 real *vdwparam;
743 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
744 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
745 __m128i vfitab;
746 __m128i ifour = _mm_set1_epi32(4);
747 __m128 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF;
748 real *vftab;
749 __m128 dummy_mask,cutoff_mask;
750 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
751 __m128 one = _mm_set1_ps(1.0);
Value stored to 'one' during its initialization is never read
752 __m128 two = _mm_set1_ps(2.0);
753 x = xx[0];
754 f = ff[0];
755
756 nri = nlist->nri;
757 iinr = nlist->iinr;
758 jindex = nlist->jindex;
759 jjnr = nlist->jjnr;
760 shiftidx = nlist->shift;
761 gid = nlist->gid;
762 shiftvec = fr->shift_vec[0];
763 fshift = fr->fshift[0];
764 facel = _mm_set1_ps(fr->epsfac);
765 charge = mdatoms->chargeA;
766 nvdwtype = fr->ntype;
767 vdwparam = fr->nbfp;
768 vdwtype = mdatoms->typeA;
769
770 vftab = kernel_data->table_vdw->data;
771 vftabscale = _mm_set1_ps(kernel_data->table_vdw->scale);
772
773 /* Setup water-specific parameters */
774 inr = nlist->iinr[0];
775 iq1 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+1]));
776 iq2 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+2]));
777 iq3 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+3]));
778 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
779
780 /* Avoid stupid compiler warnings */
781 jnrA = jnrB = jnrC = jnrD = 0;
782 j_coord_offsetA = 0;
783 j_coord_offsetB = 0;
784 j_coord_offsetC = 0;
785 j_coord_offsetD = 0;
786
787 outeriter = 0;
788 inneriter = 0;
789
790 for(iidx=0;iidx<4*DIM3;iidx++)
791 {
792 scratch[iidx] = 0.0;
793 }
794
795 /* Start outer loop over neighborlists */
796 for(iidx=0; iidx<nri; iidx++)
797 {
798 /* Load shift vector for this list */
799 i_shift_offset = DIM3*shiftidx[iidx];
800
801 /* Load limits for loop over neighbors */
802 j_index_start = jindex[iidx];
803 j_index_end = jindex[iidx+1];
804
805 /* Get outer coordinate index */
806 inr = iinr[iidx];
807 i_coord_offset = DIM3*inr;
808
809 /* Load i particle coords and add shift vector */
810 gmx_mm_load_shift_and_4rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,
811 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2,&ix3,&iy3,&iz3);
812
813 fix0 = _mm_setzero_ps();
814 fiy0 = _mm_setzero_ps();
815 fiz0 = _mm_setzero_ps();
816 fix1 = _mm_setzero_ps();
817 fiy1 = _mm_setzero_ps();
818 fiz1 = _mm_setzero_ps();
819 fix2 = _mm_setzero_ps();
820 fiy2 = _mm_setzero_ps();
821 fiz2 = _mm_setzero_ps();
822 fix3 = _mm_setzero_ps();
823 fiy3 = _mm_setzero_ps();
824 fiz3 = _mm_setzero_ps();
825
826 /* Start inner kernel loop */
827 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
828 {
829
830 /* Get j neighbor index, and coordinate index */
831 jnrA = jjnr[jidx];
832 jnrB = jjnr[jidx+1];
833 jnrC = jjnr[jidx+2];
834 jnrD = jjnr[jidx+3];
835 j_coord_offsetA = DIM3*jnrA;
836 j_coord_offsetB = DIM3*jnrB;
837 j_coord_offsetC = DIM3*jnrC;
838 j_coord_offsetD = DIM3*jnrD;
839
840 /* load j atom coordinates */
841 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
842 x+j_coord_offsetC,x+j_coord_offsetD,
843 &jx0,&jy0,&jz0);
844
845 /* Calculate displacement vector */
846 dx00 = _mm_sub_ps(ix0,jx0);
847 dy00 = _mm_sub_ps(iy0,jy0);
848 dz00 = _mm_sub_ps(iz0,jz0);
849 dx10 = _mm_sub_ps(ix1,jx0);
850 dy10 = _mm_sub_ps(iy1,jy0);
851 dz10 = _mm_sub_ps(iz1,jz0);
852 dx20 = _mm_sub_ps(ix2,jx0);
853 dy20 = _mm_sub_ps(iy2,jy0);
854 dz20 = _mm_sub_ps(iz2,jz0);
855 dx30 = _mm_sub_ps(ix3,jx0);
856 dy30 = _mm_sub_ps(iy3,jy0);
857 dz30 = _mm_sub_ps(iz3,jz0);
858
859 /* Calculate squared distance and things based on it */
860 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
861 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
862 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
863 rsq30 = gmx_mm_calc_rsq_ps(dx30,dy30,dz30);
864
865 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
866 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
867 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
868 rinv30 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq30);
869
870 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
871 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
872 rinvsq30 = _mm_mul_ps(rinv30,rinv30);
873
874 /* Load parameters for j particles */
875 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
876 charge+jnrC+0,charge+jnrD+0);
877 vdwjidx0A = 2*vdwtype[jnrA+0];
878 vdwjidx0B = 2*vdwtype[jnrB+0];
879 vdwjidx0C = 2*vdwtype[jnrC+0];
880 vdwjidx0D = 2*vdwtype[jnrD+0];
881
882 fjx0 = _mm_setzero_ps();
883 fjy0 = _mm_setzero_ps();
884 fjz0 = _mm_setzero_ps();
885
886 /**************************
887 * CALCULATE INTERACTIONS *
888 **************************/
889
890 r00 = _mm_mul_ps(rsq00,rinv00);
891
892 /* Compute parameters for interactions between i and j atoms */
893 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
894 vdwparam+vdwioffset0+vdwjidx0B,
895 vdwparam+vdwioffset0+vdwjidx0C,
896 vdwparam+vdwioffset0+vdwjidx0D,
897 &c6_00,&c12_00);
898
899 /* Calculate table index by multiplying r with table scale and truncate to integer */
900 rt = _mm_mul_ps(r00,vftabscale);
901 vfitab = _mm_cvttps_epi32(rt);
902 vfeps = _mm_sub_ps(rt,_mm_round_ps(rt, _MM_FROUND_FLOOR)__extension__ ({ __m128 __X = (rt); (__m128) __builtin_ia32_roundps
((__v4sf)__X, ((0x00 | 0x01))); })
);
903 vfitab = _mm_slli_epi32(vfitab,3);
904
905 /* CUBIC SPLINE TABLE DISPERSION */
906 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
907 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
908 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
909 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
910 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
911 Heps = _mm_mul_ps(vfeps,H);
912 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
913 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
914 fvdw6 = _mm_mul_ps(c6_00,FF);
915
916 /* CUBIC SPLINE TABLE REPULSION */
917 vfitab = _mm_add_epi32(vfitab,ifour);
918 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
919 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
920 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
921 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
922 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
923 Heps = _mm_mul_ps(vfeps,H);
924 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
925 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
926 fvdw12 = _mm_mul_ps(c12_00,FF);
927 fvdw = _mm_xor_ps(signbit,_mm_mul_ps(_mm_add_ps(fvdw6,fvdw12),_mm_mul_ps(vftabscale,rinv00)));
928
929 fscal = fvdw;
930
931 /* Calculate temporary vectorial force */
932 tx = _mm_mul_ps(fscal,dx00);
933 ty = _mm_mul_ps(fscal,dy00);
934 tz = _mm_mul_ps(fscal,dz00);
935
936 /* Update vectorial force */
937 fix0 = _mm_add_ps(fix0,tx);
938 fiy0 = _mm_add_ps(fiy0,ty);
939 fiz0 = _mm_add_ps(fiz0,tz);
940
941 fjx0 = _mm_add_ps(fjx0,tx);
942 fjy0 = _mm_add_ps(fjy0,ty);
943 fjz0 = _mm_add_ps(fjz0,tz);
944
945 /**************************
946 * CALCULATE INTERACTIONS *
947 **************************/
948
949 /* Compute parameters for interactions between i and j atoms */
950 qq10 = _mm_mul_ps(iq1,jq0);
951
952 /* COULOMB ELECTROSTATICS */
953 velec = _mm_mul_ps(qq10,rinv10);
954 felec = _mm_mul_ps(velec,rinvsq10);
955
956 fscal = felec;
957
958 /* Calculate temporary vectorial force */
959 tx = _mm_mul_ps(fscal,dx10);
960 ty = _mm_mul_ps(fscal,dy10);
961 tz = _mm_mul_ps(fscal,dz10);
962
963 /* Update vectorial force */
964 fix1 = _mm_add_ps(fix1,tx);
965 fiy1 = _mm_add_ps(fiy1,ty);
966 fiz1 = _mm_add_ps(fiz1,tz);
967
968 fjx0 = _mm_add_ps(fjx0,tx);
969 fjy0 = _mm_add_ps(fjy0,ty);
970 fjz0 = _mm_add_ps(fjz0,tz);
971
972 /**************************
973 * CALCULATE INTERACTIONS *
974 **************************/
975
976 /* Compute parameters for interactions between i and j atoms */
977 qq20 = _mm_mul_ps(iq2,jq0);
978
979 /* COULOMB ELECTROSTATICS */
980 velec = _mm_mul_ps(qq20,rinv20);
981 felec = _mm_mul_ps(velec,rinvsq20);
982
983 fscal = felec;
984
985 /* Calculate temporary vectorial force */
986 tx = _mm_mul_ps(fscal,dx20);
987 ty = _mm_mul_ps(fscal,dy20);
988 tz = _mm_mul_ps(fscal,dz20);
989
990 /* Update vectorial force */
991 fix2 = _mm_add_ps(fix2,tx);
992 fiy2 = _mm_add_ps(fiy2,ty);
993 fiz2 = _mm_add_ps(fiz2,tz);
994
995 fjx0 = _mm_add_ps(fjx0,tx);
996 fjy0 = _mm_add_ps(fjy0,ty);
997 fjz0 = _mm_add_ps(fjz0,tz);
998
999 /**************************
1000 * CALCULATE INTERACTIONS *
1001 **************************/
1002
1003 /* Compute parameters for interactions between i and j atoms */
1004 qq30 = _mm_mul_ps(iq3,jq0);
1005
1006 /* COULOMB ELECTROSTATICS */
1007 velec = _mm_mul_ps(qq30,rinv30);
1008 felec = _mm_mul_ps(velec,rinvsq30);
1009
1010 fscal = felec;
1011
1012 /* Calculate temporary vectorial force */
1013 tx = _mm_mul_ps(fscal,dx30);
1014 ty = _mm_mul_ps(fscal,dy30);
1015 tz = _mm_mul_ps(fscal,dz30);
1016
1017 /* Update vectorial force */
1018 fix3 = _mm_add_ps(fix3,tx);
1019 fiy3 = _mm_add_ps(fiy3,ty);
1020 fiz3 = _mm_add_ps(fiz3,tz);
1021
1022 fjx0 = _mm_add_ps(fjx0,tx);
1023 fjy0 = _mm_add_ps(fjy0,ty);
1024 fjz0 = _mm_add_ps(fjz0,tz);
1025
1026 fjptrA = f+j_coord_offsetA;
1027 fjptrB = f+j_coord_offsetB;
1028 fjptrC = f+j_coord_offsetC;
1029 fjptrD = f+j_coord_offsetD;
1030
1031 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
1032
1033 /* Inner loop uses 129 flops */
1034 }
1035
1036 if(jidx<j_index_end)
1037 {
1038
1039 /* Get j neighbor index, and coordinate index */
1040 jnrlistA = jjnr[jidx];
1041 jnrlistB = jjnr[jidx+1];
1042 jnrlistC = jjnr[jidx+2];
1043 jnrlistD = jjnr[jidx+3];
1044 /* Sign of each element will be negative for non-real atoms.
1045 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
1046 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
1047 */
1048 dummy_mask = gmx_mm_castsi128_ps_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
1049 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
1050 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
1051 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
1052 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
1053 j_coord_offsetA = DIM3*jnrA;
1054 j_coord_offsetB = DIM3*jnrB;
1055 j_coord_offsetC = DIM3*jnrC;
1056 j_coord_offsetD = DIM3*jnrD;
1057
1058 /* load j atom coordinates */
1059 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
1060 x+j_coord_offsetC,x+j_coord_offsetD,
1061 &jx0,&jy0,&jz0);
1062
1063 /* Calculate displacement vector */
1064 dx00 = _mm_sub_ps(ix0,jx0);
1065 dy00 = _mm_sub_ps(iy0,jy0);
1066 dz00 = _mm_sub_ps(iz0,jz0);
1067 dx10 = _mm_sub_ps(ix1,jx0);
1068 dy10 = _mm_sub_ps(iy1,jy0);
1069 dz10 = _mm_sub_ps(iz1,jz0);
1070 dx20 = _mm_sub_ps(ix2,jx0);
1071 dy20 = _mm_sub_ps(iy2,jy0);
1072 dz20 = _mm_sub_ps(iz2,jz0);
1073 dx30 = _mm_sub_ps(ix3,jx0);
1074 dy30 = _mm_sub_ps(iy3,jy0);
1075 dz30 = _mm_sub_ps(iz3,jz0);
1076
1077 /* Calculate squared distance and things based on it */
1078 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
1079 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
1080 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
1081 rsq30 = gmx_mm_calc_rsq_ps(dx30,dy30,dz30);
1082
1083 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
1084 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
1085 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
1086 rinv30 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq30);
1087
1088 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
1089 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
1090 rinvsq30 = _mm_mul_ps(rinv30,rinv30);
1091
1092 /* Load parameters for j particles */
1093 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
1094 charge+jnrC+0,charge+jnrD+0);
1095 vdwjidx0A = 2*vdwtype[jnrA+0];
1096 vdwjidx0B = 2*vdwtype[jnrB+0];
1097 vdwjidx0C = 2*vdwtype[jnrC+0];
1098 vdwjidx0D = 2*vdwtype[jnrD+0];
1099
1100 fjx0 = _mm_setzero_ps();
1101 fjy0 = _mm_setzero_ps();
1102 fjz0 = _mm_setzero_ps();
1103
1104 /**************************
1105 * CALCULATE INTERACTIONS *
1106 **************************/
1107
1108 r00 = _mm_mul_ps(rsq00,rinv00);
1109 r00 = _mm_andnot_ps(dummy_mask,r00);
1110
1111 /* Compute parameters for interactions between i and j atoms */
1112 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
1113 vdwparam+vdwioffset0+vdwjidx0B,
1114 vdwparam+vdwioffset0+vdwjidx0C,
1115 vdwparam+vdwioffset0+vdwjidx0D,
1116 &c6_00,&c12_00);
1117
1118 /* Calculate table index by multiplying r with table scale and truncate to integer */
1119 rt = _mm_mul_ps(r00,vftabscale);
1120 vfitab = _mm_cvttps_epi32(rt);
1121 vfeps = _mm_sub_ps(rt,_mm_round_ps(rt, _MM_FROUND_FLOOR)__extension__ ({ __m128 __X = (rt); (__m128) __builtin_ia32_roundps
((__v4sf)__X, ((0x00 | 0x01))); })
);
1122 vfitab = _mm_slli_epi32(vfitab,3);
1123
1124 /* CUBIC SPLINE TABLE DISPERSION */
1125 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
1126 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
1127 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
1128 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
1129 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
1130 Heps = _mm_mul_ps(vfeps,H);
1131 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
1132 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
1133 fvdw6 = _mm_mul_ps(c6_00,FF);
1134
1135 /* CUBIC SPLINE TABLE REPULSION */
1136 vfitab = _mm_add_epi32(vfitab,ifour);
1137 Y = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,0)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(0) &
3];}))
);
1138 F = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,1)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(1) &
3];}))
);
1139 G = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,2)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(2) &
3];}))
);
1140 H = _mm_load_ps( vftab + gmx_mm_extract_epi32(vfitab,3)(__extension__ ({ __v4si __a = (__v4si)(vfitab); __a[(3) &
3];}))
);
1141 _MM_TRANSPOSE4_PS(Y,F,G,H)do { __m128 tmp3, tmp2, tmp1, tmp0; tmp0 = _mm_unpacklo_ps((Y
), (F)); tmp2 = _mm_unpacklo_ps((G), (H)); tmp1 = _mm_unpackhi_ps
((Y), (F)); tmp3 = _mm_unpackhi_ps((G), (H)); (Y) = _mm_movelh_ps
(tmp0, tmp2); (F) = _mm_movehl_ps(tmp2, tmp0); (G) = _mm_movelh_ps
(tmp1, tmp3); (H) = _mm_movehl_ps(tmp3, tmp1); } while (0)
;
1142 Heps = _mm_mul_ps(vfeps,H);
1143 Fp = _mm_add_ps(F,_mm_mul_ps(vfeps,_mm_add_ps(G,Heps)));
1144 FF = _mm_add_ps(Fp,_mm_mul_ps(vfeps,_mm_add_ps(G,_mm_add_ps(Heps,Heps))));
1145 fvdw12 = _mm_mul_ps(c12_00,FF);
1146 fvdw = _mm_xor_ps(signbit,_mm_mul_ps(_mm_add_ps(fvdw6,fvdw12),_mm_mul_ps(vftabscale,rinv00)));
1147
1148 fscal = fvdw;
1149
1150 fscal = _mm_andnot_ps(dummy_mask,fscal);
1151
1152 /* Calculate temporary vectorial force */
1153 tx = _mm_mul_ps(fscal,dx00);
1154 ty = _mm_mul_ps(fscal,dy00);
1155 tz = _mm_mul_ps(fscal,dz00);
1156
1157 /* Update vectorial force */
1158 fix0 = _mm_add_ps(fix0,tx);
1159 fiy0 = _mm_add_ps(fiy0,ty);
1160 fiz0 = _mm_add_ps(fiz0,tz);
1161
1162 fjx0 = _mm_add_ps(fjx0,tx);
1163 fjy0 = _mm_add_ps(fjy0,ty);
1164 fjz0 = _mm_add_ps(fjz0,tz);
1165
1166 /**************************
1167 * CALCULATE INTERACTIONS *
1168 **************************/
1169
1170 /* Compute parameters for interactions between i and j atoms */
1171 qq10 = _mm_mul_ps(iq1,jq0);
1172
1173 /* COULOMB ELECTROSTATICS */
1174 velec = _mm_mul_ps(qq10,rinv10);
1175 felec = _mm_mul_ps(velec,rinvsq10);
1176
1177 fscal = felec;
1178
1179 fscal = _mm_andnot_ps(dummy_mask,fscal);
1180
1181 /* Calculate temporary vectorial force */
1182 tx = _mm_mul_ps(fscal,dx10);
1183 ty = _mm_mul_ps(fscal,dy10);
1184 tz = _mm_mul_ps(fscal,dz10);
1185
1186 /* Update vectorial force */
1187 fix1 = _mm_add_ps(fix1,tx);
1188 fiy1 = _mm_add_ps(fiy1,ty);
1189 fiz1 = _mm_add_ps(fiz1,tz);
1190
1191 fjx0 = _mm_add_ps(fjx0,tx);
1192 fjy0 = _mm_add_ps(fjy0,ty);
1193 fjz0 = _mm_add_ps(fjz0,tz);
1194
1195 /**************************
1196 * CALCULATE INTERACTIONS *
1197 **************************/
1198
1199 /* Compute parameters for interactions between i and j atoms */
1200 qq20 = _mm_mul_ps(iq2,jq0);
1201
1202 /* COULOMB ELECTROSTATICS */
1203 velec = _mm_mul_ps(qq20,rinv20);
1204 felec = _mm_mul_ps(velec,rinvsq20);
1205
1206 fscal = felec;
1207
1208 fscal = _mm_andnot_ps(dummy_mask,fscal);
1209
1210 /* Calculate temporary vectorial force */
1211 tx = _mm_mul_ps(fscal,dx20);
1212 ty = _mm_mul_ps(fscal,dy20);
1213 tz = _mm_mul_ps(fscal,dz20);
1214
1215 /* Update vectorial force */
1216 fix2 = _mm_add_ps(fix2,tx);
1217 fiy2 = _mm_add_ps(fiy2,ty);
1218 fiz2 = _mm_add_ps(fiz2,tz);
1219
1220 fjx0 = _mm_add_ps(fjx0,tx);
1221 fjy0 = _mm_add_ps(fjy0,ty);
1222 fjz0 = _mm_add_ps(fjz0,tz);
1223
1224 /**************************
1225 * CALCULATE INTERACTIONS *
1226 **************************/
1227
1228 /* Compute parameters for interactions between i and j atoms */
1229 qq30 = _mm_mul_ps(iq3,jq0);
1230
1231 /* COULOMB ELECTROSTATICS */
1232 velec = _mm_mul_ps(qq30,rinv30);
1233 felec = _mm_mul_ps(velec,rinvsq30);
1234
1235 fscal = felec;
1236
1237 fscal = _mm_andnot_ps(dummy_mask,fscal);
1238
1239 /* Calculate temporary vectorial force */
1240 tx = _mm_mul_ps(fscal,dx30);
1241 ty = _mm_mul_ps(fscal,dy30);
1242 tz = _mm_mul_ps(fscal,dz30);
1243
1244 /* Update vectorial force */
1245 fix3 = _mm_add_ps(fix3,tx);
1246 fiy3 = _mm_add_ps(fiy3,ty);
1247 fiz3 = _mm_add_ps(fiz3,tz);
1248
1249 fjx0 = _mm_add_ps(fjx0,tx);
1250 fjy0 = _mm_add_ps(fjy0,ty);
1251 fjz0 = _mm_add_ps(fjz0,tz);
1252
1253 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
1254 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
1255 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
1256 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
1257
1258 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
1259
1260 /* Inner loop uses 130 flops */
1261 }
1262
1263 /* End of innermost loop */
1264
1265 gmx_mm_update_iforce_4atom_swizzle_ps(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,fix3,fiy3,fiz3,
1266 f+i_coord_offset,fshift+i_shift_offset);
1267
1268 /* Increment number of inner iterations */
1269 inneriter += j_index_end - j_index_start;
1270
1271 /* Outer loop uses 24 flops */
1272 }
1273
1274 /* Increment number of outer iterations */
1275 outeriter += nri;
1276
1277 /* Update outer/inner flops */
1278
1279 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W4_F,outeriter*24 + inneriter*130)(nrnb)->n[eNR_NBKERNEL_ELEC_VDW_W4_F] += outeriter*24 + inneriter
*130
;
1280}