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 avx_128_fma_single kernel generator.
44 #include "../nb_kernel.h"
45 #include "gromacs/legacyheaders/types/simple.h"
46 #include "gromacs/math/vec.h"
47 #include "gromacs/legacyheaders/nrnb.h"
49 #include "gromacs/simd/math_x86_avx_128_fma_single.h"
50 #include "kernelutil_x86_avx_128_fma_single.h"
53 * Gromacs nonbonded kernel: nb_kernel_ElecRFCut_VdwNone_GeomP1P1_VF_avx_128_fma_single
54 * Electrostatics interaction: ReactionField
55 * VdW interaction: None
56 * Geometry: Particle-Particle
57 * Calculate force/pot: PotentialAndForce
60 nb_kernel_ElecRFCut_VdwNone_GeomP1P1_VF_avx_128_fma_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 * gmx_restrict kernel_data,
67 t_nrnb * gmx_restrict nrnb)
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 AVX_128, e.g. for the four different
72 * jnr indices corresponding to data put in the four positions in the SIMD register.
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;
81 real *shiftvec,*fshift,*x,*f;
82 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
84 __m128 fscal,rcutoff,rcutoff2,jidxall;
86 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
87 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
88 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
89 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
90 __m128 velec,felec,velecsum,facel,crf,krf,krf2;
92 __m128 dummy_mask,cutoff_mask;
93 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
94 __m128 one = _mm_set1_ps(1.0);
95 __m128 two = _mm_set1_ps(2.0);
101 jindex = nlist->jindex;
103 shiftidx = nlist->shift;
105 shiftvec = fr->shift_vec[0];
106 fshift = fr->fshift[0];
107 facel = _mm_set1_ps(fr->epsfac);
108 charge = mdatoms->chargeA;
109 krf = _mm_set1_ps(fr->ic->k_rf);
110 krf2 = _mm_set1_ps(fr->ic->k_rf*2.0);
111 crf = _mm_set1_ps(fr->ic->c_rf);
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_ps(rcutoff_scalar);
116 rcutoff2 = _mm_mul_ps(rcutoff,rcutoff);
118 /* Avoid stupid compiler warnings */
119 jnrA = jnrB = jnrC = jnrD = 0;
128 for(iidx=0;iidx<4*DIM;iidx++)
133 /* Start outer loop over neighborlists */
134 for(iidx=0; iidx<nri; iidx++)
136 /* Load shift vector for this list */
137 i_shift_offset = DIM*shiftidx[iidx];
139 /* Load limits for loop over neighbors */
140 j_index_start = jindex[iidx];
141 j_index_end = jindex[iidx+1];
143 /* Get outer coordinate index */
145 i_coord_offset = DIM*inr;
147 /* Load i particle coords and add shift vector */
148 gmx_mm_load_shift_and_1rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
150 fix0 = _mm_setzero_ps();
151 fiy0 = _mm_setzero_ps();
152 fiz0 = _mm_setzero_ps();
154 /* Load parameters for i particles */
155 iq0 = _mm_mul_ps(facel,_mm_load1_ps(charge+inr+0));
157 /* Reset potential sums */
158 velecsum = _mm_setzero_ps();
160 /* Start inner kernel loop */
161 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
164 /* Get j neighbor index, and coordinate index */
169 j_coord_offsetA = DIM*jnrA;
170 j_coord_offsetB = DIM*jnrB;
171 j_coord_offsetC = DIM*jnrC;
172 j_coord_offsetD = DIM*jnrD;
174 /* load j atom coordinates */
175 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
176 x+j_coord_offsetC,x+j_coord_offsetD,
179 /* Calculate displacement vector */
180 dx00 = _mm_sub_ps(ix0,jx0);
181 dy00 = _mm_sub_ps(iy0,jy0);
182 dz00 = _mm_sub_ps(iz0,jz0);
184 /* Calculate squared distance and things based on it */
185 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
187 rinv00 = gmx_mm_invsqrt_ps(rsq00);
189 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
191 /* Load parameters for j particles */
192 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
193 charge+jnrC+0,charge+jnrD+0);
195 /**************************
196 * CALCULATE INTERACTIONS *
197 **************************/
199 if (gmx_mm_any_lt(rsq00,rcutoff2))
202 /* Compute parameters for interactions between i and j atoms */
203 qq00 = _mm_mul_ps(iq0,jq0);
205 /* REACTION-FIELD ELECTROSTATICS */
206 velec = _mm_mul_ps(qq00,_mm_sub_ps(_mm_macc_ps(krf,rsq00,rinv00),crf));
207 felec = _mm_mul_ps(qq00,_mm_msub_ps(rinv00,rinvsq00,krf2));
209 cutoff_mask = _mm_cmplt_ps(rsq00,rcutoff2);
211 /* Update potential sum for this i atom from the interaction with this j atom. */
212 velec = _mm_and_ps(velec,cutoff_mask);
213 velecsum = _mm_add_ps(velecsum,velec);
217 fscal = _mm_and_ps(fscal,cutoff_mask);
219 /* Update vectorial force */
220 fix0 = _mm_macc_ps(dx00,fscal,fix0);
221 fiy0 = _mm_macc_ps(dy00,fscal,fiy0);
222 fiz0 = _mm_macc_ps(dz00,fscal,fiz0);
224 fjptrA = f+j_coord_offsetA;
225 fjptrB = f+j_coord_offsetB;
226 fjptrC = f+j_coord_offsetC;
227 fjptrD = f+j_coord_offsetD;
228 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,
229 _mm_mul_ps(dx00,fscal),
230 _mm_mul_ps(dy00,fscal),
231 _mm_mul_ps(dz00,fscal));
235 /* Inner loop uses 39 flops */
241 /* Get j neighbor index, and coordinate index */
242 jnrlistA = jjnr[jidx];
243 jnrlistB = jjnr[jidx+1];
244 jnrlistC = jjnr[jidx+2];
245 jnrlistD = jjnr[jidx+3];
246 /* Sign of each element will be negative for non-real atoms.
247 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
248 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
250 dummy_mask = gmx_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
251 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
252 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
253 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
254 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
255 j_coord_offsetA = DIM*jnrA;
256 j_coord_offsetB = DIM*jnrB;
257 j_coord_offsetC = DIM*jnrC;
258 j_coord_offsetD = DIM*jnrD;
260 /* load j atom coordinates */
261 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
262 x+j_coord_offsetC,x+j_coord_offsetD,
265 /* Calculate displacement vector */
266 dx00 = _mm_sub_ps(ix0,jx0);
267 dy00 = _mm_sub_ps(iy0,jy0);
268 dz00 = _mm_sub_ps(iz0,jz0);
270 /* Calculate squared distance and things based on it */
271 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
273 rinv00 = gmx_mm_invsqrt_ps(rsq00);
275 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
277 /* Load parameters for j particles */
278 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
279 charge+jnrC+0,charge+jnrD+0);
281 /**************************
282 * CALCULATE INTERACTIONS *
283 **************************/
285 if (gmx_mm_any_lt(rsq00,rcutoff2))
288 /* Compute parameters for interactions between i and j atoms */
289 qq00 = _mm_mul_ps(iq0,jq0);
291 /* REACTION-FIELD ELECTROSTATICS */
292 velec = _mm_mul_ps(qq00,_mm_sub_ps(_mm_macc_ps(krf,rsq00,rinv00),crf));
293 felec = _mm_mul_ps(qq00,_mm_msub_ps(rinv00,rinvsq00,krf2));
295 cutoff_mask = _mm_cmplt_ps(rsq00,rcutoff2);
297 /* Update potential sum for this i atom from the interaction with this j atom. */
298 velec = _mm_and_ps(velec,cutoff_mask);
299 velec = _mm_andnot_ps(dummy_mask,velec);
300 velecsum = _mm_add_ps(velecsum,velec);
304 fscal = _mm_and_ps(fscal,cutoff_mask);
306 fscal = _mm_andnot_ps(dummy_mask,fscal);
308 /* Update vectorial force */
309 fix0 = _mm_macc_ps(dx00,fscal,fix0);
310 fiy0 = _mm_macc_ps(dy00,fscal,fiy0);
311 fiz0 = _mm_macc_ps(dz00,fscal,fiz0);
313 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
314 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
315 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
316 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
317 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,
318 _mm_mul_ps(dx00,fscal),
319 _mm_mul_ps(dy00,fscal),
320 _mm_mul_ps(dz00,fscal));
324 /* Inner loop uses 39 flops */
327 /* End of innermost loop */
329 gmx_mm_update_iforce_1atom_swizzle_ps(fix0,fiy0,fiz0,
330 f+i_coord_offset,fshift+i_shift_offset);
333 /* Update potential energies */
334 gmx_mm_update_1pot_ps(velecsum,kernel_data->energygrp_elec+ggid);
336 /* Increment number of inner iterations */
337 inneriter += j_index_end - j_index_start;
339 /* Outer loop uses 8 flops */
342 /* Increment number of outer iterations */
345 /* Update outer/inner flops */
347 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VF,outeriter*8 + inneriter*39);
350 * Gromacs nonbonded kernel: nb_kernel_ElecRFCut_VdwNone_GeomP1P1_F_avx_128_fma_single
351 * Electrostatics interaction: ReactionField
352 * VdW interaction: None
353 * Geometry: Particle-Particle
354 * Calculate force/pot: Force
357 nb_kernel_ElecRFCut_VdwNone_GeomP1P1_F_avx_128_fma_single
358 (t_nblist * gmx_restrict nlist,
359 rvec * gmx_restrict xx,
360 rvec * gmx_restrict ff,
361 t_forcerec * gmx_restrict fr,
362 t_mdatoms * gmx_restrict mdatoms,
363 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
364 t_nrnb * gmx_restrict nrnb)
366 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
367 * just 0 for non-waters.
368 * Suffixes A,B,C,D refer to j loop unrolling done with AVX_128, e.g. for the four different
369 * jnr indices corresponding to data put in the four positions in the SIMD register.
371 int i_shift_offset,i_coord_offset,outeriter,inneriter;
372 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
373 int jnrA,jnrB,jnrC,jnrD;
374 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
375 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
376 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
378 real *shiftvec,*fshift,*x,*f;
379 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
381 __m128 fscal,rcutoff,rcutoff2,jidxall;
383 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
384 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
385 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
386 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
387 __m128 velec,felec,velecsum,facel,crf,krf,krf2;
389 __m128 dummy_mask,cutoff_mask;
390 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
391 __m128 one = _mm_set1_ps(1.0);
392 __m128 two = _mm_set1_ps(2.0);
398 jindex = nlist->jindex;
400 shiftidx = nlist->shift;
402 shiftvec = fr->shift_vec[0];
403 fshift = fr->fshift[0];
404 facel = _mm_set1_ps(fr->epsfac);
405 charge = mdatoms->chargeA;
406 krf = _mm_set1_ps(fr->ic->k_rf);
407 krf2 = _mm_set1_ps(fr->ic->k_rf*2.0);
408 crf = _mm_set1_ps(fr->ic->c_rf);
410 /* When we use explicit cutoffs the value must be identical for elec and VdW, so use elec as an arbitrary choice */
411 rcutoff_scalar = fr->rcoulomb;
412 rcutoff = _mm_set1_ps(rcutoff_scalar);
413 rcutoff2 = _mm_mul_ps(rcutoff,rcutoff);
415 /* Avoid stupid compiler warnings */
416 jnrA = jnrB = jnrC = jnrD = 0;
425 for(iidx=0;iidx<4*DIM;iidx++)
430 /* Start outer loop over neighborlists */
431 for(iidx=0; iidx<nri; iidx++)
433 /* Load shift vector for this list */
434 i_shift_offset = DIM*shiftidx[iidx];
436 /* Load limits for loop over neighbors */
437 j_index_start = jindex[iidx];
438 j_index_end = jindex[iidx+1];
440 /* Get outer coordinate index */
442 i_coord_offset = DIM*inr;
444 /* Load i particle coords and add shift vector */
445 gmx_mm_load_shift_and_1rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
447 fix0 = _mm_setzero_ps();
448 fiy0 = _mm_setzero_ps();
449 fiz0 = _mm_setzero_ps();
451 /* Load parameters for i particles */
452 iq0 = _mm_mul_ps(facel,_mm_load1_ps(charge+inr+0));
454 /* Start inner kernel loop */
455 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
458 /* Get j neighbor index, and coordinate index */
463 j_coord_offsetA = DIM*jnrA;
464 j_coord_offsetB = DIM*jnrB;
465 j_coord_offsetC = DIM*jnrC;
466 j_coord_offsetD = DIM*jnrD;
468 /* load j atom coordinates */
469 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
470 x+j_coord_offsetC,x+j_coord_offsetD,
473 /* Calculate displacement vector */
474 dx00 = _mm_sub_ps(ix0,jx0);
475 dy00 = _mm_sub_ps(iy0,jy0);
476 dz00 = _mm_sub_ps(iz0,jz0);
478 /* Calculate squared distance and things based on it */
479 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
481 rinv00 = gmx_mm_invsqrt_ps(rsq00);
483 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
485 /* Load parameters for j particles */
486 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
487 charge+jnrC+0,charge+jnrD+0);
489 /**************************
490 * CALCULATE INTERACTIONS *
491 **************************/
493 if (gmx_mm_any_lt(rsq00,rcutoff2))
496 /* Compute parameters for interactions between i and j atoms */
497 qq00 = _mm_mul_ps(iq0,jq0);
499 /* REACTION-FIELD ELECTROSTATICS */
500 felec = _mm_mul_ps(qq00,_mm_msub_ps(rinv00,rinvsq00,krf2));
502 cutoff_mask = _mm_cmplt_ps(rsq00,rcutoff2);
506 fscal = _mm_and_ps(fscal,cutoff_mask);
508 /* Update vectorial force */
509 fix0 = _mm_macc_ps(dx00,fscal,fix0);
510 fiy0 = _mm_macc_ps(dy00,fscal,fiy0);
511 fiz0 = _mm_macc_ps(dz00,fscal,fiz0);
513 fjptrA = f+j_coord_offsetA;
514 fjptrB = f+j_coord_offsetB;
515 fjptrC = f+j_coord_offsetC;
516 fjptrD = f+j_coord_offsetD;
517 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,
518 _mm_mul_ps(dx00,fscal),
519 _mm_mul_ps(dy00,fscal),
520 _mm_mul_ps(dz00,fscal));
524 /* Inner loop uses 33 flops */
530 /* Get j neighbor index, and coordinate index */
531 jnrlistA = jjnr[jidx];
532 jnrlistB = jjnr[jidx+1];
533 jnrlistC = jjnr[jidx+2];
534 jnrlistD = jjnr[jidx+3];
535 /* Sign of each element will be negative for non-real atoms.
536 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
537 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
539 dummy_mask = gmx_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
540 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
541 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
542 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
543 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
544 j_coord_offsetA = DIM*jnrA;
545 j_coord_offsetB = DIM*jnrB;
546 j_coord_offsetC = DIM*jnrC;
547 j_coord_offsetD = DIM*jnrD;
549 /* load j atom coordinates */
550 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
551 x+j_coord_offsetC,x+j_coord_offsetD,
554 /* Calculate displacement vector */
555 dx00 = _mm_sub_ps(ix0,jx0);
556 dy00 = _mm_sub_ps(iy0,jy0);
557 dz00 = _mm_sub_ps(iz0,jz0);
559 /* Calculate squared distance and things based on it */
560 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
562 rinv00 = gmx_mm_invsqrt_ps(rsq00);
564 rinvsq00 = _mm_mul_ps(rinv00,rinv00);
566 /* Load parameters for j particles */
567 jq0 = gmx_mm_load_4real_swizzle_ps(charge+jnrA+0,charge+jnrB+0,
568 charge+jnrC+0,charge+jnrD+0);
570 /**************************
571 * CALCULATE INTERACTIONS *
572 **************************/
574 if (gmx_mm_any_lt(rsq00,rcutoff2))
577 /* Compute parameters for interactions between i and j atoms */
578 qq00 = _mm_mul_ps(iq0,jq0);
580 /* REACTION-FIELD ELECTROSTATICS */
581 felec = _mm_mul_ps(qq00,_mm_msub_ps(rinv00,rinvsq00,krf2));
583 cutoff_mask = _mm_cmplt_ps(rsq00,rcutoff2);
587 fscal = _mm_and_ps(fscal,cutoff_mask);
589 fscal = _mm_andnot_ps(dummy_mask,fscal);
591 /* Update vectorial force */
592 fix0 = _mm_macc_ps(dx00,fscal,fix0);
593 fiy0 = _mm_macc_ps(dy00,fscal,fiy0);
594 fiz0 = _mm_macc_ps(dz00,fscal,fiz0);
596 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
597 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
598 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
599 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
600 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,
601 _mm_mul_ps(dx00,fscal),
602 _mm_mul_ps(dy00,fscal),
603 _mm_mul_ps(dz00,fscal));
607 /* Inner loop uses 33 flops */
610 /* End of innermost loop */
612 gmx_mm_update_iforce_1atom_swizzle_ps(fix0,fiy0,fiz0,
613 f+i_coord_offset,fshift+i_shift_offset);
615 /* Increment number of inner iterations */
616 inneriter += j_index_end - j_index_start;
618 /* Outer loop uses 7 flops */
621 /* Increment number of outer iterations */
624 /* Update outer/inner flops */
626 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_F,outeriter*7 + inneriter*33);