2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012,2013,2014,2015,2017,2018, 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 sparc64_hpc_ace_double kernel generator.
44 #include "../nb_kernel.h"
45 #include "gromacs/gmxlib/nrnb.h"
47 #include "kernelutil_sparc64_hpc_ace_double.h"
50 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_VF_sparc64_hpc_ace_double
51 * Electrostatics interaction: Coulomb
52 * VdW interaction: CubicSplineTable
53 * Geometry: Water3-Particle
54 * Calculate force/pot: PotentialAndForce
57 nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_VF_sparc64_hpc_ace_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 double precision SIMD, 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 _fjsp_v2r8 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
80 _fjsp_v2r8 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
82 _fjsp_v2r8 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
84 _fjsp_v2r8 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
85 int vdwjidx0A,vdwjidx0B;
86 _fjsp_v2r8 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
87 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
88 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
89 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
90 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
93 _fjsp_v2r8 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
96 _fjsp_v2r8 one_sixth = gmx_fjsp_set1_v2r8(1.0/6.0);
97 _fjsp_v2r8 one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
98 _fjsp_v2r8 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF,twovfeps;
101 _fjsp_v2r8 dummy_mask,cutoff_mask;
102 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
103 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
104 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
111 jindex = nlist->jindex;
113 shiftidx = nlist->shift;
115 shiftvec = fr->shift_vec[0];
116 fshift = fr->fshift[0];
117 facel = gmx_fjsp_set1_v2r8(fr->ic->epsfac);
118 charge = mdatoms->chargeA;
119 nvdwtype = fr->ntype;
121 vdwtype = mdatoms->typeA;
123 vftab = kernel_data->table_vdw->data;
124 vftabscale = gmx_fjsp_set1_v2r8(kernel_data->table_vdw->scale);
126 /* Setup water-specific parameters */
127 inr = nlist->iinr[0];
128 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
129 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
130 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
131 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
133 /* Avoid stupid compiler warnings */
141 /* Start outer loop over neighborlists */
142 for(iidx=0; iidx<nri; iidx++)
144 /* Load shift vector for this list */
145 i_shift_offset = DIM*shiftidx[iidx];
147 /* Load limits for loop over neighbors */
148 j_index_start = jindex[iidx];
149 j_index_end = jindex[iidx+1];
151 /* Get outer coordinate index */
153 i_coord_offset = DIM*inr;
155 /* Load i particle coords and add shift vector */
156 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
157 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
159 fix0 = _fjsp_setzero_v2r8();
160 fiy0 = _fjsp_setzero_v2r8();
161 fiz0 = _fjsp_setzero_v2r8();
162 fix1 = _fjsp_setzero_v2r8();
163 fiy1 = _fjsp_setzero_v2r8();
164 fiz1 = _fjsp_setzero_v2r8();
165 fix2 = _fjsp_setzero_v2r8();
166 fiy2 = _fjsp_setzero_v2r8();
167 fiz2 = _fjsp_setzero_v2r8();
169 /* Reset potential sums */
170 velecsum = _fjsp_setzero_v2r8();
171 vvdwsum = _fjsp_setzero_v2r8();
173 /* Start inner kernel loop */
174 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
177 /* Get j neighbor index, and coordinate index */
180 j_coord_offsetA = DIM*jnrA;
181 j_coord_offsetB = DIM*jnrB;
183 /* load j atom coordinates */
184 gmx_fjsp_load_1rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
187 /* Calculate displacement vector */
188 dx00 = _fjsp_sub_v2r8(ix0,jx0);
189 dy00 = _fjsp_sub_v2r8(iy0,jy0);
190 dz00 = _fjsp_sub_v2r8(iz0,jz0);
191 dx10 = _fjsp_sub_v2r8(ix1,jx0);
192 dy10 = _fjsp_sub_v2r8(iy1,jy0);
193 dz10 = _fjsp_sub_v2r8(iz1,jz0);
194 dx20 = _fjsp_sub_v2r8(ix2,jx0);
195 dy20 = _fjsp_sub_v2r8(iy2,jy0);
196 dz20 = _fjsp_sub_v2r8(iz2,jz0);
198 /* Calculate squared distance and things based on it */
199 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
200 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
201 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
203 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
204 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
205 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
207 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
208 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
209 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
211 /* Load parameters for j particles */
212 jq0 = gmx_fjsp_load_2real_swizzle_v2r8(charge+jnrA+0,charge+jnrB+0);
213 vdwjidx0A = 2*vdwtype[jnrA+0];
214 vdwjidx0B = 2*vdwtype[jnrB+0];
216 fjx0 = _fjsp_setzero_v2r8();
217 fjy0 = _fjsp_setzero_v2r8();
218 fjz0 = _fjsp_setzero_v2r8();
220 /**************************
221 * CALCULATE INTERACTIONS *
222 **************************/
224 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
226 /* Compute parameters for interactions between i and j atoms */
227 qq00 = _fjsp_mul_v2r8(iq0,jq0);
228 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
229 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
231 /* Calculate table index by multiplying r with table scale and truncate to integer */
232 rt = _fjsp_mul_v2r8(r00,vftabscale);
233 itab_tmp = _fjsp_dtox_v2r8(rt);
234 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
235 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
236 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
241 /* COULOMB ELECTROSTATICS */
242 velec = _fjsp_mul_v2r8(qq00,rinv00);
243 felec = _fjsp_mul_v2r8(velec,rinvsq00);
245 /* CUBIC SPLINE TABLE DISPERSION */
246 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
247 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
248 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
249 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
250 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 2 );
251 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
252 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
253 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
254 vvdw6 = _fjsp_mul_v2r8(c6_00,VV);
255 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
256 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
258 /* CUBIC SPLINE TABLE REPULSION */
259 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
260 F = _fjsp_load_v2r8( vftab + vfconv.i[1] + 4 );
261 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
262 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
263 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 6 );
264 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
265 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
266 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
267 vvdw12 = _fjsp_mul_v2r8(c12_00,VV);
268 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
269 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
270 vvdw = _fjsp_add_v2r8(vvdw12,vvdw6);
271 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
273 /* Update potential sum for this i atom from the interaction with this j atom. */
274 velecsum = _fjsp_add_v2r8(velecsum,velec);
275 vvdwsum = _fjsp_add_v2r8(vvdwsum,vvdw);
277 fscal = _fjsp_add_v2r8(felec,fvdw);
279 /* Update vectorial force */
280 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
281 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
282 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
284 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
285 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
286 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
288 /**************************
289 * CALCULATE INTERACTIONS *
290 **************************/
292 /* Compute parameters for interactions between i and j atoms */
293 qq10 = _fjsp_mul_v2r8(iq1,jq0);
295 /* COULOMB ELECTROSTATICS */
296 velec = _fjsp_mul_v2r8(qq10,rinv10);
297 felec = _fjsp_mul_v2r8(velec,rinvsq10);
299 /* Update potential sum for this i atom from the interaction with this j atom. */
300 velecsum = _fjsp_add_v2r8(velecsum,velec);
304 /* Update vectorial force */
305 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
306 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
307 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
309 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
310 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
311 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
313 /**************************
314 * CALCULATE INTERACTIONS *
315 **************************/
317 /* Compute parameters for interactions between i and j atoms */
318 qq20 = _fjsp_mul_v2r8(iq2,jq0);
320 /* COULOMB ELECTROSTATICS */
321 velec = _fjsp_mul_v2r8(qq20,rinv20);
322 felec = _fjsp_mul_v2r8(velec,rinvsq20);
324 /* Update potential sum for this i atom from the interaction with this j atom. */
325 velecsum = _fjsp_add_v2r8(velecsum,velec);
329 /* Update vectorial force */
330 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
331 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
332 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
334 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
335 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
336 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
338 gmx_fjsp_decrement_1rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0);
340 /* Inner loop uses 131 flops */
347 j_coord_offsetA = DIM*jnrA;
349 /* load j atom coordinates */
350 gmx_fjsp_load_1rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
353 /* Calculate displacement vector */
354 dx00 = _fjsp_sub_v2r8(ix0,jx0);
355 dy00 = _fjsp_sub_v2r8(iy0,jy0);
356 dz00 = _fjsp_sub_v2r8(iz0,jz0);
357 dx10 = _fjsp_sub_v2r8(ix1,jx0);
358 dy10 = _fjsp_sub_v2r8(iy1,jy0);
359 dz10 = _fjsp_sub_v2r8(iz1,jz0);
360 dx20 = _fjsp_sub_v2r8(ix2,jx0);
361 dy20 = _fjsp_sub_v2r8(iy2,jy0);
362 dz20 = _fjsp_sub_v2r8(iz2,jz0);
364 /* Calculate squared distance and things based on it */
365 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
366 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
367 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
369 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
370 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
371 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
373 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
374 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
375 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
377 /* Load parameters for j particles */
378 jq0 = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(),charge+jnrA+0);
379 vdwjidx0A = 2*vdwtype[jnrA+0];
381 fjx0 = _fjsp_setzero_v2r8();
382 fjy0 = _fjsp_setzero_v2r8();
383 fjz0 = _fjsp_setzero_v2r8();
385 /**************************
386 * CALCULATE INTERACTIONS *
387 **************************/
389 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
391 /* Compute parameters for interactions between i and j atoms */
392 qq00 = _fjsp_mul_v2r8(iq0,jq0);
393 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
394 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
396 /* Calculate table index by multiplying r with table scale and truncate to integer */
397 rt = _fjsp_mul_v2r8(r00,vftabscale);
398 itab_tmp = _fjsp_dtox_v2r8(rt);
399 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
400 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
401 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
406 /* COULOMB ELECTROSTATICS */
407 velec = _fjsp_mul_v2r8(qq00,rinv00);
408 felec = _fjsp_mul_v2r8(velec,rinvsq00);
410 /* CUBIC SPLINE TABLE DISPERSION */
411 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
412 F = _fjsp_setzero_v2r8();
413 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
414 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
415 H = _fjsp_setzero_v2r8();
416 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
417 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
418 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
419 vvdw6 = _fjsp_mul_v2r8(c6_00,VV);
420 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
421 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
423 /* CUBIC SPLINE TABLE REPULSION */
424 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
425 F = _fjsp_setzero_v2r8();
426 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
427 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
428 H = _fjsp_setzero_v2r8();
429 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
430 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
431 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
432 vvdw12 = _fjsp_mul_v2r8(c12_00,VV);
433 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
434 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
435 vvdw = _fjsp_add_v2r8(vvdw12,vvdw6);
436 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
438 /* Update potential sum for this i atom from the interaction with this j atom. */
439 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
440 velecsum = _fjsp_add_v2r8(velecsum,velec);
441 vvdw = _fjsp_unpacklo_v2r8(vvdw,_fjsp_setzero_v2r8());
442 vvdwsum = _fjsp_add_v2r8(vvdwsum,vvdw);
444 fscal = _fjsp_add_v2r8(felec,fvdw);
446 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
448 /* Update vectorial force */
449 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
450 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
451 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
453 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
454 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
455 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
457 /**************************
458 * CALCULATE INTERACTIONS *
459 **************************/
461 /* Compute parameters for interactions between i and j atoms */
462 qq10 = _fjsp_mul_v2r8(iq1,jq0);
464 /* COULOMB ELECTROSTATICS */
465 velec = _fjsp_mul_v2r8(qq10,rinv10);
466 felec = _fjsp_mul_v2r8(velec,rinvsq10);
468 /* Update potential sum for this i atom from the interaction with this j atom. */
469 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
470 velecsum = _fjsp_add_v2r8(velecsum,velec);
474 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
476 /* Update vectorial force */
477 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
478 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
479 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
481 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
482 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
483 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
485 /**************************
486 * CALCULATE INTERACTIONS *
487 **************************/
489 /* Compute parameters for interactions between i and j atoms */
490 qq20 = _fjsp_mul_v2r8(iq2,jq0);
492 /* COULOMB ELECTROSTATICS */
493 velec = _fjsp_mul_v2r8(qq20,rinv20);
494 felec = _fjsp_mul_v2r8(velec,rinvsq20);
496 /* Update potential sum for this i atom from the interaction with this j atom. */
497 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
498 velecsum = _fjsp_add_v2r8(velecsum,velec);
502 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
504 /* Update vectorial force */
505 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
506 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
507 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
509 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
510 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
511 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
513 gmx_fjsp_decrement_1rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0);
515 /* Inner loop uses 131 flops */
518 /* End of innermost loop */
520 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
521 f+i_coord_offset,fshift+i_shift_offset);
524 /* Update potential energies */
525 gmx_fjsp_update_1pot_v2r8(velecsum,kernel_data->energygrp_elec+ggid);
526 gmx_fjsp_update_1pot_v2r8(vvdwsum,kernel_data->energygrp_vdw+ggid);
528 /* Increment number of inner iterations */
529 inneriter += j_index_end - j_index_start;
531 /* Outer loop uses 20 flops */
534 /* Increment number of outer iterations */
537 /* Update outer/inner flops */
539 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_VF,outeriter*20 + inneriter*131);
542 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_F_sparc64_hpc_ace_double
543 * Electrostatics interaction: Coulomb
544 * VdW interaction: CubicSplineTable
545 * Geometry: Water3-Particle
546 * Calculate force/pot: Force
549 nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_F_sparc64_hpc_ace_double
550 (t_nblist * gmx_restrict nlist,
551 rvec * gmx_restrict xx,
552 rvec * gmx_restrict ff,
553 struct t_forcerec * gmx_restrict fr,
554 t_mdatoms * gmx_restrict mdatoms,
555 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
556 t_nrnb * gmx_restrict nrnb)
558 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
559 * just 0 for non-waters.
560 * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
561 * jnr indices corresponding to data put in the four positions in the SIMD register.
563 int i_shift_offset,i_coord_offset,outeriter,inneriter;
564 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
566 int j_coord_offsetA,j_coord_offsetB;
567 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
569 real *shiftvec,*fshift,*x,*f;
570 _fjsp_v2r8 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
572 _fjsp_v2r8 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
574 _fjsp_v2r8 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
576 _fjsp_v2r8 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
577 int vdwjidx0A,vdwjidx0B;
578 _fjsp_v2r8 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
579 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
580 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
581 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
582 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
585 _fjsp_v2r8 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
588 _fjsp_v2r8 one_sixth = gmx_fjsp_set1_v2r8(1.0/6.0);
589 _fjsp_v2r8 one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
590 _fjsp_v2r8 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF,twovfeps;
593 _fjsp_v2r8 dummy_mask,cutoff_mask;
594 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
595 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
596 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
603 jindex = nlist->jindex;
605 shiftidx = nlist->shift;
607 shiftvec = fr->shift_vec[0];
608 fshift = fr->fshift[0];
609 facel = gmx_fjsp_set1_v2r8(fr->ic->epsfac);
610 charge = mdatoms->chargeA;
611 nvdwtype = fr->ntype;
613 vdwtype = mdatoms->typeA;
615 vftab = kernel_data->table_vdw->data;
616 vftabscale = gmx_fjsp_set1_v2r8(kernel_data->table_vdw->scale);
618 /* Setup water-specific parameters */
619 inr = nlist->iinr[0];
620 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
621 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
622 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
623 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
625 /* Avoid stupid compiler warnings */
633 /* Start outer loop over neighborlists */
634 for(iidx=0; iidx<nri; iidx++)
636 /* Load shift vector for this list */
637 i_shift_offset = DIM*shiftidx[iidx];
639 /* Load limits for loop over neighbors */
640 j_index_start = jindex[iidx];
641 j_index_end = jindex[iidx+1];
643 /* Get outer coordinate index */
645 i_coord_offset = DIM*inr;
647 /* Load i particle coords and add shift vector */
648 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
649 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
651 fix0 = _fjsp_setzero_v2r8();
652 fiy0 = _fjsp_setzero_v2r8();
653 fiz0 = _fjsp_setzero_v2r8();
654 fix1 = _fjsp_setzero_v2r8();
655 fiy1 = _fjsp_setzero_v2r8();
656 fiz1 = _fjsp_setzero_v2r8();
657 fix2 = _fjsp_setzero_v2r8();
658 fiy2 = _fjsp_setzero_v2r8();
659 fiz2 = _fjsp_setzero_v2r8();
661 /* Start inner kernel loop */
662 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
665 /* Get j neighbor index, and coordinate index */
668 j_coord_offsetA = DIM*jnrA;
669 j_coord_offsetB = DIM*jnrB;
671 /* load j atom coordinates */
672 gmx_fjsp_load_1rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
675 /* Calculate displacement vector */
676 dx00 = _fjsp_sub_v2r8(ix0,jx0);
677 dy00 = _fjsp_sub_v2r8(iy0,jy0);
678 dz00 = _fjsp_sub_v2r8(iz0,jz0);
679 dx10 = _fjsp_sub_v2r8(ix1,jx0);
680 dy10 = _fjsp_sub_v2r8(iy1,jy0);
681 dz10 = _fjsp_sub_v2r8(iz1,jz0);
682 dx20 = _fjsp_sub_v2r8(ix2,jx0);
683 dy20 = _fjsp_sub_v2r8(iy2,jy0);
684 dz20 = _fjsp_sub_v2r8(iz2,jz0);
686 /* Calculate squared distance and things based on it */
687 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
688 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
689 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
691 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
692 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
693 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
695 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
696 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
697 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
699 /* Load parameters for j particles */
700 jq0 = gmx_fjsp_load_2real_swizzle_v2r8(charge+jnrA+0,charge+jnrB+0);
701 vdwjidx0A = 2*vdwtype[jnrA+0];
702 vdwjidx0B = 2*vdwtype[jnrB+0];
704 fjx0 = _fjsp_setzero_v2r8();
705 fjy0 = _fjsp_setzero_v2r8();
706 fjz0 = _fjsp_setzero_v2r8();
708 /**************************
709 * CALCULATE INTERACTIONS *
710 **************************/
712 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
714 /* Compute parameters for interactions between i and j atoms */
715 qq00 = _fjsp_mul_v2r8(iq0,jq0);
716 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
717 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
719 /* Calculate table index by multiplying r with table scale and truncate to integer */
720 rt = _fjsp_mul_v2r8(r00,vftabscale);
721 itab_tmp = _fjsp_dtox_v2r8(rt);
722 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
723 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
724 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
729 /* COULOMB ELECTROSTATICS */
730 velec = _fjsp_mul_v2r8(qq00,rinv00);
731 felec = _fjsp_mul_v2r8(velec,rinvsq00);
733 /* CUBIC SPLINE TABLE DISPERSION */
734 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
735 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
736 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
737 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
738 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 2 );
739 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
740 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
741 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
742 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
744 /* CUBIC SPLINE TABLE REPULSION */
745 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
746 F = _fjsp_load_v2r8( vftab + vfconv.i[1] + 4 );
747 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
748 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
749 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 6 );
750 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
751 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
752 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
753 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
754 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
756 fscal = _fjsp_add_v2r8(felec,fvdw);
758 /* Update vectorial force */
759 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
760 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
761 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
763 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
764 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
765 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
767 /**************************
768 * CALCULATE INTERACTIONS *
769 **************************/
771 /* Compute parameters for interactions between i and j atoms */
772 qq10 = _fjsp_mul_v2r8(iq1,jq0);
774 /* COULOMB ELECTROSTATICS */
775 velec = _fjsp_mul_v2r8(qq10,rinv10);
776 felec = _fjsp_mul_v2r8(velec,rinvsq10);
780 /* Update vectorial force */
781 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
782 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
783 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
785 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
786 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
787 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
789 /**************************
790 * CALCULATE INTERACTIONS *
791 **************************/
793 /* Compute parameters for interactions between i and j atoms */
794 qq20 = _fjsp_mul_v2r8(iq2,jq0);
796 /* COULOMB ELECTROSTATICS */
797 velec = _fjsp_mul_v2r8(qq20,rinv20);
798 felec = _fjsp_mul_v2r8(velec,rinvsq20);
802 /* Update vectorial force */
803 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
804 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
805 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
807 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
808 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
809 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
811 gmx_fjsp_decrement_1rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0);
813 /* Inner loop uses 120 flops */
820 j_coord_offsetA = DIM*jnrA;
822 /* load j atom coordinates */
823 gmx_fjsp_load_1rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
826 /* Calculate displacement vector */
827 dx00 = _fjsp_sub_v2r8(ix0,jx0);
828 dy00 = _fjsp_sub_v2r8(iy0,jy0);
829 dz00 = _fjsp_sub_v2r8(iz0,jz0);
830 dx10 = _fjsp_sub_v2r8(ix1,jx0);
831 dy10 = _fjsp_sub_v2r8(iy1,jy0);
832 dz10 = _fjsp_sub_v2r8(iz1,jz0);
833 dx20 = _fjsp_sub_v2r8(ix2,jx0);
834 dy20 = _fjsp_sub_v2r8(iy2,jy0);
835 dz20 = _fjsp_sub_v2r8(iz2,jz0);
837 /* Calculate squared distance and things based on it */
838 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
839 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
840 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
842 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
843 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
844 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
846 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
847 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
848 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
850 /* Load parameters for j particles */
851 jq0 = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(),charge+jnrA+0);
852 vdwjidx0A = 2*vdwtype[jnrA+0];
854 fjx0 = _fjsp_setzero_v2r8();
855 fjy0 = _fjsp_setzero_v2r8();
856 fjz0 = _fjsp_setzero_v2r8();
858 /**************************
859 * CALCULATE INTERACTIONS *
860 **************************/
862 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
864 /* Compute parameters for interactions between i and j atoms */
865 qq00 = _fjsp_mul_v2r8(iq0,jq0);
866 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
867 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
869 /* Calculate table index by multiplying r with table scale and truncate to integer */
870 rt = _fjsp_mul_v2r8(r00,vftabscale);
871 itab_tmp = _fjsp_dtox_v2r8(rt);
872 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
873 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
874 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
879 /* COULOMB ELECTROSTATICS */
880 velec = _fjsp_mul_v2r8(qq00,rinv00);
881 felec = _fjsp_mul_v2r8(velec,rinvsq00);
883 /* CUBIC SPLINE TABLE DISPERSION */
884 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
885 F = _fjsp_setzero_v2r8();
886 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
887 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
888 H = _fjsp_setzero_v2r8();
889 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
890 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
891 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
892 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
894 /* CUBIC SPLINE TABLE REPULSION */
895 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
896 F = _fjsp_setzero_v2r8();
897 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
898 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
899 H = _fjsp_setzero_v2r8();
900 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
901 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
902 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
903 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
904 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
906 fscal = _fjsp_add_v2r8(felec,fvdw);
908 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
910 /* Update vectorial force */
911 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
912 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
913 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
915 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
916 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
917 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
919 /**************************
920 * CALCULATE INTERACTIONS *
921 **************************/
923 /* Compute parameters for interactions between i and j atoms */
924 qq10 = _fjsp_mul_v2r8(iq1,jq0);
926 /* COULOMB ELECTROSTATICS */
927 velec = _fjsp_mul_v2r8(qq10,rinv10);
928 felec = _fjsp_mul_v2r8(velec,rinvsq10);
932 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
934 /* Update vectorial force */
935 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
936 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
937 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
939 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
940 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
941 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
943 /**************************
944 * CALCULATE INTERACTIONS *
945 **************************/
947 /* Compute parameters for interactions between i and j atoms */
948 qq20 = _fjsp_mul_v2r8(iq2,jq0);
950 /* COULOMB ELECTROSTATICS */
951 velec = _fjsp_mul_v2r8(qq20,rinv20);
952 felec = _fjsp_mul_v2r8(velec,rinvsq20);
956 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
958 /* Update vectorial force */
959 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
960 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
961 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
963 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
964 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
965 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
967 gmx_fjsp_decrement_1rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0);
969 /* Inner loop uses 120 flops */
972 /* End of innermost loop */
974 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
975 f+i_coord_offset,fshift+i_shift_offset);
977 /* Increment number of inner iterations */
978 inneriter += j_index_end - j_index_start;
980 /* Outer loop uses 18 flops */
983 /* Increment number of outer iterations */
986 /* Update outer/inner flops */
988 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_F,outeriter*18 + inneriter*120);