Bug Summary

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