Bug Summary

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