2 * This file is part of the GROMACS molecular simulation package.
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.
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.
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.
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.
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.
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.
36 * Note: this file was generated by the GROMACS sse4_1_double kernel generator.
42 #include "../nb_kernel.h"
43 #include "types/simple.h"
44 #include "gromacs/math/vec.h"
47 #include "gromacs/simd/math_x86_sse4_1_double.h"
48 #include "kernelutil_x86_sse4_1_double.h"
51 * Gromacs nonbonded kernel: nb_kernel_ElecEwSh_VdwNone_GeomP1P1_VF_sse4_1_double
52 * Electrostatics interaction: Ewald
53 * VdW interaction: None
54 * Geometry: Particle-Particle
55 * Calculate force/pot: PotentialAndForce
58 nb_kernel_ElecEwSh_VdwNone_GeomP1P1_VF_sse4_1_double
59 (t_nblist * gmx_restrict nlist,
60 rvec * gmx_restrict xx,
61 rvec * gmx_restrict ff,
62 t_forcerec * gmx_restrict fr,
63 t_mdatoms * gmx_restrict mdatoms,
64 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
65 t_nrnb * gmx_restrict nrnb)
67 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
68 * just 0 for non-waters.
69 * Suffixes A,B refer to j loop unrolling done with SSE double precision, e.g. for the two different
70 * jnr indices corresponding to data put in the four positions in the SIMD register.
72 int i_shift_offset,i_coord_offset,outeriter,inneriter;
73 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
75 int j_coord_offsetA,j_coord_offsetB;
76 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
78 real *shiftvec,*fshift,*x,*f;
79 __m128d tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
81 __m128d ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
82 int vdwjidx0A,vdwjidx0B;
83 __m128d jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
84 __m128d dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
85 __m128d velec,felec,velecsum,facel,crf,krf,krf2;
88 __m128d ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace,ewtabF,ewtabFn,ewtabD,ewtabV;
90 __m128d dummy_mask,cutoff_mask;
91 __m128d signbit = gmx_mm_castsi128_pd( _mm_set_epi32(0x80000000,0x00000000,0x80000000,0x00000000) );
92 __m128d one = _mm_set1_pd(1.0);
93 __m128d two = _mm_set1_pd(2.0);
99 jindex = nlist->jindex;
101 shiftidx = nlist->shift;
103 shiftvec = fr->shift_vec[0];
104 fshift = fr->fshift[0];
105 facel = _mm_set1_pd(fr->epsfac);
106 charge = mdatoms->chargeA;
108 sh_ewald = _mm_set1_pd(fr->ic->sh_ewald);
109 ewtab = fr->ic->tabq_coul_FDV0;
110 ewtabscale = _mm_set1_pd(fr->ic->tabq_scale);
111 ewtabhalfspace = _mm_set1_pd(0.5/fr->ic->tabq_scale);
113 /* When we use explicit cutoffs the value must be identical for elec and VdW, so use elec as an arbitrary choice */
114 rcutoff_scalar = fr->rcoulomb;
115 rcutoff = _mm_set1_pd(rcutoff_scalar);
116 rcutoff2 = _mm_mul_pd(rcutoff,rcutoff);
118 /* Avoid stupid compiler warnings */
126 /* Start outer loop over neighborlists */
127 for(iidx=0; iidx<nri; iidx++)
129 /* Load shift vector for this list */
130 i_shift_offset = DIM*shiftidx[iidx];
132 /* Load limits for loop over neighbors */
133 j_index_start = jindex[iidx];
134 j_index_end = jindex[iidx+1];
136 /* Get outer coordinate index */
138 i_coord_offset = DIM*inr;
140 /* Load i particle coords and add shift vector */
141 gmx_mm_load_shift_and_1rvec_broadcast_pd(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
143 fix0 = _mm_setzero_pd();
144 fiy0 = _mm_setzero_pd();
145 fiz0 = _mm_setzero_pd();
147 /* Load parameters for i particles */
148 iq0 = _mm_mul_pd(facel,_mm_load1_pd(charge+inr+0));
150 /* Reset potential sums */
151 velecsum = _mm_setzero_pd();
153 /* Start inner kernel loop */
154 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
157 /* Get j neighbor index, and coordinate index */
160 j_coord_offsetA = DIM*jnrA;
161 j_coord_offsetB = DIM*jnrB;
163 /* load j atom coordinates */
164 gmx_mm_load_1rvec_2ptr_swizzle_pd(x+j_coord_offsetA,x+j_coord_offsetB,
167 /* Calculate displacement vector */
168 dx00 = _mm_sub_pd(ix0,jx0);
169 dy00 = _mm_sub_pd(iy0,jy0);
170 dz00 = _mm_sub_pd(iz0,jz0);
172 /* Calculate squared distance and things based on it */
173 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
175 rinv00 = gmx_mm_invsqrt_pd(rsq00);
177 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
179 /* Load parameters for j particles */
180 jq0 = gmx_mm_load_2real_swizzle_pd(charge+jnrA+0,charge+jnrB+0);
182 /**************************
183 * CALCULATE INTERACTIONS *
184 **************************/
186 if (gmx_mm_any_lt(rsq00,rcutoff2))
189 r00 = _mm_mul_pd(rsq00,rinv00);
191 /* Compute parameters for interactions between i and j atoms */
192 qq00 = _mm_mul_pd(iq0,jq0);
194 /* EWALD ELECTROSTATICS */
196 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
197 ewrt = _mm_mul_pd(r00,ewtabscale);
198 ewitab = _mm_cvttpd_epi32(ewrt);
199 eweps = _mm_sub_pd(ewrt,_mm_round_pd(ewrt, _MM_FROUND_FLOOR));
200 ewitab = _mm_slli_epi32(ewitab,2);
201 ewtabF = _mm_load_pd( ewtab + gmx_mm_extract_epi32(ewitab,0) );
202 ewtabD = _mm_load_pd( ewtab + gmx_mm_extract_epi32(ewitab,1) );
203 GMX_MM_TRANSPOSE2_PD(ewtabF,ewtabD);
204 ewtabV = _mm_load_sd( ewtab + gmx_mm_extract_epi32(ewitab,0) +2);
205 ewtabFn = _mm_load_sd( ewtab + gmx_mm_extract_epi32(ewitab,1) +2);
206 GMX_MM_TRANSPOSE2_PD(ewtabV,ewtabFn);
207 felec = _mm_add_pd(ewtabF,_mm_mul_pd(eweps,ewtabD));
208 velec = _mm_sub_pd(ewtabV,_mm_mul_pd(_mm_mul_pd(ewtabhalfspace,eweps),_mm_add_pd(ewtabF,felec)));
209 velec = _mm_mul_pd(qq00,_mm_sub_pd(_mm_sub_pd(rinv00,sh_ewald),velec));
210 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
212 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
214 /* Update potential sum for this i atom from the interaction with this j atom. */
215 velec = _mm_and_pd(velec,cutoff_mask);
216 velecsum = _mm_add_pd(velecsum,velec);
220 fscal = _mm_and_pd(fscal,cutoff_mask);
222 /* Calculate temporary vectorial force */
223 tx = _mm_mul_pd(fscal,dx00);
224 ty = _mm_mul_pd(fscal,dy00);
225 tz = _mm_mul_pd(fscal,dz00);
227 /* Update vectorial force */
228 fix0 = _mm_add_pd(fix0,tx);
229 fiy0 = _mm_add_pd(fiy0,ty);
230 fiz0 = _mm_add_pd(fiz0,tz);
232 gmx_mm_decrement_1rvec_2ptr_swizzle_pd(f+j_coord_offsetA,f+j_coord_offsetB,tx,ty,tz);
236 /* Inner loop uses 46 flops */
243 j_coord_offsetA = DIM*jnrA;
245 /* load j atom coordinates */
246 gmx_mm_load_1rvec_1ptr_swizzle_pd(x+j_coord_offsetA,
249 /* Calculate displacement vector */
250 dx00 = _mm_sub_pd(ix0,jx0);
251 dy00 = _mm_sub_pd(iy0,jy0);
252 dz00 = _mm_sub_pd(iz0,jz0);
254 /* Calculate squared distance and things based on it */
255 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
257 rinv00 = gmx_mm_invsqrt_pd(rsq00);
259 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
261 /* Load parameters for j particles */
262 jq0 = _mm_load_sd(charge+jnrA+0);
264 /**************************
265 * CALCULATE INTERACTIONS *
266 **************************/
268 if (gmx_mm_any_lt(rsq00,rcutoff2))
271 r00 = _mm_mul_pd(rsq00,rinv00);
273 /* Compute parameters for interactions between i and j atoms */
274 qq00 = _mm_mul_pd(iq0,jq0);
276 /* EWALD ELECTROSTATICS */
278 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
279 ewrt = _mm_mul_pd(r00,ewtabscale);
280 ewitab = _mm_cvttpd_epi32(ewrt);
281 eweps = _mm_sub_pd(ewrt,_mm_round_pd(ewrt, _MM_FROUND_FLOOR));
282 ewitab = _mm_slli_epi32(ewitab,2);
283 ewtabF = _mm_load_pd( ewtab + gmx_mm_extract_epi32(ewitab,0) );
284 ewtabD = _mm_setzero_pd();
285 GMX_MM_TRANSPOSE2_PD(ewtabF,ewtabD);
286 ewtabV = _mm_load_sd( ewtab + gmx_mm_extract_epi32(ewitab,0) +2);
287 ewtabFn = _mm_setzero_pd();
288 GMX_MM_TRANSPOSE2_PD(ewtabV,ewtabFn);
289 felec = _mm_add_pd(ewtabF,_mm_mul_pd(eweps,ewtabD));
290 velec = _mm_sub_pd(ewtabV,_mm_mul_pd(_mm_mul_pd(ewtabhalfspace,eweps),_mm_add_pd(ewtabF,felec)));
291 velec = _mm_mul_pd(qq00,_mm_sub_pd(_mm_sub_pd(rinv00,sh_ewald),velec));
292 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
294 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
296 /* Update potential sum for this i atom from the interaction with this j atom. */
297 velec = _mm_and_pd(velec,cutoff_mask);
298 velec = _mm_unpacklo_pd(velec,_mm_setzero_pd());
299 velecsum = _mm_add_pd(velecsum,velec);
303 fscal = _mm_and_pd(fscal,cutoff_mask);
305 fscal = _mm_unpacklo_pd(fscal,_mm_setzero_pd());
307 /* Calculate temporary vectorial force */
308 tx = _mm_mul_pd(fscal,dx00);
309 ty = _mm_mul_pd(fscal,dy00);
310 tz = _mm_mul_pd(fscal,dz00);
312 /* Update vectorial force */
313 fix0 = _mm_add_pd(fix0,tx);
314 fiy0 = _mm_add_pd(fiy0,ty);
315 fiz0 = _mm_add_pd(fiz0,tz);
317 gmx_mm_decrement_1rvec_1ptr_swizzle_pd(f+j_coord_offsetA,tx,ty,tz);
321 /* Inner loop uses 46 flops */
324 /* End of innermost loop */
326 gmx_mm_update_iforce_1atom_swizzle_pd(fix0,fiy0,fiz0,
327 f+i_coord_offset,fshift+i_shift_offset);
330 /* Update potential energies */
331 gmx_mm_update_1pot_pd(velecsum,kernel_data->energygrp_elec+ggid);
333 /* Increment number of inner iterations */
334 inneriter += j_index_end - j_index_start;
336 /* Outer loop uses 8 flops */
339 /* Increment number of outer iterations */
342 /* Update outer/inner flops */
344 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VF,outeriter*8 + inneriter*46);
347 * Gromacs nonbonded kernel: nb_kernel_ElecEwSh_VdwNone_GeomP1P1_F_sse4_1_double
348 * Electrostatics interaction: Ewald
349 * VdW interaction: None
350 * Geometry: Particle-Particle
351 * Calculate force/pot: Force
354 nb_kernel_ElecEwSh_VdwNone_GeomP1P1_F_sse4_1_double
355 (t_nblist * gmx_restrict nlist,
356 rvec * gmx_restrict xx,
357 rvec * gmx_restrict ff,
358 t_forcerec * gmx_restrict fr,
359 t_mdatoms * gmx_restrict mdatoms,
360 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
361 t_nrnb * gmx_restrict nrnb)
363 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
364 * just 0 for non-waters.
365 * Suffixes A,B refer to j loop unrolling done with SSE double precision, e.g. for the two different
366 * jnr indices corresponding to data put in the four positions in the SIMD register.
368 int i_shift_offset,i_coord_offset,outeriter,inneriter;
369 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
371 int j_coord_offsetA,j_coord_offsetB;
372 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
374 real *shiftvec,*fshift,*x,*f;
375 __m128d tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
377 __m128d ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
378 int vdwjidx0A,vdwjidx0B;
379 __m128d jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
380 __m128d dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
381 __m128d velec,felec,velecsum,facel,crf,krf,krf2;
384 __m128d ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace,ewtabF,ewtabFn,ewtabD,ewtabV;
386 __m128d dummy_mask,cutoff_mask;
387 __m128d signbit = gmx_mm_castsi128_pd( _mm_set_epi32(0x80000000,0x00000000,0x80000000,0x00000000) );
388 __m128d one = _mm_set1_pd(1.0);
389 __m128d two = _mm_set1_pd(2.0);
395 jindex = nlist->jindex;
397 shiftidx = nlist->shift;
399 shiftvec = fr->shift_vec[0];
400 fshift = fr->fshift[0];
401 facel = _mm_set1_pd(fr->epsfac);
402 charge = mdatoms->chargeA;
404 sh_ewald = _mm_set1_pd(fr->ic->sh_ewald);
405 ewtab = fr->ic->tabq_coul_F;
406 ewtabscale = _mm_set1_pd(fr->ic->tabq_scale);
407 ewtabhalfspace = _mm_set1_pd(0.5/fr->ic->tabq_scale);
409 /* When we use explicit cutoffs the value must be identical for elec and VdW, so use elec as an arbitrary choice */
410 rcutoff_scalar = fr->rcoulomb;
411 rcutoff = _mm_set1_pd(rcutoff_scalar);
412 rcutoff2 = _mm_mul_pd(rcutoff,rcutoff);
414 /* Avoid stupid compiler warnings */
422 /* Start outer loop over neighborlists */
423 for(iidx=0; iidx<nri; iidx++)
425 /* Load shift vector for this list */
426 i_shift_offset = DIM*shiftidx[iidx];
428 /* Load limits for loop over neighbors */
429 j_index_start = jindex[iidx];
430 j_index_end = jindex[iidx+1];
432 /* Get outer coordinate index */
434 i_coord_offset = DIM*inr;
436 /* Load i particle coords and add shift vector */
437 gmx_mm_load_shift_and_1rvec_broadcast_pd(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
439 fix0 = _mm_setzero_pd();
440 fiy0 = _mm_setzero_pd();
441 fiz0 = _mm_setzero_pd();
443 /* Load parameters for i particles */
444 iq0 = _mm_mul_pd(facel,_mm_load1_pd(charge+inr+0));
446 /* Start inner kernel loop */
447 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
450 /* Get j neighbor index, and coordinate index */
453 j_coord_offsetA = DIM*jnrA;
454 j_coord_offsetB = DIM*jnrB;
456 /* load j atom coordinates */
457 gmx_mm_load_1rvec_2ptr_swizzle_pd(x+j_coord_offsetA,x+j_coord_offsetB,
460 /* Calculate displacement vector */
461 dx00 = _mm_sub_pd(ix0,jx0);
462 dy00 = _mm_sub_pd(iy0,jy0);
463 dz00 = _mm_sub_pd(iz0,jz0);
465 /* Calculate squared distance and things based on it */
466 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
468 rinv00 = gmx_mm_invsqrt_pd(rsq00);
470 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
472 /* Load parameters for j particles */
473 jq0 = gmx_mm_load_2real_swizzle_pd(charge+jnrA+0,charge+jnrB+0);
475 /**************************
476 * CALCULATE INTERACTIONS *
477 **************************/
479 if (gmx_mm_any_lt(rsq00,rcutoff2))
482 r00 = _mm_mul_pd(rsq00,rinv00);
484 /* Compute parameters for interactions between i and j atoms */
485 qq00 = _mm_mul_pd(iq0,jq0);
487 /* EWALD ELECTROSTATICS */
489 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
490 ewrt = _mm_mul_pd(r00,ewtabscale);
491 ewitab = _mm_cvttpd_epi32(ewrt);
492 eweps = _mm_sub_pd(ewrt,_mm_round_pd(ewrt, _MM_FROUND_FLOOR));
493 gmx_mm_load_2pair_swizzle_pd(ewtab+gmx_mm_extract_epi32(ewitab,0),ewtab+gmx_mm_extract_epi32(ewitab,1),
495 felec = _mm_add_pd(_mm_mul_pd( _mm_sub_pd(one,eweps),ewtabF),_mm_mul_pd(eweps,ewtabFn));
496 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
498 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
502 fscal = _mm_and_pd(fscal,cutoff_mask);
504 /* Calculate temporary vectorial force */
505 tx = _mm_mul_pd(fscal,dx00);
506 ty = _mm_mul_pd(fscal,dy00);
507 tz = _mm_mul_pd(fscal,dz00);
509 /* Update vectorial force */
510 fix0 = _mm_add_pd(fix0,tx);
511 fiy0 = _mm_add_pd(fiy0,ty);
512 fiz0 = _mm_add_pd(fiz0,tz);
514 gmx_mm_decrement_1rvec_2ptr_swizzle_pd(f+j_coord_offsetA,f+j_coord_offsetB,tx,ty,tz);
518 /* Inner loop uses 39 flops */
525 j_coord_offsetA = DIM*jnrA;
527 /* load j atom coordinates */
528 gmx_mm_load_1rvec_1ptr_swizzle_pd(x+j_coord_offsetA,
531 /* Calculate displacement vector */
532 dx00 = _mm_sub_pd(ix0,jx0);
533 dy00 = _mm_sub_pd(iy0,jy0);
534 dz00 = _mm_sub_pd(iz0,jz0);
536 /* Calculate squared distance and things based on it */
537 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
539 rinv00 = gmx_mm_invsqrt_pd(rsq00);
541 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
543 /* Load parameters for j particles */
544 jq0 = _mm_load_sd(charge+jnrA+0);
546 /**************************
547 * CALCULATE INTERACTIONS *
548 **************************/
550 if (gmx_mm_any_lt(rsq00,rcutoff2))
553 r00 = _mm_mul_pd(rsq00,rinv00);
555 /* Compute parameters for interactions between i and j atoms */
556 qq00 = _mm_mul_pd(iq0,jq0);
558 /* EWALD ELECTROSTATICS */
560 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
561 ewrt = _mm_mul_pd(r00,ewtabscale);
562 ewitab = _mm_cvttpd_epi32(ewrt);
563 eweps = _mm_sub_pd(ewrt,_mm_round_pd(ewrt, _MM_FROUND_FLOOR));
564 gmx_mm_load_1pair_swizzle_pd(ewtab+gmx_mm_extract_epi32(ewitab,0),&ewtabF,&ewtabFn);
565 felec = _mm_add_pd(_mm_mul_pd( _mm_sub_pd(one,eweps),ewtabF),_mm_mul_pd(eweps,ewtabFn));
566 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
568 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
572 fscal = _mm_and_pd(fscal,cutoff_mask);
574 fscal = _mm_unpacklo_pd(fscal,_mm_setzero_pd());
576 /* Calculate temporary vectorial force */
577 tx = _mm_mul_pd(fscal,dx00);
578 ty = _mm_mul_pd(fscal,dy00);
579 tz = _mm_mul_pd(fscal,dz00);
581 /* Update vectorial force */
582 fix0 = _mm_add_pd(fix0,tx);
583 fiy0 = _mm_add_pd(fiy0,ty);
584 fiz0 = _mm_add_pd(fiz0,tz);
586 gmx_mm_decrement_1rvec_1ptr_swizzle_pd(f+j_coord_offsetA,tx,ty,tz);
590 /* Inner loop uses 39 flops */
593 /* End of innermost loop */
595 gmx_mm_update_iforce_1atom_swizzle_pd(fix0,fiy0,fiz0,
596 f+i_coord_offset,fshift+i_shift_offset);
598 /* Increment number of inner iterations */
599 inneriter += j_index_end - j_index_start;
601 /* Outer loop uses 7 flops */
604 /* Increment number of outer iterations */
607 /* Update outer/inner flops */
609 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_F,outeriter*7 + inneriter*39);