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 sparc64_hpc_ace_double kernel generator.
44 #include "../nb_kernel.h"
45 #include "types/simple.h"
46 #include "gromacs/legacyheaders/vec.h"
49 #include "kernelutil_sparc64_hpc_ace_double.h"
52 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_VF_sparc64_hpc_ace_double
53 * Electrostatics interaction: Coulomb
54 * VdW interaction: CubicSplineTable
55 * Geometry: Water3-Particle
56 * Calculate force/pot: PotentialAndForce
59 nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_VF_sparc64_hpc_ace_double
60 (t_nblist * gmx_restrict nlist,
61 rvec * gmx_restrict xx,
62 rvec * gmx_restrict ff,
63 t_forcerec * gmx_restrict fr,
64 t_mdatoms * gmx_restrict mdatoms,
65 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
66 t_nrnb * gmx_restrict nrnb)
68 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
69 * just 0 for non-waters.
70 * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
71 * jnr indices corresponding to data put in the four positions in the SIMD register.
73 int i_shift_offset,i_coord_offset,outeriter,inneriter;
74 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
76 int j_coord_offsetA,j_coord_offsetB;
77 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
79 real *shiftvec,*fshift,*x,*f;
80 _fjsp_v2r8 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
82 _fjsp_v2r8 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
84 _fjsp_v2r8 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
86 _fjsp_v2r8 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
87 int vdwjidx0A,vdwjidx0B;
88 _fjsp_v2r8 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
89 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
90 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
91 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
92 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
95 _fjsp_v2r8 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
98 _fjsp_v2r8 one_sixth = gmx_fjsp_set1_v2r8(1.0/6.0);
99 _fjsp_v2r8 one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
100 _fjsp_v2r8 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF,twovfeps;
103 _fjsp_v2r8 dummy_mask,cutoff_mask;
104 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
105 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
106 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
113 jindex = nlist->jindex;
115 shiftidx = nlist->shift;
117 shiftvec = fr->shift_vec[0];
118 fshift = fr->fshift[0];
119 facel = gmx_fjsp_set1_v2r8(fr->epsfac);
120 charge = mdatoms->chargeA;
121 nvdwtype = fr->ntype;
123 vdwtype = mdatoms->typeA;
125 vftab = kernel_data->table_vdw->data;
126 vftabscale = gmx_fjsp_set1_v2r8(kernel_data->table_vdw->scale);
128 /* Setup water-specific parameters */
129 inr = nlist->iinr[0];
130 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
131 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
132 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
133 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
135 /* Avoid stupid compiler warnings */
143 /* Start outer loop over neighborlists */
144 for(iidx=0; iidx<nri; iidx++)
146 /* Load shift vector for this list */
147 i_shift_offset = DIM*shiftidx[iidx];
149 /* Load limits for loop over neighbors */
150 j_index_start = jindex[iidx];
151 j_index_end = jindex[iidx+1];
153 /* Get outer coordinate index */
155 i_coord_offset = DIM*inr;
157 /* Load i particle coords and add shift vector */
158 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
159 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
161 fix0 = _fjsp_setzero_v2r8();
162 fiy0 = _fjsp_setzero_v2r8();
163 fiz0 = _fjsp_setzero_v2r8();
164 fix1 = _fjsp_setzero_v2r8();
165 fiy1 = _fjsp_setzero_v2r8();
166 fiz1 = _fjsp_setzero_v2r8();
167 fix2 = _fjsp_setzero_v2r8();
168 fiy2 = _fjsp_setzero_v2r8();
169 fiz2 = _fjsp_setzero_v2r8();
171 /* Reset potential sums */
172 velecsum = _fjsp_setzero_v2r8();
173 vvdwsum = _fjsp_setzero_v2r8();
175 /* Start inner kernel loop */
176 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
179 /* Get j neighbor index, and coordinate index */
182 j_coord_offsetA = DIM*jnrA;
183 j_coord_offsetB = DIM*jnrB;
185 /* load j atom coordinates */
186 gmx_fjsp_load_1rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
189 /* Calculate displacement vector */
190 dx00 = _fjsp_sub_v2r8(ix0,jx0);
191 dy00 = _fjsp_sub_v2r8(iy0,jy0);
192 dz00 = _fjsp_sub_v2r8(iz0,jz0);
193 dx10 = _fjsp_sub_v2r8(ix1,jx0);
194 dy10 = _fjsp_sub_v2r8(iy1,jy0);
195 dz10 = _fjsp_sub_v2r8(iz1,jz0);
196 dx20 = _fjsp_sub_v2r8(ix2,jx0);
197 dy20 = _fjsp_sub_v2r8(iy2,jy0);
198 dz20 = _fjsp_sub_v2r8(iz2,jz0);
200 /* Calculate squared distance and things based on it */
201 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
202 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
203 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
205 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
206 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
207 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
209 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
210 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
211 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
213 /* Load parameters for j particles */
214 jq0 = gmx_fjsp_load_2real_swizzle_v2r8(charge+jnrA+0,charge+jnrB+0);
215 vdwjidx0A = 2*vdwtype[jnrA+0];
216 vdwjidx0B = 2*vdwtype[jnrB+0];
218 fjx0 = _fjsp_setzero_v2r8();
219 fjy0 = _fjsp_setzero_v2r8();
220 fjz0 = _fjsp_setzero_v2r8();
222 /**************************
223 * CALCULATE INTERACTIONS *
224 **************************/
226 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
228 /* Compute parameters for interactions between i and j atoms */
229 qq00 = _fjsp_mul_v2r8(iq0,jq0);
230 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
231 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
233 /* Calculate table index by multiplying r with table scale and truncate to integer */
234 rt = _fjsp_mul_v2r8(r00,vftabscale);
235 itab_tmp = _fjsp_dtox_v2r8(rt);
236 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
237 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
238 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
243 /* COULOMB ELECTROSTATICS */
244 velec = _fjsp_mul_v2r8(qq00,rinv00);
245 felec = _fjsp_mul_v2r8(velec,rinvsq00);
247 /* CUBIC SPLINE TABLE DISPERSION */
248 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
249 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
250 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
251 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
252 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 2 );
253 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
254 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
255 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
256 vvdw6 = _fjsp_mul_v2r8(c6_00,VV);
257 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
258 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
260 /* CUBIC SPLINE TABLE REPULSION */
261 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
262 F = _fjsp_load_v2r8( vftab + vfconv.i[1] + 4 );
263 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
264 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
265 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 6 );
266 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
267 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
268 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
269 vvdw12 = _fjsp_mul_v2r8(c12_00,VV);
270 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
271 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
272 vvdw = _fjsp_add_v2r8(vvdw12,vvdw6);
273 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
275 /* Update potential sum for this i atom from the interaction with this j atom. */
276 velecsum = _fjsp_add_v2r8(velecsum,velec);
277 vvdwsum = _fjsp_add_v2r8(vvdwsum,vvdw);
279 fscal = _fjsp_add_v2r8(felec,fvdw);
281 /* Update vectorial force */
282 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
283 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
284 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
286 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
287 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
288 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
290 /**************************
291 * CALCULATE INTERACTIONS *
292 **************************/
294 /* Compute parameters for interactions between i and j atoms */
295 qq10 = _fjsp_mul_v2r8(iq1,jq0);
297 /* COULOMB ELECTROSTATICS */
298 velec = _fjsp_mul_v2r8(qq10,rinv10);
299 felec = _fjsp_mul_v2r8(velec,rinvsq10);
301 /* Update potential sum for this i atom from the interaction with this j atom. */
302 velecsum = _fjsp_add_v2r8(velecsum,velec);
306 /* Update vectorial force */
307 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
308 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
309 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
311 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
312 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
313 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
315 /**************************
316 * CALCULATE INTERACTIONS *
317 **************************/
319 /* Compute parameters for interactions between i and j atoms */
320 qq20 = _fjsp_mul_v2r8(iq2,jq0);
322 /* COULOMB ELECTROSTATICS */
323 velec = _fjsp_mul_v2r8(qq20,rinv20);
324 felec = _fjsp_mul_v2r8(velec,rinvsq20);
326 /* Update potential sum for this i atom from the interaction with this j atom. */
327 velecsum = _fjsp_add_v2r8(velecsum,velec);
331 /* Update vectorial force */
332 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
333 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
334 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
336 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
337 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
338 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
340 gmx_fjsp_decrement_1rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0);
342 /* Inner loop uses 131 flops */
349 j_coord_offsetA = DIM*jnrA;
351 /* load j atom coordinates */
352 gmx_fjsp_load_1rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
355 /* Calculate displacement vector */
356 dx00 = _fjsp_sub_v2r8(ix0,jx0);
357 dy00 = _fjsp_sub_v2r8(iy0,jy0);
358 dz00 = _fjsp_sub_v2r8(iz0,jz0);
359 dx10 = _fjsp_sub_v2r8(ix1,jx0);
360 dy10 = _fjsp_sub_v2r8(iy1,jy0);
361 dz10 = _fjsp_sub_v2r8(iz1,jz0);
362 dx20 = _fjsp_sub_v2r8(ix2,jx0);
363 dy20 = _fjsp_sub_v2r8(iy2,jy0);
364 dz20 = _fjsp_sub_v2r8(iz2,jz0);
366 /* Calculate squared distance and things based on it */
367 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
368 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
369 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
371 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
372 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
373 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
375 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
376 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
377 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
379 /* Load parameters for j particles */
380 jq0 = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(),charge+jnrA+0);
381 vdwjidx0A = 2*vdwtype[jnrA+0];
383 fjx0 = _fjsp_setzero_v2r8();
384 fjy0 = _fjsp_setzero_v2r8();
385 fjz0 = _fjsp_setzero_v2r8();
387 /**************************
388 * CALCULATE INTERACTIONS *
389 **************************/
391 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
393 /* Compute parameters for interactions between i and j atoms */
394 qq00 = _fjsp_mul_v2r8(iq0,jq0);
395 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
396 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
398 /* Calculate table index by multiplying r with table scale and truncate to integer */
399 rt = _fjsp_mul_v2r8(r00,vftabscale);
400 itab_tmp = _fjsp_dtox_v2r8(rt);
401 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
402 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
403 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
408 /* COULOMB ELECTROSTATICS */
409 velec = _fjsp_mul_v2r8(qq00,rinv00);
410 felec = _fjsp_mul_v2r8(velec,rinvsq00);
412 /* CUBIC SPLINE TABLE DISPERSION */
413 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
414 F = _fjsp_setzero_v2r8();
415 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
416 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
417 H = _fjsp_setzero_v2r8();
418 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
419 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
420 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
421 vvdw6 = _fjsp_mul_v2r8(c6_00,VV);
422 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
423 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
425 /* CUBIC SPLINE TABLE REPULSION */
426 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
427 F = _fjsp_setzero_v2r8();
428 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
429 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
430 H = _fjsp_setzero_v2r8();
431 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
432 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
433 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
434 vvdw12 = _fjsp_mul_v2r8(c12_00,VV);
435 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
436 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
437 vvdw = _fjsp_add_v2r8(vvdw12,vvdw6);
438 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
440 /* Update potential sum for this i atom from the interaction with this j atom. */
441 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
442 velecsum = _fjsp_add_v2r8(velecsum,velec);
443 vvdw = _fjsp_unpacklo_v2r8(vvdw,_fjsp_setzero_v2r8());
444 vvdwsum = _fjsp_add_v2r8(vvdwsum,vvdw);
446 fscal = _fjsp_add_v2r8(felec,fvdw);
448 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
450 /* Update vectorial force */
451 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
452 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
453 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
455 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
456 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
457 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
459 /**************************
460 * CALCULATE INTERACTIONS *
461 **************************/
463 /* Compute parameters for interactions between i and j atoms */
464 qq10 = _fjsp_mul_v2r8(iq1,jq0);
466 /* COULOMB ELECTROSTATICS */
467 velec = _fjsp_mul_v2r8(qq10,rinv10);
468 felec = _fjsp_mul_v2r8(velec,rinvsq10);
470 /* Update potential sum for this i atom from the interaction with this j atom. */
471 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
472 velecsum = _fjsp_add_v2r8(velecsum,velec);
476 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
478 /* Update vectorial force */
479 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
480 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
481 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
483 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
484 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
485 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
487 /**************************
488 * CALCULATE INTERACTIONS *
489 **************************/
491 /* Compute parameters for interactions between i and j atoms */
492 qq20 = _fjsp_mul_v2r8(iq2,jq0);
494 /* COULOMB ELECTROSTATICS */
495 velec = _fjsp_mul_v2r8(qq20,rinv20);
496 felec = _fjsp_mul_v2r8(velec,rinvsq20);
498 /* Update potential sum for this i atom from the interaction with this j atom. */
499 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
500 velecsum = _fjsp_add_v2r8(velecsum,velec);
504 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
506 /* Update vectorial force */
507 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
508 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
509 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
511 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
512 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
513 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
515 gmx_fjsp_decrement_1rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0);
517 /* Inner loop uses 131 flops */
520 /* End of innermost loop */
522 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
523 f+i_coord_offset,fshift+i_shift_offset);
526 /* Update potential energies */
527 gmx_fjsp_update_1pot_v2r8(velecsum,kernel_data->energygrp_elec+ggid);
528 gmx_fjsp_update_1pot_v2r8(vvdwsum,kernel_data->energygrp_vdw+ggid);
530 /* Increment number of inner iterations */
531 inneriter += j_index_end - j_index_start;
533 /* Outer loop uses 20 flops */
536 /* Increment number of outer iterations */
539 /* Update outer/inner flops */
541 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_VF,outeriter*20 + inneriter*131);
544 * Gromacs nonbonded kernel: nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_F_sparc64_hpc_ace_double
545 * Electrostatics interaction: Coulomb
546 * VdW interaction: CubicSplineTable
547 * Geometry: Water3-Particle
548 * Calculate force/pot: Force
551 nb_kernel_ElecCoul_VdwCSTab_GeomW3P1_F_sparc64_hpc_ace_double
552 (t_nblist * gmx_restrict nlist,
553 rvec * gmx_restrict xx,
554 rvec * gmx_restrict ff,
555 t_forcerec * gmx_restrict fr,
556 t_mdatoms * gmx_restrict mdatoms,
557 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
558 t_nrnb * gmx_restrict nrnb)
560 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
561 * just 0 for non-waters.
562 * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
563 * jnr indices corresponding to data put in the four positions in the SIMD register.
565 int i_shift_offset,i_coord_offset,outeriter,inneriter;
566 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
568 int j_coord_offsetA,j_coord_offsetB;
569 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
571 real *shiftvec,*fshift,*x,*f;
572 _fjsp_v2r8 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
574 _fjsp_v2r8 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
576 _fjsp_v2r8 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
578 _fjsp_v2r8 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
579 int vdwjidx0A,vdwjidx0B;
580 _fjsp_v2r8 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
581 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
582 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
583 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
584 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
587 _fjsp_v2r8 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
590 _fjsp_v2r8 one_sixth = gmx_fjsp_set1_v2r8(1.0/6.0);
591 _fjsp_v2r8 one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
592 _fjsp_v2r8 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF,twovfeps;
595 _fjsp_v2r8 dummy_mask,cutoff_mask;
596 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
597 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
598 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
605 jindex = nlist->jindex;
607 shiftidx = nlist->shift;
609 shiftvec = fr->shift_vec[0];
610 fshift = fr->fshift[0];
611 facel = gmx_fjsp_set1_v2r8(fr->epsfac);
612 charge = mdatoms->chargeA;
613 nvdwtype = fr->ntype;
615 vdwtype = mdatoms->typeA;
617 vftab = kernel_data->table_vdw->data;
618 vftabscale = gmx_fjsp_set1_v2r8(kernel_data->table_vdw->scale);
620 /* Setup water-specific parameters */
621 inr = nlist->iinr[0];
622 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
623 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
624 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
625 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
627 /* Avoid stupid compiler warnings */
635 /* Start outer loop over neighborlists */
636 for(iidx=0; iidx<nri; iidx++)
638 /* Load shift vector for this list */
639 i_shift_offset = DIM*shiftidx[iidx];
641 /* Load limits for loop over neighbors */
642 j_index_start = jindex[iidx];
643 j_index_end = jindex[iidx+1];
645 /* Get outer coordinate index */
647 i_coord_offset = DIM*inr;
649 /* Load i particle coords and add shift vector */
650 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
651 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
653 fix0 = _fjsp_setzero_v2r8();
654 fiy0 = _fjsp_setzero_v2r8();
655 fiz0 = _fjsp_setzero_v2r8();
656 fix1 = _fjsp_setzero_v2r8();
657 fiy1 = _fjsp_setzero_v2r8();
658 fiz1 = _fjsp_setzero_v2r8();
659 fix2 = _fjsp_setzero_v2r8();
660 fiy2 = _fjsp_setzero_v2r8();
661 fiz2 = _fjsp_setzero_v2r8();
663 /* Start inner kernel loop */
664 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
667 /* Get j neighbor index, and coordinate index */
670 j_coord_offsetA = DIM*jnrA;
671 j_coord_offsetB = DIM*jnrB;
673 /* load j atom coordinates */
674 gmx_fjsp_load_1rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
677 /* Calculate displacement vector */
678 dx00 = _fjsp_sub_v2r8(ix0,jx0);
679 dy00 = _fjsp_sub_v2r8(iy0,jy0);
680 dz00 = _fjsp_sub_v2r8(iz0,jz0);
681 dx10 = _fjsp_sub_v2r8(ix1,jx0);
682 dy10 = _fjsp_sub_v2r8(iy1,jy0);
683 dz10 = _fjsp_sub_v2r8(iz1,jz0);
684 dx20 = _fjsp_sub_v2r8(ix2,jx0);
685 dy20 = _fjsp_sub_v2r8(iy2,jy0);
686 dz20 = _fjsp_sub_v2r8(iz2,jz0);
688 /* Calculate squared distance and things based on it */
689 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
690 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
691 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
693 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
694 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
695 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
697 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
698 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
699 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
701 /* Load parameters for j particles */
702 jq0 = gmx_fjsp_load_2real_swizzle_v2r8(charge+jnrA+0,charge+jnrB+0);
703 vdwjidx0A = 2*vdwtype[jnrA+0];
704 vdwjidx0B = 2*vdwtype[jnrB+0];
706 fjx0 = _fjsp_setzero_v2r8();
707 fjy0 = _fjsp_setzero_v2r8();
708 fjz0 = _fjsp_setzero_v2r8();
710 /**************************
711 * CALCULATE INTERACTIONS *
712 **************************/
714 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
716 /* Compute parameters for interactions between i and j atoms */
717 qq00 = _fjsp_mul_v2r8(iq0,jq0);
718 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
719 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
721 /* Calculate table index by multiplying r with table scale and truncate to integer */
722 rt = _fjsp_mul_v2r8(r00,vftabscale);
723 itab_tmp = _fjsp_dtox_v2r8(rt);
724 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
725 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
726 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
731 /* COULOMB ELECTROSTATICS */
732 velec = _fjsp_mul_v2r8(qq00,rinv00);
733 felec = _fjsp_mul_v2r8(velec,rinvsq00);
735 /* CUBIC SPLINE TABLE DISPERSION */
736 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
737 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
738 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
739 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
740 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 2 );
741 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
742 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
743 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
744 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
746 /* CUBIC SPLINE TABLE REPULSION */
747 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
748 F = _fjsp_load_v2r8( vftab + vfconv.i[1] + 4 );
749 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
750 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
751 H = _fjsp_load_v2r8( vftab + vfconv.i[1] + 6 );
752 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
753 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
754 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
755 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
756 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
758 fscal = _fjsp_add_v2r8(felec,fvdw);
760 /* Update vectorial force */
761 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
762 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
763 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
765 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
766 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
767 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
769 /**************************
770 * CALCULATE INTERACTIONS *
771 **************************/
773 /* Compute parameters for interactions between i and j atoms */
774 qq10 = _fjsp_mul_v2r8(iq1,jq0);
776 /* COULOMB ELECTROSTATICS */
777 velec = _fjsp_mul_v2r8(qq10,rinv10);
778 felec = _fjsp_mul_v2r8(velec,rinvsq10);
782 /* Update vectorial force */
783 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
784 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
785 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
787 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
788 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
789 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
791 /**************************
792 * CALCULATE INTERACTIONS *
793 **************************/
795 /* Compute parameters for interactions between i and j atoms */
796 qq20 = _fjsp_mul_v2r8(iq2,jq0);
798 /* COULOMB ELECTROSTATICS */
799 velec = _fjsp_mul_v2r8(qq20,rinv20);
800 felec = _fjsp_mul_v2r8(velec,rinvsq20);
804 /* Update vectorial force */
805 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
806 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
807 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
809 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
810 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
811 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
813 gmx_fjsp_decrement_1rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0);
815 /* Inner loop uses 120 flops */
822 j_coord_offsetA = DIM*jnrA;
824 /* load j atom coordinates */
825 gmx_fjsp_load_1rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
828 /* Calculate displacement vector */
829 dx00 = _fjsp_sub_v2r8(ix0,jx0);
830 dy00 = _fjsp_sub_v2r8(iy0,jy0);
831 dz00 = _fjsp_sub_v2r8(iz0,jz0);
832 dx10 = _fjsp_sub_v2r8(ix1,jx0);
833 dy10 = _fjsp_sub_v2r8(iy1,jy0);
834 dz10 = _fjsp_sub_v2r8(iz1,jz0);
835 dx20 = _fjsp_sub_v2r8(ix2,jx0);
836 dy20 = _fjsp_sub_v2r8(iy2,jy0);
837 dz20 = _fjsp_sub_v2r8(iz2,jz0);
839 /* Calculate squared distance and things based on it */
840 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
841 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
842 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
844 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
845 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
846 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
848 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
849 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
850 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
852 /* Load parameters for j particles */
853 jq0 = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(),charge+jnrA+0);
854 vdwjidx0A = 2*vdwtype[jnrA+0];
856 fjx0 = _fjsp_setzero_v2r8();
857 fjy0 = _fjsp_setzero_v2r8();
858 fjz0 = _fjsp_setzero_v2r8();
860 /**************************
861 * CALCULATE INTERACTIONS *
862 **************************/
864 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
866 /* Compute parameters for interactions between i and j atoms */
867 qq00 = _fjsp_mul_v2r8(iq0,jq0);
868 gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
869 vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
871 /* Calculate table index by multiplying r with table scale and truncate to integer */
872 rt = _fjsp_mul_v2r8(r00,vftabscale);
873 itab_tmp = _fjsp_dtox_v2r8(rt);
874 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
875 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
876 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
881 /* COULOMB ELECTROSTATICS */
882 velec = _fjsp_mul_v2r8(qq00,rinv00);
883 felec = _fjsp_mul_v2r8(velec,rinvsq00);
885 /* CUBIC SPLINE TABLE DISPERSION */
886 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
887 F = _fjsp_setzero_v2r8();
888 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
889 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 2 );
890 H = _fjsp_setzero_v2r8();
891 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
892 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
893 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
894 fvdw6 = _fjsp_mul_v2r8(c6_00,FF);
896 /* CUBIC SPLINE TABLE REPULSION */
897 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] + 4 );
898 F = _fjsp_setzero_v2r8();
899 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
900 G = _fjsp_load_v2r8( vftab + vfconv.i[0] + 6 );
901 H = _fjsp_setzero_v2r8();
902 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
903 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(H,vfeps,G),F);
904 FF = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(twovfeps,H,G),Fp);
905 fvdw12 = _fjsp_mul_v2r8(c12_00,FF);
906 fvdw = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_add_v2r8(fvdw6,fvdw12),_fjsp_mul_v2r8(vftabscale,rinv00)));
908 fscal = _fjsp_add_v2r8(felec,fvdw);
910 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
912 /* Update vectorial force */
913 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
914 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
915 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
917 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
918 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
919 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
921 /**************************
922 * CALCULATE INTERACTIONS *
923 **************************/
925 /* Compute parameters for interactions between i and j atoms */
926 qq10 = _fjsp_mul_v2r8(iq1,jq0);
928 /* COULOMB ELECTROSTATICS */
929 velec = _fjsp_mul_v2r8(qq10,rinv10);
930 felec = _fjsp_mul_v2r8(velec,rinvsq10);
934 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
936 /* Update vectorial force */
937 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
938 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
939 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
941 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
942 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
943 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
945 /**************************
946 * CALCULATE INTERACTIONS *
947 **************************/
949 /* Compute parameters for interactions between i and j atoms */
950 qq20 = _fjsp_mul_v2r8(iq2,jq0);
952 /* COULOMB ELECTROSTATICS */
953 velec = _fjsp_mul_v2r8(qq20,rinv20);
954 felec = _fjsp_mul_v2r8(velec,rinvsq20);
958 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
960 /* Update vectorial force */
961 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
962 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
963 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
965 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
966 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
967 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
969 gmx_fjsp_decrement_1rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0);
971 /* Inner loop uses 120 flops */
974 /* End of innermost loop */
976 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
977 f+i_coord_offset,fshift+i_shift_offset);
979 /* Increment number of inner iterations */
980 inneriter += j_index_end - j_index_start;
982 /* Outer loop uses 18 flops */
985 /* Increment number of outer iterations */
988 /* Update outer/inner flops */
990 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_F,outeriter*18 + inneriter*120);