Bug Summary

File:gromacs/gmxlib/nonbonded/nb_kernel_sse4_1_single/nb_kernel_ElecCoul_VdwLJ_GeomW3P1_sse4_1_single.c
Location:line 105, column 22
Description:Value stored to 'signbit' 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_VdwLJ_GeomW3P1_VF_sse4_1_single
54 * Electrostatics interaction: Coulomb
55 * VdW interaction: LennardJones
56 * Geometry: Water3-Particle
57 * Calculate force/pot: PotentialAndForce
58 */
59void
60nb_kernel_ElecCoul_VdwLJ_GeomW3P1_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 vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
92 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
93 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
94 __m128 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
95 __m128 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
96 __m128 velec,felec,velecsum,facel,crf,krf,krf2;
97 real *charge;
98 int nvdwtype;
99 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
100 int *vdwtype;
101 real *vdwparam;
102 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
103 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
104 __m128 dummy_mask,cutoff_mask;
105 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
Value stored to 'signbit' during its initialization is never read
106 __m128 one = _mm_set1_ps(1.0);
107 __m128 two = _mm_set1_ps(2.0);
108 x = xx[0];
109 f = ff[0];
110
111 nri = nlist->nri;
112 iinr = nlist->iinr;
113 jindex = nlist->jindex;
114 jjnr = nlist->jjnr;
115 shiftidx = nlist->shift;
116 gid = nlist->gid;
117 shiftvec = fr->shift_vec[0];
118 fshift = fr->fshift[0];
119 facel = _mm_set1_ps(fr->epsfac);
120 charge = mdatoms->chargeA;
121 nvdwtype = fr->ntype;
122 vdwparam = fr->nbfp;
123 vdwtype = mdatoms->typeA;
124
125 /* Setup water-specific parameters */
126 inr = nlist->iinr[0];
127 iq0 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+0]));
128 iq1 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+1]));
129 iq2 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+2]));
130 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
131
132 /* Avoid stupid compiler warnings */
133 jnrA = jnrB = jnrC = jnrD = 0;
134 j_coord_offsetA = 0;
135 j_coord_offsetB = 0;
136 j_coord_offsetC = 0;
137 j_coord_offsetD = 0;
138
139 outeriter = 0;
140 inneriter = 0;
141
142 for(iidx=0;iidx<4*DIM3;iidx++)
143 {
144 scratch[iidx] = 0.0;
145 }
146
147 /* Start outer loop over neighborlists */
148 for(iidx=0; iidx<nri; iidx++)
149 {
150 /* Load shift vector for this list */
151 i_shift_offset = DIM3*shiftidx[iidx];
152
153 /* Load limits for loop over neighbors */
154 j_index_start = jindex[iidx];
155 j_index_end = jindex[iidx+1];
156
157 /* Get outer coordinate index */
158 inr = iinr[iidx];
159 i_coord_offset = DIM3*inr;
160
161 /* Load i particle coords and add shift vector */
162 gmx_mm_load_shift_and_3rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,
163 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
164
165 fix0 = _mm_setzero_ps();
166 fiy0 = _mm_setzero_ps();
167 fiz0 = _mm_setzero_ps();
168 fix1 = _mm_setzero_ps();
169 fiy1 = _mm_setzero_ps();
170 fiz1 = _mm_setzero_ps();
171 fix2 = _mm_setzero_ps();
172 fiy2 = _mm_setzero_ps();
173 fiz2 = _mm_setzero_ps();
174
175 /* Reset potential sums */
176 velecsum = _mm_setzero_ps();
177 vvdwsum = _mm_setzero_ps();
178
179 /* Start inner kernel loop */
180 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
181 {
182
183 /* Get j neighbor index, and coordinate index */
184 jnrA = jjnr[jidx];
185 jnrB = jjnr[jidx+1];
186 jnrC = jjnr[jidx+2];
187 jnrD = jjnr[jidx+3];
188 j_coord_offsetA = DIM3*jnrA;
189 j_coord_offsetB = DIM3*jnrB;
190 j_coord_offsetC = DIM3*jnrC;
191 j_coord_offsetD = DIM3*jnrD;
192
193 /* load j atom coordinates */
194 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
195 x+j_coord_offsetC,x+j_coord_offsetD,
196 &jx0,&jy0,&jz0);
197
198 /* Calculate displacement vector */
199 dx00 = _mm_sub_ps(ix0,jx0);
200 dy00 = _mm_sub_ps(iy0,jy0);
201 dz00 = _mm_sub_ps(iz0,jz0);
202 dx10 = _mm_sub_ps(ix1,jx0);
203 dy10 = _mm_sub_ps(iy1,jy0);
204 dz10 = _mm_sub_ps(iz1,jz0);
205 dx20 = _mm_sub_ps(ix2,jx0);
206 dy20 = _mm_sub_ps(iy2,jy0);
207 dz20 = _mm_sub_ps(iz2,jz0);
208
209 /* Calculate squared distance and things based on it */
210 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
211 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
212 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
213
214 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
215 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
216 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
217
218 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
219 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
220 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
221
222 /* Load parameters for j particles */
223 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
224 charge+jnrC+0,charge+jnrD+0);
225 vdwjidx0A = 2*vdwtype[jnrA+0];
226 vdwjidx0B = 2*vdwtype[jnrB+0];
227 vdwjidx0C = 2*vdwtype[jnrC+0];
228 vdwjidx0D = 2*vdwtype[jnrD+0];
229
230 fjx0 = _mm_setzero_ps();
231 fjy0 = _mm_setzero_ps();
232 fjz0 = _mm_setzero_ps();
233
234 /**************************
235 * CALCULATE INTERACTIONS *
236 **************************/
237
238 /* Compute parameters for interactions between i and j atoms */
239 qq00 = _mm_mul_ps(iq0,jq0);
240 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
241 vdwparam+vdwioffset0+vdwjidx0B,
242 vdwparam+vdwioffset0+vdwjidx0C,
243 vdwparam+vdwioffset0+vdwjidx0D,
244 &c6_00,&c12_00);
245
246 /* COULOMB ELECTROSTATICS */
247 velec = _mm_mul_ps(qq00,rinv00);
248 felec = _mm_mul_ps(velec,rinvsq00);
249
250 /* LENNARD-JONES DISPERSION/REPULSION */
251
252 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
253 vvdw6 = _mm_mul_ps(c6_00,rinvsix);
254 vvdw12 = _mm_mul_ps(c12_00,_mm_mul_ps(rinvsix,rinvsix));
255 vvdw = _mm_sub_ps( _mm_mul_ps(vvdw12,one_twelfth) , _mm_mul_ps(vvdw6,one_sixth) );
256 fvdw = _mm_mul_ps(_mm_sub_ps(vvdw12,vvdw6),rinvsq00);
257
258 /* Update potential sum for this i atom from the interaction with this j atom. */
259 velecsum = _mm_add_ps(velecsum,velec);
260 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
261
262 fscal = _mm_add_ps(felec,fvdw);
263
264 /* Calculate temporary vectorial force */
265 tx = _mm_mul_ps(fscal,dx00);
266 ty = _mm_mul_ps(fscal,dy00);
267 tz = _mm_mul_ps(fscal,dz00);
268
269 /* Update vectorial force */
270 fix0 = _mm_add_ps(fix0,tx);
271 fiy0 = _mm_add_ps(fiy0,ty);
272 fiz0 = _mm_add_ps(fiz0,tz);
273
274 fjx0 = _mm_add_ps(fjx0,tx);
275 fjy0 = _mm_add_ps(fjy0,ty);
276 fjz0 = _mm_add_ps(fjz0,tz);
277
278 /**************************
279 * CALCULATE INTERACTIONS *
280 **************************/
281
282 /* Compute parameters for interactions between i and j atoms */
283 qq10 = _mm_mul_ps(iq1,jq0);
284
285 /* COULOMB ELECTROSTATICS */
286 velec = _mm_mul_ps(qq10,rinv10);
287 felec = _mm_mul_ps(velec,rinvsq10);
288
289 /* Update potential sum for this i atom from the interaction with this j atom. */
290 velecsum = _mm_add_ps(velecsum,velec);
291
292 fscal = felec;
293
294 /* Calculate temporary vectorial force */
295 tx = _mm_mul_ps(fscal,dx10);
296 ty = _mm_mul_ps(fscal,dy10);
297 tz = _mm_mul_ps(fscal,dz10);
298
299 /* Update vectorial force */
300 fix1 = _mm_add_ps(fix1,tx);
301 fiy1 = _mm_add_ps(fiy1,ty);
302 fiz1 = _mm_add_ps(fiz1,tz);
303
304 fjx0 = _mm_add_ps(fjx0,tx);
305 fjy0 = _mm_add_ps(fjy0,ty);
306 fjz0 = _mm_add_ps(fjz0,tz);
307
308 /**************************
309 * CALCULATE INTERACTIONS *
310 **************************/
311
312 /* Compute parameters for interactions between i and j atoms */
313 qq20 = _mm_mul_ps(iq2,jq0);
314
315 /* COULOMB ELECTROSTATICS */
316 velec = _mm_mul_ps(qq20,rinv20);
317 felec = _mm_mul_ps(velec,rinvsq20);
318
319 /* Update potential sum for this i atom from the interaction with this j atom. */
320 velecsum = _mm_add_ps(velecsum,velec);
321
322 fscal = felec;
323
324 /* Calculate temporary vectorial force */
325 tx = _mm_mul_ps(fscal,dx20);
326 ty = _mm_mul_ps(fscal,dy20);
327 tz = _mm_mul_ps(fscal,dz20);
328
329 /* Update vectorial force */
330 fix2 = _mm_add_ps(fix2,tx);
331 fiy2 = _mm_add_ps(fiy2,ty);
332 fiz2 = _mm_add_ps(fiz2,tz);
333
334 fjx0 = _mm_add_ps(fjx0,tx);
335 fjy0 = _mm_add_ps(fjy0,ty);
336 fjz0 = _mm_add_ps(fjz0,tz);
337
338 fjptrA = f+j_coord_offsetA;
339 fjptrB = f+j_coord_offsetB;
340 fjptrC = f+j_coord_offsetC;
341 fjptrD = f+j_coord_offsetD;
342
343 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
344
345 /* Inner loop uses 96 flops */
346 }
347
348 if(jidx<j_index_end)
349 {
350
351 /* Get j neighbor index, and coordinate index */
352 jnrlistA = jjnr[jidx];
353 jnrlistB = jjnr[jidx+1];
354 jnrlistC = jjnr[jidx+2];
355 jnrlistD = jjnr[jidx+3];
356 /* Sign of each element will be negative for non-real atoms.
357 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
358 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
359 */
360 dummy_mask = gmx_mm_castsi128_ps_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
361 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
362 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
363 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
364 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
365 j_coord_offsetA = DIM3*jnrA;
366 j_coord_offsetB = DIM3*jnrB;
367 j_coord_offsetC = DIM3*jnrC;
368 j_coord_offsetD = DIM3*jnrD;
369
370 /* load j atom coordinates */
371 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
372 x+j_coord_offsetC,x+j_coord_offsetD,
373 &jx0,&jy0,&jz0);
374
375 /* Calculate displacement vector */
376 dx00 = _mm_sub_ps(ix0,jx0);
377 dy00 = _mm_sub_ps(iy0,jy0);
378 dz00 = _mm_sub_ps(iz0,jz0);
379 dx10 = _mm_sub_ps(ix1,jx0);
380 dy10 = _mm_sub_ps(iy1,jy0);
381 dz10 = _mm_sub_ps(iz1,jz0);
382 dx20 = _mm_sub_ps(ix2,jx0);
383 dy20 = _mm_sub_ps(iy2,jy0);
384 dz20 = _mm_sub_ps(iz2,jz0);
385
386 /* Calculate squared distance and things based on it */
387 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
388 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
389 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
390
391 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
392 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
393 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
394
395 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
396 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
397 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
398
399 /* Load parameters for j particles */
400 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
401 charge+jnrC+0,charge+jnrD+0);
402 vdwjidx0A = 2*vdwtype[jnrA+0];
403 vdwjidx0B = 2*vdwtype[jnrB+0];
404 vdwjidx0C = 2*vdwtype[jnrC+0];
405 vdwjidx0D = 2*vdwtype[jnrD+0];
406
407 fjx0 = _mm_setzero_ps();
408 fjy0 = _mm_setzero_ps();
409 fjz0 = _mm_setzero_ps();
410
411 /**************************
412 * CALCULATE INTERACTIONS *
413 **************************/
414
415 /* Compute parameters for interactions between i and j atoms */
416 qq00 = _mm_mul_ps(iq0,jq0);
417 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
418 vdwparam+vdwioffset0+vdwjidx0B,
419 vdwparam+vdwioffset0+vdwjidx0C,
420 vdwparam+vdwioffset0+vdwjidx0D,
421 &c6_00,&c12_00);
422
423 /* COULOMB ELECTROSTATICS */
424 velec = _mm_mul_ps(qq00,rinv00);
425 felec = _mm_mul_ps(velec,rinvsq00);
426
427 /* LENNARD-JONES DISPERSION/REPULSION */
428
429 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
430 vvdw6 = _mm_mul_ps(c6_00,rinvsix);
431 vvdw12 = _mm_mul_ps(c12_00,_mm_mul_ps(rinvsix,rinvsix));
432 vvdw = _mm_sub_ps( _mm_mul_ps(vvdw12,one_twelfth) , _mm_mul_ps(vvdw6,one_sixth) );
433 fvdw = _mm_mul_ps(_mm_sub_ps(vvdw12,vvdw6),rinvsq00);
434
435 /* Update potential sum for this i atom from the interaction with this j atom. */
436 velec = _mm_andnot_ps(dummy_mask,velec);
437 velecsum = _mm_add_ps(velecsum,velec);
438 vvdw = _mm_andnot_ps(dummy_mask,vvdw);
439 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
440
441 fscal = _mm_add_ps(felec,fvdw);
442
443 fscal = _mm_andnot_ps(dummy_mask,fscal);
444
445 /* Calculate temporary vectorial force */
446 tx = _mm_mul_ps(fscal,dx00);
447 ty = _mm_mul_ps(fscal,dy00);
448 tz = _mm_mul_ps(fscal,dz00);
449
450 /* Update vectorial force */
451 fix0 = _mm_add_ps(fix0,tx);
452 fiy0 = _mm_add_ps(fiy0,ty);
453 fiz0 = _mm_add_ps(fiz0,tz);
454
455 fjx0 = _mm_add_ps(fjx0,tx);
456 fjy0 = _mm_add_ps(fjy0,ty);
457 fjz0 = _mm_add_ps(fjz0,tz);
458
459 /**************************
460 * CALCULATE INTERACTIONS *
461 **************************/
462
463 /* Compute parameters for interactions between i and j atoms */
464 qq10 = _mm_mul_ps(iq1,jq0);
465
466 /* COULOMB ELECTROSTATICS */
467 velec = _mm_mul_ps(qq10,rinv10);
468 felec = _mm_mul_ps(velec,rinvsq10);
469
470 /* Update potential sum for this i atom from the interaction with this j atom. */
471 velec = _mm_andnot_ps(dummy_mask,velec);
472 velecsum = _mm_add_ps(velecsum,velec);
473
474 fscal = felec;
475
476 fscal = _mm_andnot_ps(dummy_mask,fscal);
477
478 /* Calculate temporary vectorial force */
479 tx = _mm_mul_ps(fscal,dx10);
480 ty = _mm_mul_ps(fscal,dy10);
481 tz = _mm_mul_ps(fscal,dz10);
482
483 /* Update vectorial force */
484 fix1 = _mm_add_ps(fix1,tx);
485 fiy1 = _mm_add_ps(fiy1,ty);
486 fiz1 = _mm_add_ps(fiz1,tz);
487
488 fjx0 = _mm_add_ps(fjx0,tx);
489 fjy0 = _mm_add_ps(fjy0,ty);
490 fjz0 = _mm_add_ps(fjz0,tz);
491
492 /**************************
493 * CALCULATE INTERACTIONS *
494 **************************/
495
496 /* Compute parameters for interactions between i and j atoms */
497 qq20 = _mm_mul_ps(iq2,jq0);
498
499 /* COULOMB ELECTROSTATICS */
500 velec = _mm_mul_ps(qq20,rinv20);
501 felec = _mm_mul_ps(velec,rinvsq20);
502
503 /* Update potential sum for this i atom from the interaction with this j atom. */
504 velec = _mm_andnot_ps(dummy_mask,velec);
505 velecsum = _mm_add_ps(velecsum,velec);
506
507 fscal = felec;
508
509 fscal = _mm_andnot_ps(dummy_mask,fscal);
510
511 /* Calculate temporary vectorial force */
512 tx = _mm_mul_ps(fscal,dx20);
513 ty = _mm_mul_ps(fscal,dy20);
514 tz = _mm_mul_ps(fscal,dz20);
515
516 /* Update vectorial force */
517 fix2 = _mm_add_ps(fix2,tx);
518 fiy2 = _mm_add_ps(fiy2,ty);
519 fiz2 = _mm_add_ps(fiz2,tz);
520
521 fjx0 = _mm_add_ps(fjx0,tx);
522 fjy0 = _mm_add_ps(fjy0,ty);
523 fjz0 = _mm_add_ps(fjz0,tz);
524
525 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
526 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
527 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
528 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
529
530 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
531
532 /* Inner loop uses 96 flops */
533 }
534
535 /* End of innermost loop */
536
537 gmx_mm_update_iforce_3atom_swizzle_ps(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
538 f+i_coord_offset,fshift+i_shift_offset);
539
540 ggid = gid[iidx];
541 /* Update potential energies */
542 gmx_mm_update_1pot_ps(velecsum,kernel_data->energygrp_elec+ggid);
543 gmx_mm_update_1pot_ps(vvdwsum,kernel_data->energygrp_vdw+ggid);
544
545 /* Increment number of inner iterations */
546 inneriter += j_index_end - j_index_start;
547
548 /* Outer loop uses 20 flops */
549 }
550
551 /* Increment number of outer iterations */
552 outeriter += nri;
553
554 /* Update outer/inner flops */
555
556 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_VF,outeriter*20 + inneriter*96)(nrnb)->n[eNR_NBKERNEL_ELEC_VDW_W3_VF] += outeriter*20 + inneriter
*96
;
557}
558/*
559 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwLJ_GeomW3P1_F_sse4_1_single
560 * Electrostatics interaction: Coulomb
561 * VdW interaction: LennardJones
562 * Geometry: Water3-Particle
563 * Calculate force/pot: Force
564 */
565void
566nb_kernel_ElecCoul_VdwLJ_GeomW3P1_F_sse4_1_single
567 (t_nblist * gmx_restrict nlist,
568 rvec * gmx_restrict xx,
569 rvec * gmx_restrict ff,
570 t_forcerec * gmx_restrict fr,
571 t_mdatoms * gmx_restrict mdatoms,
572 nb_kernel_data_t gmx_unused__attribute__ ((unused)) * gmx_restrict kernel_data,
573 t_nrnb * gmx_restrict nrnb)
574{
575 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
576 * just 0 for non-waters.
577 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
578 * jnr indices corresponding to data put in the four positions in the SIMD register.
579 */
580 int i_shift_offset,i_coord_offset,outeriter,inneriter;
581 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
582 int jnrA,jnrB,jnrC,jnrD;
583 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
584 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
585 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
586 real rcutoff_scalar;
587 real *shiftvec,*fshift,*x,*f;
588 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
589 real scratch[4*DIM3];
590 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
591 int vdwioffset0;
592 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
593 int vdwioffset1;
594 __m128 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
595 int vdwioffset2;
596 __m128 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
597 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
598 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
599 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
600 __m128 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
601 __m128 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
602 __m128 velec,felec,velecsum,facel,crf,krf,krf2;
603 real *charge;
604 int nvdwtype;
605 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
606 int *vdwtype;
607 real *vdwparam;
608 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
609 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
610 __m128 dummy_mask,cutoff_mask;
611 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
612 __m128 one = _mm_set1_ps(1.0);
613 __m128 two = _mm_set1_ps(2.0);
614 x = xx[0];
615 f = ff[0];
616
617 nri = nlist->nri;
618 iinr = nlist->iinr;
619 jindex = nlist->jindex;
620 jjnr = nlist->jjnr;
621 shiftidx = nlist->shift;
622 gid = nlist->gid;
623 shiftvec = fr->shift_vec[0];
624 fshift = fr->fshift[0];
625 facel = _mm_set1_ps(fr->epsfac);
626 charge = mdatoms->chargeA;
627 nvdwtype = fr->ntype;
628 vdwparam = fr->nbfp;
629 vdwtype = mdatoms->typeA;
630
631 /* Setup water-specific parameters */
632 inr = nlist->iinr[0];
633 iq0 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+0]));
634 iq1 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+1]));
635 iq2 = _mm_mul_ps(facel,_mm_set1_ps(charge[inr+2]));
636 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
637
638 /* Avoid stupid compiler warnings */
639 jnrA = jnrB = jnrC = jnrD = 0;
640 j_coord_offsetA = 0;
641 j_coord_offsetB = 0;
642 j_coord_offsetC = 0;
643 j_coord_offsetD = 0;
644
645 outeriter = 0;
646 inneriter = 0;
647
648 for(iidx=0;iidx<4*DIM3;iidx++)
649 {
650 scratch[iidx] = 0.0;
651 }
652
653 /* Start outer loop over neighborlists */
654 for(iidx=0; iidx<nri; iidx++)
655 {
656 /* Load shift vector for this list */
657 i_shift_offset = DIM3*shiftidx[iidx];
658
659 /* Load limits for loop over neighbors */
660 j_index_start = jindex[iidx];
661 j_index_end = jindex[iidx+1];
662
663 /* Get outer coordinate index */
664 inr = iinr[iidx];
665 i_coord_offset = DIM3*inr;
666
667 /* Load i particle coords and add shift vector */
668 gmx_mm_load_shift_and_3rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,
669 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
670
671 fix0 = _mm_setzero_ps();
672 fiy0 = _mm_setzero_ps();
673 fiz0 = _mm_setzero_ps();
674 fix1 = _mm_setzero_ps();
675 fiy1 = _mm_setzero_ps();
676 fiz1 = _mm_setzero_ps();
677 fix2 = _mm_setzero_ps();
678 fiy2 = _mm_setzero_ps();
679 fiz2 = _mm_setzero_ps();
680
681 /* Start inner kernel loop */
682 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
683 {
684
685 /* Get j neighbor index, and coordinate index */
686 jnrA = jjnr[jidx];
687 jnrB = jjnr[jidx+1];
688 jnrC = jjnr[jidx+2];
689 jnrD = jjnr[jidx+3];
690 j_coord_offsetA = DIM3*jnrA;
691 j_coord_offsetB = DIM3*jnrB;
692 j_coord_offsetC = DIM3*jnrC;
693 j_coord_offsetD = DIM3*jnrD;
694
695 /* load j atom coordinates */
696 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
697 x+j_coord_offsetC,x+j_coord_offsetD,
698 &jx0,&jy0,&jz0);
699
700 /* Calculate displacement vector */
701 dx00 = _mm_sub_ps(ix0,jx0);
702 dy00 = _mm_sub_ps(iy0,jy0);
703 dz00 = _mm_sub_ps(iz0,jz0);
704 dx10 = _mm_sub_ps(ix1,jx0);
705 dy10 = _mm_sub_ps(iy1,jy0);
706 dz10 = _mm_sub_ps(iz1,jz0);
707 dx20 = _mm_sub_ps(ix2,jx0);
708 dy20 = _mm_sub_ps(iy2,jy0);
709 dz20 = _mm_sub_ps(iz2,jz0);
710
711 /* Calculate squared distance and things based on it */
712 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
713 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
714 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
715
716 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
717 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
718 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
719
720 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
721 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
722 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
723
724 /* Load parameters for j particles */
725 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
726 charge+jnrC+0,charge+jnrD+0);
727 vdwjidx0A = 2*vdwtype[jnrA+0];
728 vdwjidx0B = 2*vdwtype[jnrB+0];
729 vdwjidx0C = 2*vdwtype[jnrC+0];
730 vdwjidx0D = 2*vdwtype[jnrD+0];
731
732 fjx0 = _mm_setzero_ps();
733 fjy0 = _mm_setzero_ps();
734 fjz0 = _mm_setzero_ps();
735
736 /**************************
737 * CALCULATE INTERACTIONS *
738 **************************/
739
740 /* Compute parameters for interactions between i and j atoms */
741 qq00 = _mm_mul_ps(iq0,jq0);
742 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
743 vdwparam+vdwioffset0+vdwjidx0B,
744 vdwparam+vdwioffset0+vdwjidx0C,
745 vdwparam+vdwioffset0+vdwjidx0D,
746 &c6_00,&c12_00);
747
748 /* COULOMB ELECTROSTATICS */
749 velec = _mm_mul_ps(qq00,rinv00);
750 felec = _mm_mul_ps(velec,rinvsq00);
751
752 /* LENNARD-JONES DISPERSION/REPULSION */
753
754 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
755 fvdw = _mm_mul_ps(_mm_sub_ps(_mm_mul_ps(c12_00,rinvsix),c6_00),_mm_mul_ps(rinvsix,rinvsq00));
756
757 fscal = _mm_add_ps(felec,fvdw);
758
759 /* Calculate temporary vectorial force */
760 tx = _mm_mul_ps(fscal,dx00);
761 ty = _mm_mul_ps(fscal,dy00);
762 tz = _mm_mul_ps(fscal,dz00);
763
764 /* Update vectorial force */
765 fix0 = _mm_add_ps(fix0,tx);
766 fiy0 = _mm_add_ps(fiy0,ty);
767 fiz0 = _mm_add_ps(fiz0,tz);
768
769 fjx0 = _mm_add_ps(fjx0,tx);
770 fjy0 = _mm_add_ps(fjy0,ty);
771 fjz0 = _mm_add_ps(fjz0,tz);
772
773 /**************************
774 * CALCULATE INTERACTIONS *
775 **************************/
776
777 /* Compute parameters for interactions between i and j atoms */
778 qq10 = _mm_mul_ps(iq1,jq0);
779
780 /* COULOMB ELECTROSTATICS */
781 velec = _mm_mul_ps(qq10,rinv10);
782 felec = _mm_mul_ps(velec,rinvsq10);
783
784 fscal = felec;
785
786 /* Calculate temporary vectorial force */
787 tx = _mm_mul_ps(fscal,dx10);
788 ty = _mm_mul_ps(fscal,dy10);
789 tz = _mm_mul_ps(fscal,dz10);
790
791 /* Update vectorial force */
792 fix1 = _mm_add_ps(fix1,tx);
793 fiy1 = _mm_add_ps(fiy1,ty);
794 fiz1 = _mm_add_ps(fiz1,tz);
795
796 fjx0 = _mm_add_ps(fjx0,tx);
797 fjy0 = _mm_add_ps(fjy0,ty);
798 fjz0 = _mm_add_ps(fjz0,tz);
799
800 /**************************
801 * CALCULATE INTERACTIONS *
802 **************************/
803
804 /* Compute parameters for interactions between i and j atoms */
805 qq20 = _mm_mul_ps(iq2,jq0);
806
807 /* COULOMB ELECTROSTATICS */
808 velec = _mm_mul_ps(qq20,rinv20);
809 felec = _mm_mul_ps(velec,rinvsq20);
810
811 fscal = felec;
812
813 /* Calculate temporary vectorial force */
814 tx = _mm_mul_ps(fscal,dx20);
815 ty = _mm_mul_ps(fscal,dy20);
816 tz = _mm_mul_ps(fscal,dz20);
817
818 /* Update vectorial force */
819 fix2 = _mm_add_ps(fix2,tx);
820 fiy2 = _mm_add_ps(fiy2,ty);
821 fiz2 = _mm_add_ps(fiz2,tz);
822
823 fjx0 = _mm_add_ps(fjx0,tx);
824 fjy0 = _mm_add_ps(fjy0,ty);
825 fjz0 = _mm_add_ps(fjz0,tz);
826
827 fjptrA = f+j_coord_offsetA;
828 fjptrB = f+j_coord_offsetB;
829 fjptrC = f+j_coord_offsetC;
830 fjptrD = f+j_coord_offsetD;
831
832 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
833
834 /* Inner loop uses 88 flops */
835 }
836
837 if(jidx<j_index_end)
838 {
839
840 /* Get j neighbor index, and coordinate index */
841 jnrlistA = jjnr[jidx];
842 jnrlistB = jjnr[jidx+1];
843 jnrlistC = jjnr[jidx+2];
844 jnrlistD = jjnr[jidx+3];
845 /* Sign of each element will be negative for non-real atoms.
846 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
847 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
848 */
849 dummy_mask = gmx_mm_castsi128_ps_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
850 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
851 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
852 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
853 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
854 j_coord_offsetA = DIM3*jnrA;
855 j_coord_offsetB = DIM3*jnrB;
856 j_coord_offsetC = DIM3*jnrC;
857 j_coord_offsetD = DIM3*jnrD;
858
859 /* load j atom coordinates */
860 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
861 x+j_coord_offsetC,x+j_coord_offsetD,
862 &jx0,&jy0,&jz0);
863
864 /* Calculate displacement vector */
865 dx00 = _mm_sub_ps(ix0,jx0);
866 dy00 = _mm_sub_ps(iy0,jy0);
867 dz00 = _mm_sub_ps(iz0,jz0);
868 dx10 = _mm_sub_ps(ix1,jx0);
869 dy10 = _mm_sub_ps(iy1,jy0);
870 dz10 = _mm_sub_ps(iz1,jz0);
871 dx20 = _mm_sub_ps(ix2,jx0);
872 dy20 = _mm_sub_ps(iy2,jy0);
873 dz20 = _mm_sub_ps(iz2,jz0);
874
875 /* Calculate squared distance and things based on it */
876 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
877 rsq10 = gmx_mm_calc_rsq_ps(dx10,dy10,dz10);
878 rsq20 = gmx_mm_calc_rsq_ps(dx20,dy20,dz20);
879
880 rinv00 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq00);
881 rinv10 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq10);
882 rinv20 = gmx_mm_invsqrt_psgmx_simd_invsqrt_f(rsq20);
883
884 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
885 rinvsq10 = _mm_mul_ps(rinv10,rinv10);
886 rinvsq20 = _mm_mul_ps(rinv20,rinv20);
887
888 /* Load parameters for j particles */
889 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
890 charge+jnrC+0,charge+jnrD+0);
891 vdwjidx0A = 2*vdwtype[jnrA+0];
892 vdwjidx0B = 2*vdwtype[jnrB+0];
893 vdwjidx0C = 2*vdwtype[jnrC+0];
894 vdwjidx0D = 2*vdwtype[jnrD+0];
895
896 fjx0 = _mm_setzero_ps();
897 fjy0 = _mm_setzero_ps();
898 fjz0 = _mm_setzero_ps();
899
900 /**************************
901 * CALCULATE INTERACTIONS *
902 **************************/
903
904 /* Compute parameters for interactions between i and j atoms */
905 qq00 = _mm_mul_ps(iq0,jq0);
906 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
907 vdwparam+vdwioffset0+vdwjidx0B,
908 vdwparam+vdwioffset0+vdwjidx0C,
909 vdwparam+vdwioffset0+vdwjidx0D,
910 &c6_00,&c12_00);
911
912 /* COULOMB ELECTROSTATICS */
913 velec = _mm_mul_ps(qq00,rinv00);
914 felec = _mm_mul_ps(velec,rinvsq00);
915
916 /* LENNARD-JONES DISPERSION/REPULSION */
917
918 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
919 fvdw = _mm_mul_ps(_mm_sub_ps(_mm_mul_ps(c12_00,rinvsix),c6_00),_mm_mul_ps(rinvsix,rinvsq00));
920
921 fscal = _mm_add_ps(felec,fvdw);
922
923 fscal = _mm_andnot_ps(dummy_mask,fscal);
924
925 /* Calculate temporary vectorial force */
926 tx = _mm_mul_ps(fscal,dx00);
927 ty = _mm_mul_ps(fscal,dy00);
928 tz = _mm_mul_ps(fscal,dz00);
929
930 /* Update vectorial force */
931 fix0 = _mm_add_ps(fix0,tx);
932 fiy0 = _mm_add_ps(fiy0,ty);
933 fiz0 = _mm_add_ps(fiz0,tz);
934
935 fjx0 = _mm_add_ps(fjx0,tx);
936 fjy0 = _mm_add_ps(fjy0,ty);
937 fjz0 = _mm_add_ps(fjz0,tz);
938
939 /**************************
940 * CALCULATE INTERACTIONS *
941 **************************/
942
943 /* Compute parameters for interactions between i and j atoms */
944 qq10 = _mm_mul_ps(iq1,jq0);
945
946 /* COULOMB ELECTROSTATICS */
947 velec = _mm_mul_ps(qq10,rinv10);
948 felec = _mm_mul_ps(velec,rinvsq10);
949
950 fscal = felec;
951
952 fscal = _mm_andnot_ps(dummy_mask,fscal);
953
954 /* Calculate temporary vectorial force */
955 tx = _mm_mul_ps(fscal,dx10);
956 ty = _mm_mul_ps(fscal,dy10);
957 tz = _mm_mul_ps(fscal,dz10);
958
959 /* Update vectorial force */
960 fix1 = _mm_add_ps(fix1,tx);
961 fiy1 = _mm_add_ps(fiy1,ty);
962 fiz1 = _mm_add_ps(fiz1,tz);
963
964 fjx0 = _mm_add_ps(fjx0,tx);
965 fjy0 = _mm_add_ps(fjy0,ty);
966 fjz0 = _mm_add_ps(fjz0,tz);
967
968 /**************************
969 * CALCULATE INTERACTIONS *
970 **************************/
971
972 /* Compute parameters for interactions between i and j atoms */
973 qq20 = _mm_mul_ps(iq2,jq0);
974
975 /* COULOMB ELECTROSTATICS */
976 velec = _mm_mul_ps(qq20,rinv20);
977 felec = _mm_mul_ps(velec,rinvsq20);
978
979 fscal = felec;
980
981 fscal = _mm_andnot_ps(dummy_mask,fscal);
982
983 /* Calculate temporary vectorial force */
984 tx = _mm_mul_ps(fscal,dx20);
985 ty = _mm_mul_ps(fscal,dy20);
986 tz = _mm_mul_ps(fscal,dz20);
987
988 /* Update vectorial force */
989 fix2 = _mm_add_ps(fix2,tx);
990 fiy2 = _mm_add_ps(fiy2,ty);
991 fiz2 = _mm_add_ps(fiz2,tz);
992
993 fjx0 = _mm_add_ps(fjx0,tx);
994 fjy0 = _mm_add_ps(fjy0,ty);
995 fjz0 = _mm_add_ps(fjz0,tz);
996
997 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
998 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
999 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
1000 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
1001
1002 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,fjx0,fjy0,fjz0);
1003
1004 /* Inner loop uses 88 flops */
1005 }
1006
1007 /* End of innermost loop */
1008
1009 gmx_mm_update_iforce_3atom_swizzle_ps(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
1010 f+i_coord_offset,fshift+i_shift_offset);
1011
1012 /* Increment number of inner iterations */
1013 inneriter += j_index_end - j_index_start;
1014
1015 /* Outer loop uses 18 flops */
1016 }
1017
1018 /* Increment number of outer iterations */
1019 outeriter += nri;
1020
1021 /* Update outer/inner flops */
1022
1023 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_F,outeriter*18 + inneriter*88)(nrnb)->n[eNR_NBKERNEL_ELEC_VDW_W3_F] += outeriter*18 + inneriter
*88
;
1024}