2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012,2013,2014,2015,2017, 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 sse2_double kernel generator.
44 #include "../nb_kernel.h"
45 #include "gromacs/gmxlib/nrnb.h"
47 #include "kernelutil_x86_sse2_double.h"
50 * Gromacs nonbonded kernel: nb_kernel_ElecEwSh_VdwNone_GeomP1P1_VF_sse2_double
51 * Electrostatics interaction: Ewald
52 * VdW interaction: None
53 * Geometry: Particle-Particle
54 * Calculate force/pot: PotentialAndForce
57 nb_kernel_ElecEwSh_VdwNone_GeomP1P1_VF_sse2_double
58 (t_nblist * gmx_restrict nlist,
59 rvec * gmx_restrict xx,
60 rvec * gmx_restrict ff,
61 struct t_forcerec * gmx_restrict fr,
62 t_mdatoms * gmx_restrict mdatoms,
63 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
64 t_nrnb * gmx_restrict nrnb)
66 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
67 * just 0 for non-waters.
68 * Suffixes A,B refer to j loop unrolling done with SSE double precision, e.g. for the two different
69 * jnr indices corresponding to data put in the four positions in the SIMD register.
71 int i_shift_offset,i_coord_offset,outeriter,inneriter;
72 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
74 int j_coord_offsetA,j_coord_offsetB;
75 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
77 real *shiftvec,*fshift,*x,*f;
78 __m128d tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
80 __m128d ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
81 int vdwjidx0A,vdwjidx0B;
82 __m128d jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
83 __m128d dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
84 __m128d velec,felec,velecsum,facel,crf,krf,krf2;
87 __m128d ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace,ewtabF,ewtabFn,ewtabD,ewtabV;
89 __m128d dummy_mask,cutoff_mask;
90 __m128d signbit = gmx_mm_castsi128_pd( _mm_set_epi32(0x80000000,0x00000000,0x80000000,0x00000000) );
91 __m128d one = _mm_set1_pd(1.0);
92 __m128d two = _mm_set1_pd(2.0);
98 jindex = nlist->jindex;
100 shiftidx = nlist->shift;
102 shiftvec = fr->shift_vec[0];
103 fshift = fr->fshift[0];
104 facel = _mm_set1_pd(fr->ic->epsfac);
105 charge = mdatoms->chargeA;
107 sh_ewald = _mm_set1_pd(fr->ic->sh_ewald);
108 ewtab = fr->ic->tabq_coul_FDV0;
109 ewtabscale = _mm_set1_pd(fr->ic->tabq_scale);
110 ewtabhalfspace = _mm_set1_pd(0.5/fr->ic->tabq_scale);
112 /* When we use explicit cutoffs the value must be identical for elec and VdW, so use elec as an arbitrary choice */
113 rcutoff_scalar = fr->ic->rcoulomb;
114 rcutoff = _mm_set1_pd(rcutoff_scalar);
115 rcutoff2 = _mm_mul_pd(rcutoff,rcutoff);
117 /* Avoid stupid compiler warnings */
125 /* Start outer loop over neighborlists */
126 for(iidx=0; iidx<nri; iidx++)
128 /* Load shift vector for this list */
129 i_shift_offset = DIM*shiftidx[iidx];
131 /* Load limits for loop over neighbors */
132 j_index_start = jindex[iidx];
133 j_index_end = jindex[iidx+1];
135 /* Get outer coordinate index */
137 i_coord_offset = DIM*inr;
139 /* Load i particle coords and add shift vector */
140 gmx_mm_load_shift_and_1rvec_broadcast_pd(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
142 fix0 = _mm_setzero_pd();
143 fiy0 = _mm_setzero_pd();
144 fiz0 = _mm_setzero_pd();
146 /* Load parameters for i particles */
147 iq0 = _mm_mul_pd(facel,_mm_load1_pd(charge+inr+0));
149 /* Reset potential sums */
150 velecsum = _mm_setzero_pd();
152 /* Start inner kernel loop */
153 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
156 /* Get j neighbor index, and coordinate index */
159 j_coord_offsetA = DIM*jnrA;
160 j_coord_offsetB = DIM*jnrB;
162 /* load j atom coordinates */
163 gmx_mm_load_1rvec_2ptr_swizzle_pd(x+j_coord_offsetA,x+j_coord_offsetB,
166 /* Calculate displacement vector */
167 dx00 = _mm_sub_pd(ix0,jx0);
168 dy00 = _mm_sub_pd(iy0,jy0);
169 dz00 = _mm_sub_pd(iz0,jz0);
171 /* Calculate squared distance and things based on it */
172 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
174 rinv00 = sse2_invsqrt_d(rsq00);
176 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
178 /* Load parameters for j particles */
179 jq0 = gmx_mm_load_2real_swizzle_pd(charge+jnrA+0,charge+jnrB+0);
181 /**************************
182 * CALCULATE INTERACTIONS *
183 **************************/
185 if (gmx_mm_any_lt(rsq00,rcutoff2))
188 r00 = _mm_mul_pd(rsq00,rinv00);
190 /* Compute parameters for interactions between i and j atoms */
191 qq00 = _mm_mul_pd(iq0,jq0);
193 /* EWALD ELECTROSTATICS */
195 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
196 ewrt = _mm_mul_pd(r00,ewtabscale);
197 ewitab = _mm_cvttpd_epi32(ewrt);
198 eweps = _mm_sub_pd(ewrt,_mm_cvtepi32_pd(ewitab));
199 ewitab = _mm_slli_epi32(ewitab,2);
200 ewtabF = _mm_load_pd( ewtab + gmx_mm_extract_epi32(ewitab,0) );
201 ewtabD = _mm_load_pd( ewtab + gmx_mm_extract_epi32(ewitab,1) );
202 GMX_MM_TRANSPOSE2_PD(ewtabF,ewtabD);
203 ewtabV = _mm_load_sd( ewtab + gmx_mm_extract_epi32(ewitab,0) +2);
204 ewtabFn = _mm_load_sd( ewtab + gmx_mm_extract_epi32(ewitab,1) +2);
205 GMX_MM_TRANSPOSE2_PD(ewtabV,ewtabFn);
206 felec = _mm_add_pd(ewtabF,_mm_mul_pd(eweps,ewtabD));
207 velec = _mm_sub_pd(ewtabV,_mm_mul_pd(_mm_mul_pd(ewtabhalfspace,eweps),_mm_add_pd(ewtabF,felec)));
208 velec = _mm_mul_pd(qq00,_mm_sub_pd(_mm_sub_pd(rinv00,sh_ewald),velec));
209 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
211 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
213 /* Update potential sum for this i atom from the interaction with this j atom. */
214 velec = _mm_and_pd(velec,cutoff_mask);
215 velecsum = _mm_add_pd(velecsum,velec);
219 fscal = _mm_and_pd(fscal,cutoff_mask);
221 /* Calculate temporary vectorial force */
222 tx = _mm_mul_pd(fscal,dx00);
223 ty = _mm_mul_pd(fscal,dy00);
224 tz = _mm_mul_pd(fscal,dz00);
226 /* Update vectorial force */
227 fix0 = _mm_add_pd(fix0,tx);
228 fiy0 = _mm_add_pd(fiy0,ty);
229 fiz0 = _mm_add_pd(fiz0,tz);
231 gmx_mm_decrement_1rvec_2ptr_swizzle_pd(f+j_coord_offsetA,f+j_coord_offsetB,tx,ty,tz);
235 /* Inner loop uses 46 flops */
242 j_coord_offsetA = DIM*jnrA;
244 /* load j atom coordinates */
245 gmx_mm_load_1rvec_1ptr_swizzle_pd(x+j_coord_offsetA,
248 /* Calculate displacement vector */
249 dx00 = _mm_sub_pd(ix0,jx0);
250 dy00 = _mm_sub_pd(iy0,jy0);
251 dz00 = _mm_sub_pd(iz0,jz0);
253 /* Calculate squared distance and things based on it */
254 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
256 rinv00 = sse2_invsqrt_d(rsq00);
258 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
260 /* Load parameters for j particles */
261 jq0 = _mm_load_sd(charge+jnrA+0);
263 /**************************
264 * CALCULATE INTERACTIONS *
265 **************************/
267 if (gmx_mm_any_lt(rsq00,rcutoff2))
270 r00 = _mm_mul_pd(rsq00,rinv00);
272 /* Compute parameters for interactions between i and j atoms */
273 qq00 = _mm_mul_pd(iq0,jq0);
275 /* EWALD ELECTROSTATICS */
277 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
278 ewrt = _mm_mul_pd(r00,ewtabscale);
279 ewitab = _mm_cvttpd_epi32(ewrt);
280 eweps = _mm_sub_pd(ewrt,_mm_cvtepi32_pd(ewitab));
281 ewitab = _mm_slli_epi32(ewitab,2);
282 ewtabF = _mm_load_pd( ewtab + gmx_mm_extract_epi32(ewitab,0) );
283 ewtabD = _mm_setzero_pd();
284 GMX_MM_TRANSPOSE2_PD(ewtabF,ewtabD);
285 ewtabV = _mm_load_sd( ewtab + gmx_mm_extract_epi32(ewitab,0) +2);
286 ewtabFn = _mm_setzero_pd();
287 GMX_MM_TRANSPOSE2_PD(ewtabV,ewtabFn);
288 felec = _mm_add_pd(ewtabF,_mm_mul_pd(eweps,ewtabD));
289 velec = _mm_sub_pd(ewtabV,_mm_mul_pd(_mm_mul_pd(ewtabhalfspace,eweps),_mm_add_pd(ewtabF,felec)));
290 velec = _mm_mul_pd(qq00,_mm_sub_pd(_mm_sub_pd(rinv00,sh_ewald),velec));
291 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
293 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
295 /* Update potential sum for this i atom from the interaction with this j atom. */
296 velec = _mm_and_pd(velec,cutoff_mask);
297 velec = _mm_unpacklo_pd(velec,_mm_setzero_pd());
298 velecsum = _mm_add_pd(velecsum,velec);
302 fscal = _mm_and_pd(fscal,cutoff_mask);
304 fscal = _mm_unpacklo_pd(fscal,_mm_setzero_pd());
306 /* Calculate temporary vectorial force */
307 tx = _mm_mul_pd(fscal,dx00);
308 ty = _mm_mul_pd(fscal,dy00);
309 tz = _mm_mul_pd(fscal,dz00);
311 /* Update vectorial force */
312 fix0 = _mm_add_pd(fix0,tx);
313 fiy0 = _mm_add_pd(fiy0,ty);
314 fiz0 = _mm_add_pd(fiz0,tz);
316 gmx_mm_decrement_1rvec_1ptr_swizzle_pd(f+j_coord_offsetA,tx,ty,tz);
320 /* Inner loop uses 46 flops */
323 /* End of innermost loop */
325 gmx_mm_update_iforce_1atom_swizzle_pd(fix0,fiy0,fiz0,
326 f+i_coord_offset,fshift+i_shift_offset);
329 /* Update potential energies */
330 gmx_mm_update_1pot_pd(velecsum,kernel_data->energygrp_elec+ggid);
332 /* Increment number of inner iterations */
333 inneriter += j_index_end - j_index_start;
335 /* Outer loop uses 8 flops */
338 /* Increment number of outer iterations */
341 /* Update outer/inner flops */
343 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VF,outeriter*8 + inneriter*46);
346 * Gromacs nonbonded kernel: nb_kernel_ElecEwSh_VdwNone_GeomP1P1_F_sse2_double
347 * Electrostatics interaction: Ewald
348 * VdW interaction: None
349 * Geometry: Particle-Particle
350 * Calculate force/pot: Force
353 nb_kernel_ElecEwSh_VdwNone_GeomP1P1_F_sse2_double
354 (t_nblist * gmx_restrict nlist,
355 rvec * gmx_restrict xx,
356 rvec * gmx_restrict ff,
357 struct t_forcerec * gmx_restrict fr,
358 t_mdatoms * gmx_restrict mdatoms,
359 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
360 t_nrnb * gmx_restrict nrnb)
362 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
363 * just 0 for non-waters.
364 * Suffixes A,B refer to j loop unrolling done with SSE double precision, e.g. for the two different
365 * jnr indices corresponding to data put in the four positions in the SIMD register.
367 int i_shift_offset,i_coord_offset,outeriter,inneriter;
368 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
370 int j_coord_offsetA,j_coord_offsetB;
371 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
373 real *shiftvec,*fshift,*x,*f;
374 __m128d tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
376 __m128d ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
377 int vdwjidx0A,vdwjidx0B;
378 __m128d jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
379 __m128d dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
380 __m128d velec,felec,velecsum,facel,crf,krf,krf2;
383 __m128d ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace,ewtabF,ewtabFn,ewtabD,ewtabV;
385 __m128d dummy_mask,cutoff_mask;
386 __m128d signbit = gmx_mm_castsi128_pd( _mm_set_epi32(0x80000000,0x00000000,0x80000000,0x00000000) );
387 __m128d one = _mm_set1_pd(1.0);
388 __m128d two = _mm_set1_pd(2.0);
394 jindex = nlist->jindex;
396 shiftidx = nlist->shift;
398 shiftvec = fr->shift_vec[0];
399 fshift = fr->fshift[0];
400 facel = _mm_set1_pd(fr->ic->epsfac);
401 charge = mdatoms->chargeA;
403 sh_ewald = _mm_set1_pd(fr->ic->sh_ewald);
404 ewtab = fr->ic->tabq_coul_F;
405 ewtabscale = _mm_set1_pd(fr->ic->tabq_scale);
406 ewtabhalfspace = _mm_set1_pd(0.5/fr->ic->tabq_scale);
408 /* When we use explicit cutoffs the value must be identical for elec and VdW, so use elec as an arbitrary choice */
409 rcutoff_scalar = fr->ic->rcoulomb;
410 rcutoff = _mm_set1_pd(rcutoff_scalar);
411 rcutoff2 = _mm_mul_pd(rcutoff,rcutoff);
413 /* Avoid stupid compiler warnings */
421 /* Start outer loop over neighborlists */
422 for(iidx=0; iidx<nri; iidx++)
424 /* Load shift vector for this list */
425 i_shift_offset = DIM*shiftidx[iidx];
427 /* Load limits for loop over neighbors */
428 j_index_start = jindex[iidx];
429 j_index_end = jindex[iidx+1];
431 /* Get outer coordinate index */
433 i_coord_offset = DIM*inr;
435 /* Load i particle coords and add shift vector */
436 gmx_mm_load_shift_and_1rvec_broadcast_pd(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
438 fix0 = _mm_setzero_pd();
439 fiy0 = _mm_setzero_pd();
440 fiz0 = _mm_setzero_pd();
442 /* Load parameters for i particles */
443 iq0 = _mm_mul_pd(facel,_mm_load1_pd(charge+inr+0));
445 /* Start inner kernel loop */
446 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
449 /* Get j neighbor index, and coordinate index */
452 j_coord_offsetA = DIM*jnrA;
453 j_coord_offsetB = DIM*jnrB;
455 /* load j atom coordinates */
456 gmx_mm_load_1rvec_2ptr_swizzle_pd(x+j_coord_offsetA,x+j_coord_offsetB,
459 /* Calculate displacement vector */
460 dx00 = _mm_sub_pd(ix0,jx0);
461 dy00 = _mm_sub_pd(iy0,jy0);
462 dz00 = _mm_sub_pd(iz0,jz0);
464 /* Calculate squared distance and things based on it */
465 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
467 rinv00 = sse2_invsqrt_d(rsq00);
469 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
471 /* Load parameters for j particles */
472 jq0 = gmx_mm_load_2real_swizzle_pd(charge+jnrA+0,charge+jnrB+0);
474 /**************************
475 * CALCULATE INTERACTIONS *
476 **************************/
478 if (gmx_mm_any_lt(rsq00,rcutoff2))
481 r00 = _mm_mul_pd(rsq00,rinv00);
483 /* Compute parameters for interactions between i and j atoms */
484 qq00 = _mm_mul_pd(iq0,jq0);
486 /* EWALD ELECTROSTATICS */
488 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
489 ewrt = _mm_mul_pd(r00,ewtabscale);
490 ewitab = _mm_cvttpd_epi32(ewrt);
491 eweps = _mm_sub_pd(ewrt,_mm_cvtepi32_pd(ewitab));
492 gmx_mm_load_2pair_swizzle_pd(ewtab+gmx_mm_extract_epi32(ewitab,0),ewtab+gmx_mm_extract_epi32(ewitab,1),
494 felec = _mm_add_pd(_mm_mul_pd( _mm_sub_pd(one,eweps),ewtabF),_mm_mul_pd(eweps,ewtabFn));
495 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
497 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
501 fscal = _mm_and_pd(fscal,cutoff_mask);
503 /* Calculate temporary vectorial force */
504 tx = _mm_mul_pd(fscal,dx00);
505 ty = _mm_mul_pd(fscal,dy00);
506 tz = _mm_mul_pd(fscal,dz00);
508 /* Update vectorial force */
509 fix0 = _mm_add_pd(fix0,tx);
510 fiy0 = _mm_add_pd(fiy0,ty);
511 fiz0 = _mm_add_pd(fiz0,tz);
513 gmx_mm_decrement_1rvec_2ptr_swizzle_pd(f+j_coord_offsetA,f+j_coord_offsetB,tx,ty,tz);
517 /* Inner loop uses 39 flops */
524 j_coord_offsetA = DIM*jnrA;
526 /* load j atom coordinates */
527 gmx_mm_load_1rvec_1ptr_swizzle_pd(x+j_coord_offsetA,
530 /* Calculate displacement vector */
531 dx00 = _mm_sub_pd(ix0,jx0);
532 dy00 = _mm_sub_pd(iy0,jy0);
533 dz00 = _mm_sub_pd(iz0,jz0);
535 /* Calculate squared distance and things based on it */
536 rsq00 = gmx_mm_calc_rsq_pd(dx00,dy00,dz00);
538 rinv00 = sse2_invsqrt_d(rsq00);
540 rinvsq00 = _mm_mul_pd(rinv00,rinv00);
542 /* Load parameters for j particles */
543 jq0 = _mm_load_sd(charge+jnrA+0);
545 /**************************
546 * CALCULATE INTERACTIONS *
547 **************************/
549 if (gmx_mm_any_lt(rsq00,rcutoff2))
552 r00 = _mm_mul_pd(rsq00,rinv00);
554 /* Compute parameters for interactions between i and j atoms */
555 qq00 = _mm_mul_pd(iq0,jq0);
557 /* EWALD ELECTROSTATICS */
559 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
560 ewrt = _mm_mul_pd(r00,ewtabscale);
561 ewitab = _mm_cvttpd_epi32(ewrt);
562 eweps = _mm_sub_pd(ewrt,_mm_cvtepi32_pd(ewitab));
563 gmx_mm_load_1pair_swizzle_pd(ewtab+gmx_mm_extract_epi32(ewitab,0),&ewtabF,&ewtabFn);
564 felec = _mm_add_pd(_mm_mul_pd( _mm_sub_pd(one,eweps),ewtabF),_mm_mul_pd(eweps,ewtabFn));
565 felec = _mm_mul_pd(_mm_mul_pd(qq00,rinv00),_mm_sub_pd(rinvsq00,felec));
567 cutoff_mask = _mm_cmplt_pd(rsq00,rcutoff2);
571 fscal = _mm_and_pd(fscal,cutoff_mask);
573 fscal = _mm_unpacklo_pd(fscal,_mm_setzero_pd());
575 /* Calculate temporary vectorial force */
576 tx = _mm_mul_pd(fscal,dx00);
577 ty = _mm_mul_pd(fscal,dy00);
578 tz = _mm_mul_pd(fscal,dz00);
580 /* Update vectorial force */
581 fix0 = _mm_add_pd(fix0,tx);
582 fiy0 = _mm_add_pd(fiy0,ty);
583 fiz0 = _mm_add_pd(fiz0,tz);
585 gmx_mm_decrement_1rvec_1ptr_swizzle_pd(f+j_coord_offsetA,tx,ty,tz);
589 /* Inner loop uses 39 flops */
592 /* End of innermost loop */
594 gmx_mm_update_iforce_1atom_swizzle_pd(fix0,fiy0,fiz0,
595 f+i_coord_offset,fshift+i_shift_offset);
597 /* Increment number of inner iterations */
598 inneriter += j_index_end - j_index_start;
600 /* Outer loop uses 7 flops */
603 /* Increment number of outer iterations */
606 /* Update outer/inner flops */
608 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_F,outeriter*7 + inneriter*39);