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.
42 #include "../nb_kernel.h"
43 #include "types/simple.h"
44 #include "gromacs/math/vec.h"
47 #include "kernelutil_sparc64_hpc_ace_double.h"
50 * Gromacs nonbonded kernel: nb_kernel_ElecEw_VdwLJ_GeomW3W3_VF_sparc64_hpc_ace_double
51 * Electrostatics interaction: Ewald
52 * VdW interaction: LennardJones
53 * Geometry: Water3-Water3
54 * Calculate force/pot: PotentialAndForce
57 nb_kernel_ElecEw_VdwLJ_GeomW3W3_VF_sparc64_hpc_ace_double
58 (t_nblist * gmx_restrict nlist,
59 rvec * gmx_restrict xx,
60 rvec * gmx_restrict ff,
61 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 int vdwjidx1A,vdwjidx1B;
88 _fjsp_v2r8 jx1,jy1,jz1,fjx1,fjy1,fjz1,jq1,isaj1;
89 int vdwjidx2A,vdwjidx2B;
90 _fjsp_v2r8 jx2,jy2,jz2,fjx2,fjy2,fjz2,jq2,isaj2;
91 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
92 _fjsp_v2r8 dx01,dy01,dz01,rsq01,rinv01,rinvsq01,r01,qq01,c6_01,c12_01;
93 _fjsp_v2r8 dx02,dy02,dz02,rsq02,rinv02,rinvsq02,r02,qq02,c6_02,c12_02;
94 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
95 _fjsp_v2r8 dx11,dy11,dz11,rsq11,rinv11,rinvsq11,r11,qq11,c6_11,c12_11;
96 _fjsp_v2r8 dx12,dy12,dz12,rsq12,rinv12,rinvsq12,r12,qq12,c6_12,c12_12;
97 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
98 _fjsp_v2r8 dx21,dy21,dz21,rsq21,rinv21,rinvsq21,r21,qq21,c6_21,c12_21;
99 _fjsp_v2r8 dx22,dy22,dz22,rsq22,rinv22,rinvsq22,r22,qq22,c6_22,c12_22;
100 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
103 _fjsp_v2r8 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
106 _fjsp_v2r8 one_sixth = gmx_fjsp_set1_v2r8(1.0/6.0);
107 _fjsp_v2r8 one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
108 _fjsp_v2r8 ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace,ewtabF,ewtabFn,ewtabD,ewtabV;
111 _fjsp_v2r8 dummy_mask,cutoff_mask;
112 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
113 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
114 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
121 jindex = nlist->jindex;
123 shiftidx = nlist->shift;
125 shiftvec = fr->shift_vec[0];
126 fshift = fr->fshift[0];
127 facel = gmx_fjsp_set1_v2r8(fr->epsfac);
128 charge = mdatoms->chargeA;
129 nvdwtype = fr->ntype;
131 vdwtype = mdatoms->typeA;
133 sh_ewald = gmx_fjsp_set1_v2r8(fr->ic->sh_ewald);
134 ewtab = fr->ic->tabq_coul_FDV0;
135 ewtabscale = gmx_fjsp_set1_v2r8(fr->ic->tabq_scale);
136 ewtabhalfspace = gmx_fjsp_set1_v2r8(0.5/fr->ic->tabq_scale);
138 /* Setup water-specific parameters */
139 inr = nlist->iinr[0];
140 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
141 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
142 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
143 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
145 jq0 = gmx_fjsp_set1_v2r8(charge[inr+0]);
146 jq1 = gmx_fjsp_set1_v2r8(charge[inr+1]);
147 jq2 = gmx_fjsp_set1_v2r8(charge[inr+2]);
148 vdwjidx0A = 2*vdwtype[inr+0];
149 qq00 = _fjsp_mul_v2r8(iq0,jq0);
150 c6_00 = gmx_fjsp_set1_v2r8(vdwparam[vdwioffset0+vdwjidx0A]);
151 c12_00 = gmx_fjsp_set1_v2r8(vdwparam[vdwioffset0+vdwjidx0A+1]);
152 qq01 = _fjsp_mul_v2r8(iq0,jq1);
153 qq02 = _fjsp_mul_v2r8(iq0,jq2);
154 qq10 = _fjsp_mul_v2r8(iq1,jq0);
155 qq11 = _fjsp_mul_v2r8(iq1,jq1);
156 qq12 = _fjsp_mul_v2r8(iq1,jq2);
157 qq20 = _fjsp_mul_v2r8(iq2,jq0);
158 qq21 = _fjsp_mul_v2r8(iq2,jq1);
159 qq22 = _fjsp_mul_v2r8(iq2,jq2);
161 /* Avoid stupid compiler warnings */
169 /* Start outer loop over neighborlists */
170 for(iidx=0; iidx<nri; iidx++)
172 /* Load shift vector for this list */
173 i_shift_offset = DIM*shiftidx[iidx];
175 /* Load limits for loop over neighbors */
176 j_index_start = jindex[iidx];
177 j_index_end = jindex[iidx+1];
179 /* Get outer coordinate index */
181 i_coord_offset = DIM*inr;
183 /* Load i particle coords and add shift vector */
184 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
185 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
187 fix0 = _fjsp_setzero_v2r8();
188 fiy0 = _fjsp_setzero_v2r8();
189 fiz0 = _fjsp_setzero_v2r8();
190 fix1 = _fjsp_setzero_v2r8();
191 fiy1 = _fjsp_setzero_v2r8();
192 fiz1 = _fjsp_setzero_v2r8();
193 fix2 = _fjsp_setzero_v2r8();
194 fiy2 = _fjsp_setzero_v2r8();
195 fiz2 = _fjsp_setzero_v2r8();
197 /* Reset potential sums */
198 velecsum = _fjsp_setzero_v2r8();
199 vvdwsum = _fjsp_setzero_v2r8();
201 /* Start inner kernel loop */
202 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
205 /* Get j neighbor index, and coordinate index */
208 j_coord_offsetA = DIM*jnrA;
209 j_coord_offsetB = DIM*jnrB;
211 /* load j atom coordinates */
212 gmx_fjsp_load_3rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
213 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
215 /* Calculate displacement vector */
216 dx00 = _fjsp_sub_v2r8(ix0,jx0);
217 dy00 = _fjsp_sub_v2r8(iy0,jy0);
218 dz00 = _fjsp_sub_v2r8(iz0,jz0);
219 dx01 = _fjsp_sub_v2r8(ix0,jx1);
220 dy01 = _fjsp_sub_v2r8(iy0,jy1);
221 dz01 = _fjsp_sub_v2r8(iz0,jz1);
222 dx02 = _fjsp_sub_v2r8(ix0,jx2);
223 dy02 = _fjsp_sub_v2r8(iy0,jy2);
224 dz02 = _fjsp_sub_v2r8(iz0,jz2);
225 dx10 = _fjsp_sub_v2r8(ix1,jx0);
226 dy10 = _fjsp_sub_v2r8(iy1,jy0);
227 dz10 = _fjsp_sub_v2r8(iz1,jz0);
228 dx11 = _fjsp_sub_v2r8(ix1,jx1);
229 dy11 = _fjsp_sub_v2r8(iy1,jy1);
230 dz11 = _fjsp_sub_v2r8(iz1,jz1);
231 dx12 = _fjsp_sub_v2r8(ix1,jx2);
232 dy12 = _fjsp_sub_v2r8(iy1,jy2);
233 dz12 = _fjsp_sub_v2r8(iz1,jz2);
234 dx20 = _fjsp_sub_v2r8(ix2,jx0);
235 dy20 = _fjsp_sub_v2r8(iy2,jy0);
236 dz20 = _fjsp_sub_v2r8(iz2,jz0);
237 dx21 = _fjsp_sub_v2r8(ix2,jx1);
238 dy21 = _fjsp_sub_v2r8(iy2,jy1);
239 dz21 = _fjsp_sub_v2r8(iz2,jz1);
240 dx22 = _fjsp_sub_v2r8(ix2,jx2);
241 dy22 = _fjsp_sub_v2r8(iy2,jy2);
242 dz22 = _fjsp_sub_v2r8(iz2,jz2);
244 /* Calculate squared distance and things based on it */
245 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
246 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
247 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
248 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
249 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
250 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
251 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
252 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
253 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
255 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
256 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
257 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
258 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
259 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
260 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
261 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
262 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
263 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
265 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
266 rinvsq01 = _fjsp_mul_v2r8(rinv01,rinv01);
267 rinvsq02 = _fjsp_mul_v2r8(rinv02,rinv02);
268 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
269 rinvsq11 = _fjsp_mul_v2r8(rinv11,rinv11);
270 rinvsq12 = _fjsp_mul_v2r8(rinv12,rinv12);
271 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
272 rinvsq21 = _fjsp_mul_v2r8(rinv21,rinv21);
273 rinvsq22 = _fjsp_mul_v2r8(rinv22,rinv22);
275 fjx0 = _fjsp_setzero_v2r8();
276 fjy0 = _fjsp_setzero_v2r8();
277 fjz0 = _fjsp_setzero_v2r8();
278 fjx1 = _fjsp_setzero_v2r8();
279 fjy1 = _fjsp_setzero_v2r8();
280 fjz1 = _fjsp_setzero_v2r8();
281 fjx2 = _fjsp_setzero_v2r8();
282 fjy2 = _fjsp_setzero_v2r8();
283 fjz2 = _fjsp_setzero_v2r8();
285 /**************************
286 * CALCULATE INTERACTIONS *
287 **************************/
289 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
291 /* EWALD ELECTROSTATICS */
293 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
294 ewrt = _fjsp_mul_v2r8(r00,ewtabscale);
295 itab_tmp = _fjsp_dtox_v2r8(ewrt);
296 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
297 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
299 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
300 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
301 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
302 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
303 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
304 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
305 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
306 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
307 velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(rinv00,velec));
308 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,rinv00),_fjsp_sub_v2r8(rinvsq00,felec));
310 /* LENNARD-JONES DISPERSION/REPULSION */
312 rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
313 vvdw6 = _fjsp_mul_v2r8(c6_00,rinvsix);
314 vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
315 vvdw = _fjsp_msub_v2r8( vvdw12,one_twelfth, _fjsp_mul_v2r8(vvdw6,one_sixth) );
316 fvdw = _fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw12,vvdw6),rinvsq00);
318 /* Update potential sum for this i atom from the interaction with this j atom. */
319 velecsum = _fjsp_add_v2r8(velecsum,velec);
320 vvdwsum = _fjsp_add_v2r8(vvdwsum,vvdw);
322 fscal = _fjsp_add_v2r8(felec,fvdw);
324 /* Update vectorial force */
325 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
326 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
327 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
329 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
330 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
331 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
333 /**************************
334 * CALCULATE INTERACTIONS *
335 **************************/
337 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
339 /* EWALD ELECTROSTATICS */
341 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
342 ewrt = _fjsp_mul_v2r8(r01,ewtabscale);
343 itab_tmp = _fjsp_dtox_v2r8(ewrt);
344 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
345 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
347 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
348 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
349 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
350 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
351 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
352 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
353 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
354 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
355 velec = _fjsp_mul_v2r8(qq01,_fjsp_sub_v2r8(rinv01,velec));
356 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,rinv01),_fjsp_sub_v2r8(rinvsq01,felec));
358 /* Update potential sum for this i atom from the interaction with this j atom. */
359 velecsum = _fjsp_add_v2r8(velecsum,velec);
363 /* Update vectorial force */
364 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
365 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
366 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
368 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
369 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
370 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
372 /**************************
373 * CALCULATE INTERACTIONS *
374 **************************/
376 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
378 /* EWALD ELECTROSTATICS */
380 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
381 ewrt = _fjsp_mul_v2r8(r02,ewtabscale);
382 itab_tmp = _fjsp_dtox_v2r8(ewrt);
383 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
384 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
386 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
387 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
388 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
389 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
390 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
391 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
392 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
393 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
394 velec = _fjsp_mul_v2r8(qq02,_fjsp_sub_v2r8(rinv02,velec));
395 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,rinv02),_fjsp_sub_v2r8(rinvsq02,felec));
397 /* Update potential sum for this i atom from the interaction with this j atom. */
398 velecsum = _fjsp_add_v2r8(velecsum,velec);
402 /* Update vectorial force */
403 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
404 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
405 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
407 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
408 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
409 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
411 /**************************
412 * CALCULATE INTERACTIONS *
413 **************************/
415 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
417 /* EWALD ELECTROSTATICS */
419 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
420 ewrt = _fjsp_mul_v2r8(r10,ewtabscale);
421 itab_tmp = _fjsp_dtox_v2r8(ewrt);
422 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
423 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
425 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
426 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
427 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
428 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
429 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
430 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
431 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
432 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
433 velec = _fjsp_mul_v2r8(qq10,_fjsp_sub_v2r8(rinv10,velec));
434 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,rinv10),_fjsp_sub_v2r8(rinvsq10,felec));
436 /* Update potential sum for this i atom from the interaction with this j atom. */
437 velecsum = _fjsp_add_v2r8(velecsum,velec);
441 /* Update vectorial force */
442 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
443 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
444 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
446 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
447 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
448 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
450 /**************************
451 * CALCULATE INTERACTIONS *
452 **************************/
454 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
456 /* EWALD ELECTROSTATICS */
458 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
459 ewrt = _fjsp_mul_v2r8(r11,ewtabscale);
460 itab_tmp = _fjsp_dtox_v2r8(ewrt);
461 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
462 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
464 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
465 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
466 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
467 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
468 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
469 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
470 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
471 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
472 velec = _fjsp_mul_v2r8(qq11,_fjsp_sub_v2r8(rinv11,velec));
473 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,rinv11),_fjsp_sub_v2r8(rinvsq11,felec));
475 /* Update potential sum for this i atom from the interaction with this j atom. */
476 velecsum = _fjsp_add_v2r8(velecsum,velec);
480 /* Update vectorial force */
481 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
482 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
483 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
485 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
486 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
487 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
489 /**************************
490 * CALCULATE INTERACTIONS *
491 **************************/
493 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
495 /* EWALD ELECTROSTATICS */
497 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
498 ewrt = _fjsp_mul_v2r8(r12,ewtabscale);
499 itab_tmp = _fjsp_dtox_v2r8(ewrt);
500 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
501 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
503 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
504 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
505 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
506 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
507 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
508 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
509 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
510 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
511 velec = _fjsp_mul_v2r8(qq12,_fjsp_sub_v2r8(rinv12,velec));
512 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,rinv12),_fjsp_sub_v2r8(rinvsq12,felec));
514 /* Update potential sum for this i atom from the interaction with this j atom. */
515 velecsum = _fjsp_add_v2r8(velecsum,velec);
519 /* Update vectorial force */
520 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
521 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
522 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
524 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
525 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
526 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
528 /**************************
529 * CALCULATE INTERACTIONS *
530 **************************/
532 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
534 /* EWALD ELECTROSTATICS */
536 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
537 ewrt = _fjsp_mul_v2r8(r20,ewtabscale);
538 itab_tmp = _fjsp_dtox_v2r8(ewrt);
539 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
540 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
542 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
543 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
544 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
545 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
546 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
547 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
548 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
549 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
550 velec = _fjsp_mul_v2r8(qq20,_fjsp_sub_v2r8(rinv20,velec));
551 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,rinv20),_fjsp_sub_v2r8(rinvsq20,felec));
553 /* Update potential sum for this i atom from the interaction with this j atom. */
554 velecsum = _fjsp_add_v2r8(velecsum,velec);
558 /* Update vectorial force */
559 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
560 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
561 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
563 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
564 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
565 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
567 /**************************
568 * CALCULATE INTERACTIONS *
569 **************************/
571 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
573 /* EWALD ELECTROSTATICS */
575 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
576 ewrt = _fjsp_mul_v2r8(r21,ewtabscale);
577 itab_tmp = _fjsp_dtox_v2r8(ewrt);
578 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
579 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
581 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
582 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
583 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
584 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
585 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
586 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
587 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
588 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
589 velec = _fjsp_mul_v2r8(qq21,_fjsp_sub_v2r8(rinv21,velec));
590 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,rinv21),_fjsp_sub_v2r8(rinvsq21,felec));
592 /* Update potential sum for this i atom from the interaction with this j atom. */
593 velecsum = _fjsp_add_v2r8(velecsum,velec);
597 /* Update vectorial force */
598 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
599 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
600 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
602 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
603 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
604 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
606 /**************************
607 * CALCULATE INTERACTIONS *
608 **************************/
610 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
612 /* EWALD ELECTROSTATICS */
614 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
615 ewrt = _fjsp_mul_v2r8(r22,ewtabscale);
616 itab_tmp = _fjsp_dtox_v2r8(ewrt);
617 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
618 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
620 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
621 ewtabD = _fjsp_load_v2r8( ewtab + 4*ewconv.i[1] );
622 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
623 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
624 ewtabFn = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[1] +2);
625 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
626 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
627 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
628 velec = _fjsp_mul_v2r8(qq22,_fjsp_sub_v2r8(rinv22,velec));
629 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,rinv22),_fjsp_sub_v2r8(rinvsq22,felec));
631 /* Update potential sum for this i atom from the interaction with this j atom. */
632 velecsum = _fjsp_add_v2r8(velecsum,velec);
636 /* Update vectorial force */
637 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
638 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
639 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
641 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
642 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
643 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
645 gmx_fjsp_decrement_3rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
647 /* Inner loop uses 408 flops */
654 j_coord_offsetA = DIM*jnrA;
656 /* load j atom coordinates */
657 gmx_fjsp_load_3rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
658 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
660 /* Calculate displacement vector */
661 dx00 = _fjsp_sub_v2r8(ix0,jx0);
662 dy00 = _fjsp_sub_v2r8(iy0,jy0);
663 dz00 = _fjsp_sub_v2r8(iz0,jz0);
664 dx01 = _fjsp_sub_v2r8(ix0,jx1);
665 dy01 = _fjsp_sub_v2r8(iy0,jy1);
666 dz01 = _fjsp_sub_v2r8(iz0,jz1);
667 dx02 = _fjsp_sub_v2r8(ix0,jx2);
668 dy02 = _fjsp_sub_v2r8(iy0,jy2);
669 dz02 = _fjsp_sub_v2r8(iz0,jz2);
670 dx10 = _fjsp_sub_v2r8(ix1,jx0);
671 dy10 = _fjsp_sub_v2r8(iy1,jy0);
672 dz10 = _fjsp_sub_v2r8(iz1,jz0);
673 dx11 = _fjsp_sub_v2r8(ix1,jx1);
674 dy11 = _fjsp_sub_v2r8(iy1,jy1);
675 dz11 = _fjsp_sub_v2r8(iz1,jz1);
676 dx12 = _fjsp_sub_v2r8(ix1,jx2);
677 dy12 = _fjsp_sub_v2r8(iy1,jy2);
678 dz12 = _fjsp_sub_v2r8(iz1,jz2);
679 dx20 = _fjsp_sub_v2r8(ix2,jx0);
680 dy20 = _fjsp_sub_v2r8(iy2,jy0);
681 dz20 = _fjsp_sub_v2r8(iz2,jz0);
682 dx21 = _fjsp_sub_v2r8(ix2,jx1);
683 dy21 = _fjsp_sub_v2r8(iy2,jy1);
684 dz21 = _fjsp_sub_v2r8(iz2,jz1);
685 dx22 = _fjsp_sub_v2r8(ix2,jx2);
686 dy22 = _fjsp_sub_v2r8(iy2,jy2);
687 dz22 = _fjsp_sub_v2r8(iz2,jz2);
689 /* Calculate squared distance and things based on it */
690 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
691 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
692 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
693 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
694 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
695 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
696 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
697 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
698 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
700 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
701 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
702 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
703 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
704 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
705 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
706 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
707 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
708 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
710 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
711 rinvsq01 = _fjsp_mul_v2r8(rinv01,rinv01);
712 rinvsq02 = _fjsp_mul_v2r8(rinv02,rinv02);
713 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
714 rinvsq11 = _fjsp_mul_v2r8(rinv11,rinv11);
715 rinvsq12 = _fjsp_mul_v2r8(rinv12,rinv12);
716 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
717 rinvsq21 = _fjsp_mul_v2r8(rinv21,rinv21);
718 rinvsq22 = _fjsp_mul_v2r8(rinv22,rinv22);
720 fjx0 = _fjsp_setzero_v2r8();
721 fjy0 = _fjsp_setzero_v2r8();
722 fjz0 = _fjsp_setzero_v2r8();
723 fjx1 = _fjsp_setzero_v2r8();
724 fjy1 = _fjsp_setzero_v2r8();
725 fjz1 = _fjsp_setzero_v2r8();
726 fjx2 = _fjsp_setzero_v2r8();
727 fjy2 = _fjsp_setzero_v2r8();
728 fjz2 = _fjsp_setzero_v2r8();
730 /**************************
731 * CALCULATE INTERACTIONS *
732 **************************/
734 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
736 /* EWALD ELECTROSTATICS */
738 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
739 ewrt = _fjsp_mul_v2r8(r00,ewtabscale);
740 itab_tmp = _fjsp_dtox_v2r8(ewrt);
741 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
742 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
744 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
745 ewtabD = _fjsp_setzero_v2r8();
746 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
747 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
748 ewtabFn = _fjsp_setzero_v2r8();
749 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
750 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
751 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
752 velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(rinv00,velec));
753 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,rinv00),_fjsp_sub_v2r8(rinvsq00,felec));
755 /* LENNARD-JONES DISPERSION/REPULSION */
757 rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
758 vvdw6 = _fjsp_mul_v2r8(c6_00,rinvsix);
759 vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
760 vvdw = _fjsp_msub_v2r8( vvdw12,one_twelfth, _fjsp_mul_v2r8(vvdw6,one_sixth) );
761 fvdw = _fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw12,vvdw6),rinvsq00);
763 /* Update potential sum for this i atom from the interaction with this j atom. */
764 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
765 velecsum = _fjsp_add_v2r8(velecsum,velec);
766 vvdw = _fjsp_unpacklo_v2r8(vvdw,_fjsp_setzero_v2r8());
767 vvdwsum = _fjsp_add_v2r8(vvdwsum,vvdw);
769 fscal = _fjsp_add_v2r8(felec,fvdw);
771 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
773 /* Update vectorial force */
774 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
775 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
776 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
778 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
779 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
780 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
782 /**************************
783 * CALCULATE INTERACTIONS *
784 **************************/
786 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
788 /* EWALD ELECTROSTATICS */
790 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
791 ewrt = _fjsp_mul_v2r8(r01,ewtabscale);
792 itab_tmp = _fjsp_dtox_v2r8(ewrt);
793 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
794 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
796 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
797 ewtabD = _fjsp_setzero_v2r8();
798 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
799 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
800 ewtabFn = _fjsp_setzero_v2r8();
801 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
802 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
803 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
804 velec = _fjsp_mul_v2r8(qq01,_fjsp_sub_v2r8(rinv01,velec));
805 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,rinv01),_fjsp_sub_v2r8(rinvsq01,felec));
807 /* Update potential sum for this i atom from the interaction with this j atom. */
808 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
809 velecsum = _fjsp_add_v2r8(velecsum,velec);
813 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
815 /* Update vectorial force */
816 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
817 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
818 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
820 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
821 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
822 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
824 /**************************
825 * CALCULATE INTERACTIONS *
826 **************************/
828 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
830 /* EWALD ELECTROSTATICS */
832 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
833 ewrt = _fjsp_mul_v2r8(r02,ewtabscale);
834 itab_tmp = _fjsp_dtox_v2r8(ewrt);
835 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
836 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
838 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
839 ewtabD = _fjsp_setzero_v2r8();
840 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
841 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
842 ewtabFn = _fjsp_setzero_v2r8();
843 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
844 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
845 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
846 velec = _fjsp_mul_v2r8(qq02,_fjsp_sub_v2r8(rinv02,velec));
847 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,rinv02),_fjsp_sub_v2r8(rinvsq02,felec));
849 /* Update potential sum for this i atom from the interaction with this j atom. */
850 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
851 velecsum = _fjsp_add_v2r8(velecsum,velec);
855 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
857 /* Update vectorial force */
858 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
859 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
860 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
862 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
863 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
864 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
866 /**************************
867 * CALCULATE INTERACTIONS *
868 **************************/
870 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
872 /* EWALD ELECTROSTATICS */
874 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
875 ewrt = _fjsp_mul_v2r8(r10,ewtabscale);
876 itab_tmp = _fjsp_dtox_v2r8(ewrt);
877 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
878 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
880 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
881 ewtabD = _fjsp_setzero_v2r8();
882 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
883 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
884 ewtabFn = _fjsp_setzero_v2r8();
885 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
886 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
887 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
888 velec = _fjsp_mul_v2r8(qq10,_fjsp_sub_v2r8(rinv10,velec));
889 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,rinv10),_fjsp_sub_v2r8(rinvsq10,felec));
891 /* Update potential sum for this i atom from the interaction with this j atom. */
892 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
893 velecsum = _fjsp_add_v2r8(velecsum,velec);
897 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
899 /* Update vectorial force */
900 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
901 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
902 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
904 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
905 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
906 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
908 /**************************
909 * CALCULATE INTERACTIONS *
910 **************************/
912 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
914 /* EWALD ELECTROSTATICS */
916 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
917 ewrt = _fjsp_mul_v2r8(r11,ewtabscale);
918 itab_tmp = _fjsp_dtox_v2r8(ewrt);
919 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
920 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
922 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
923 ewtabD = _fjsp_setzero_v2r8();
924 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
925 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
926 ewtabFn = _fjsp_setzero_v2r8();
927 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
928 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
929 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
930 velec = _fjsp_mul_v2r8(qq11,_fjsp_sub_v2r8(rinv11,velec));
931 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,rinv11),_fjsp_sub_v2r8(rinvsq11,felec));
933 /* Update potential sum for this i atom from the interaction with this j atom. */
934 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
935 velecsum = _fjsp_add_v2r8(velecsum,velec);
939 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
941 /* Update vectorial force */
942 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
943 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
944 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
946 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
947 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
948 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
950 /**************************
951 * CALCULATE INTERACTIONS *
952 **************************/
954 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
956 /* EWALD ELECTROSTATICS */
958 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
959 ewrt = _fjsp_mul_v2r8(r12,ewtabscale);
960 itab_tmp = _fjsp_dtox_v2r8(ewrt);
961 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
962 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
964 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
965 ewtabD = _fjsp_setzero_v2r8();
966 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
967 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
968 ewtabFn = _fjsp_setzero_v2r8();
969 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
970 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
971 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
972 velec = _fjsp_mul_v2r8(qq12,_fjsp_sub_v2r8(rinv12,velec));
973 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,rinv12),_fjsp_sub_v2r8(rinvsq12,felec));
975 /* Update potential sum for this i atom from the interaction with this j atom. */
976 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
977 velecsum = _fjsp_add_v2r8(velecsum,velec);
981 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
983 /* Update vectorial force */
984 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
985 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
986 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
988 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
989 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
990 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
992 /**************************
993 * CALCULATE INTERACTIONS *
994 **************************/
996 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
998 /* EWALD ELECTROSTATICS */
1000 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1001 ewrt = _fjsp_mul_v2r8(r20,ewtabscale);
1002 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1003 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1004 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1006 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
1007 ewtabD = _fjsp_setzero_v2r8();
1008 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
1009 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
1010 ewtabFn = _fjsp_setzero_v2r8();
1011 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
1012 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
1013 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
1014 velec = _fjsp_mul_v2r8(qq20,_fjsp_sub_v2r8(rinv20,velec));
1015 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,rinv20),_fjsp_sub_v2r8(rinvsq20,felec));
1017 /* Update potential sum for this i atom from the interaction with this j atom. */
1018 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
1019 velecsum = _fjsp_add_v2r8(velecsum,velec);
1023 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1025 /* Update vectorial force */
1026 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
1027 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
1028 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
1030 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
1031 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
1032 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
1034 /**************************
1035 * CALCULATE INTERACTIONS *
1036 **************************/
1038 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
1040 /* EWALD ELECTROSTATICS */
1042 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1043 ewrt = _fjsp_mul_v2r8(r21,ewtabscale);
1044 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1045 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1046 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1048 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
1049 ewtabD = _fjsp_setzero_v2r8();
1050 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
1051 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
1052 ewtabFn = _fjsp_setzero_v2r8();
1053 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
1054 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
1055 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
1056 velec = _fjsp_mul_v2r8(qq21,_fjsp_sub_v2r8(rinv21,velec));
1057 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,rinv21),_fjsp_sub_v2r8(rinvsq21,felec));
1059 /* Update potential sum for this i atom from the interaction with this j atom. */
1060 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
1061 velecsum = _fjsp_add_v2r8(velecsum,velec);
1065 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1067 /* Update vectorial force */
1068 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
1069 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
1070 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
1072 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
1073 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
1074 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
1076 /**************************
1077 * CALCULATE INTERACTIONS *
1078 **************************/
1080 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
1082 /* EWALD ELECTROSTATICS */
1084 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1085 ewrt = _fjsp_mul_v2r8(r22,ewtabscale);
1086 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1087 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1088 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1090 ewtabF = _fjsp_load_v2r8( ewtab + 4*ewconv.i[0] );
1091 ewtabD = _fjsp_setzero_v2r8();
1092 GMX_FJSP_TRANSPOSE2_V2R8(ewtabF,ewtabD);
1093 ewtabV = _fjsp_loadl_v2r8(_fjsp_setzero_v2r8(), ewtab + 4*ewconv.i[0] +2);
1094 ewtabFn = _fjsp_setzero_v2r8();
1095 GMX_FJSP_TRANSPOSE2_V2R8(ewtabV,ewtabFn);
1096 felec = _fjsp_madd_v2r8(eweps,ewtabD,ewtabF);
1097 velec = _fjsp_nmsub_v2r8(_fjsp_mul_v2r8(ewtabhalfspace,eweps) ,_fjsp_add_v2r8(ewtabF,felec), ewtabV);
1098 velec = _fjsp_mul_v2r8(qq22,_fjsp_sub_v2r8(rinv22,velec));
1099 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,rinv22),_fjsp_sub_v2r8(rinvsq22,felec));
1101 /* Update potential sum for this i atom from the interaction with this j atom. */
1102 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
1103 velecsum = _fjsp_add_v2r8(velecsum,velec);
1107 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1109 /* Update vectorial force */
1110 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
1111 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
1112 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
1114 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
1115 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
1116 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
1118 gmx_fjsp_decrement_3rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
1120 /* Inner loop uses 408 flops */
1123 /* End of innermost loop */
1125 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
1126 f+i_coord_offset,fshift+i_shift_offset);
1129 /* Update potential energies */
1130 gmx_fjsp_update_1pot_v2r8(velecsum,kernel_data->energygrp_elec+ggid);
1131 gmx_fjsp_update_1pot_v2r8(vvdwsum,kernel_data->energygrp_vdw+ggid);
1133 /* Increment number of inner iterations */
1134 inneriter += j_index_end - j_index_start;
1136 /* Outer loop uses 20 flops */
1139 /* Increment number of outer iterations */
1142 /* Update outer/inner flops */
1144 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3W3_VF,outeriter*20 + inneriter*408);
1147 * Gromacs nonbonded kernel: nb_kernel_ElecEw_VdwLJ_GeomW3W3_F_sparc64_hpc_ace_double
1148 * Electrostatics interaction: Ewald
1149 * VdW interaction: LennardJones
1150 * Geometry: Water3-Water3
1151 * Calculate force/pot: Force
1154 nb_kernel_ElecEw_VdwLJ_GeomW3W3_F_sparc64_hpc_ace_double
1155 (t_nblist * gmx_restrict nlist,
1156 rvec * gmx_restrict xx,
1157 rvec * gmx_restrict ff,
1158 t_forcerec * gmx_restrict fr,
1159 t_mdatoms * gmx_restrict mdatoms,
1160 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
1161 t_nrnb * gmx_restrict nrnb)
1163 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
1164 * just 0 for non-waters.
1165 * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
1166 * jnr indices corresponding to data put in the four positions in the SIMD register.
1168 int i_shift_offset,i_coord_offset,outeriter,inneriter;
1169 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
1171 int j_coord_offsetA,j_coord_offsetB;
1172 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
1173 real rcutoff_scalar;
1174 real *shiftvec,*fshift,*x,*f;
1175 _fjsp_v2r8 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
1177 _fjsp_v2r8 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
1179 _fjsp_v2r8 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
1181 _fjsp_v2r8 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
1182 int vdwjidx0A,vdwjidx0B;
1183 _fjsp_v2r8 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
1184 int vdwjidx1A,vdwjidx1B;
1185 _fjsp_v2r8 jx1,jy1,jz1,fjx1,fjy1,fjz1,jq1,isaj1;
1186 int vdwjidx2A,vdwjidx2B;
1187 _fjsp_v2r8 jx2,jy2,jz2,fjx2,fjy2,fjz2,jq2,isaj2;
1188 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
1189 _fjsp_v2r8 dx01,dy01,dz01,rsq01,rinv01,rinvsq01,r01,qq01,c6_01,c12_01;
1190 _fjsp_v2r8 dx02,dy02,dz02,rsq02,rinv02,rinvsq02,r02,qq02,c6_02,c12_02;
1191 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
1192 _fjsp_v2r8 dx11,dy11,dz11,rsq11,rinv11,rinvsq11,r11,qq11,c6_11,c12_11;
1193 _fjsp_v2r8 dx12,dy12,dz12,rsq12,rinv12,rinvsq12,r12,qq12,c6_12,c12_12;
1194 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
1195 _fjsp_v2r8 dx21,dy21,dz21,rsq21,rinv21,rinvsq21,r21,qq21,c6_21,c12_21;
1196 _fjsp_v2r8 dx22,dy22,dz22,rsq22,rinv22,rinvsq22,r22,qq22,c6_22,c12_22;
1197 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
1200 _fjsp_v2r8 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
1203 _fjsp_v2r8 one_sixth = gmx_fjsp_set1_v2r8(1.0/6.0);
1204 _fjsp_v2r8 one_twelfth = gmx_fjsp_set1_v2r8(1.0/12.0);
1205 _fjsp_v2r8 ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace,ewtabF,ewtabFn,ewtabD,ewtabV;
1207 _fjsp_v2r8 itab_tmp;
1208 _fjsp_v2r8 dummy_mask,cutoff_mask;
1209 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
1210 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
1211 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
1218 jindex = nlist->jindex;
1220 shiftidx = nlist->shift;
1222 shiftvec = fr->shift_vec[0];
1223 fshift = fr->fshift[0];
1224 facel = gmx_fjsp_set1_v2r8(fr->epsfac);
1225 charge = mdatoms->chargeA;
1226 nvdwtype = fr->ntype;
1227 vdwparam = fr->nbfp;
1228 vdwtype = mdatoms->typeA;
1230 sh_ewald = gmx_fjsp_set1_v2r8(fr->ic->sh_ewald);
1231 ewtab = fr->ic->tabq_coul_F;
1232 ewtabscale = gmx_fjsp_set1_v2r8(fr->ic->tabq_scale);
1233 ewtabhalfspace = gmx_fjsp_set1_v2r8(0.5/fr->ic->tabq_scale);
1235 /* Setup water-specific parameters */
1236 inr = nlist->iinr[0];
1237 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
1238 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
1239 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
1240 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
1242 jq0 = gmx_fjsp_set1_v2r8(charge[inr+0]);
1243 jq1 = gmx_fjsp_set1_v2r8(charge[inr+1]);
1244 jq2 = gmx_fjsp_set1_v2r8(charge[inr+2]);
1245 vdwjidx0A = 2*vdwtype[inr+0];
1246 qq00 = _fjsp_mul_v2r8(iq0,jq0);
1247 c6_00 = gmx_fjsp_set1_v2r8(vdwparam[vdwioffset0+vdwjidx0A]);
1248 c12_00 = gmx_fjsp_set1_v2r8(vdwparam[vdwioffset0+vdwjidx0A+1]);
1249 qq01 = _fjsp_mul_v2r8(iq0,jq1);
1250 qq02 = _fjsp_mul_v2r8(iq0,jq2);
1251 qq10 = _fjsp_mul_v2r8(iq1,jq0);
1252 qq11 = _fjsp_mul_v2r8(iq1,jq1);
1253 qq12 = _fjsp_mul_v2r8(iq1,jq2);
1254 qq20 = _fjsp_mul_v2r8(iq2,jq0);
1255 qq21 = _fjsp_mul_v2r8(iq2,jq1);
1256 qq22 = _fjsp_mul_v2r8(iq2,jq2);
1258 /* Avoid stupid compiler warnings */
1260 j_coord_offsetA = 0;
1261 j_coord_offsetB = 0;
1266 /* Start outer loop over neighborlists */
1267 for(iidx=0; iidx<nri; iidx++)
1269 /* Load shift vector for this list */
1270 i_shift_offset = DIM*shiftidx[iidx];
1272 /* Load limits for loop over neighbors */
1273 j_index_start = jindex[iidx];
1274 j_index_end = jindex[iidx+1];
1276 /* Get outer coordinate index */
1278 i_coord_offset = DIM*inr;
1280 /* Load i particle coords and add shift vector */
1281 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
1282 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
1284 fix0 = _fjsp_setzero_v2r8();
1285 fiy0 = _fjsp_setzero_v2r8();
1286 fiz0 = _fjsp_setzero_v2r8();
1287 fix1 = _fjsp_setzero_v2r8();
1288 fiy1 = _fjsp_setzero_v2r8();
1289 fiz1 = _fjsp_setzero_v2r8();
1290 fix2 = _fjsp_setzero_v2r8();
1291 fiy2 = _fjsp_setzero_v2r8();
1292 fiz2 = _fjsp_setzero_v2r8();
1294 /* Start inner kernel loop */
1295 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
1298 /* Get j neighbor index, and coordinate index */
1300 jnrB = jjnr[jidx+1];
1301 j_coord_offsetA = DIM*jnrA;
1302 j_coord_offsetB = DIM*jnrB;
1304 /* load j atom coordinates */
1305 gmx_fjsp_load_3rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
1306 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
1308 /* Calculate displacement vector */
1309 dx00 = _fjsp_sub_v2r8(ix0,jx0);
1310 dy00 = _fjsp_sub_v2r8(iy0,jy0);
1311 dz00 = _fjsp_sub_v2r8(iz0,jz0);
1312 dx01 = _fjsp_sub_v2r8(ix0,jx1);
1313 dy01 = _fjsp_sub_v2r8(iy0,jy1);
1314 dz01 = _fjsp_sub_v2r8(iz0,jz1);
1315 dx02 = _fjsp_sub_v2r8(ix0,jx2);
1316 dy02 = _fjsp_sub_v2r8(iy0,jy2);
1317 dz02 = _fjsp_sub_v2r8(iz0,jz2);
1318 dx10 = _fjsp_sub_v2r8(ix1,jx0);
1319 dy10 = _fjsp_sub_v2r8(iy1,jy0);
1320 dz10 = _fjsp_sub_v2r8(iz1,jz0);
1321 dx11 = _fjsp_sub_v2r8(ix1,jx1);
1322 dy11 = _fjsp_sub_v2r8(iy1,jy1);
1323 dz11 = _fjsp_sub_v2r8(iz1,jz1);
1324 dx12 = _fjsp_sub_v2r8(ix1,jx2);
1325 dy12 = _fjsp_sub_v2r8(iy1,jy2);
1326 dz12 = _fjsp_sub_v2r8(iz1,jz2);
1327 dx20 = _fjsp_sub_v2r8(ix2,jx0);
1328 dy20 = _fjsp_sub_v2r8(iy2,jy0);
1329 dz20 = _fjsp_sub_v2r8(iz2,jz0);
1330 dx21 = _fjsp_sub_v2r8(ix2,jx1);
1331 dy21 = _fjsp_sub_v2r8(iy2,jy1);
1332 dz21 = _fjsp_sub_v2r8(iz2,jz1);
1333 dx22 = _fjsp_sub_v2r8(ix2,jx2);
1334 dy22 = _fjsp_sub_v2r8(iy2,jy2);
1335 dz22 = _fjsp_sub_v2r8(iz2,jz2);
1337 /* Calculate squared distance and things based on it */
1338 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
1339 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
1340 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
1341 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
1342 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
1343 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
1344 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
1345 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
1346 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
1348 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
1349 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
1350 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
1351 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
1352 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
1353 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
1354 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
1355 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
1356 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
1358 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
1359 rinvsq01 = _fjsp_mul_v2r8(rinv01,rinv01);
1360 rinvsq02 = _fjsp_mul_v2r8(rinv02,rinv02);
1361 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
1362 rinvsq11 = _fjsp_mul_v2r8(rinv11,rinv11);
1363 rinvsq12 = _fjsp_mul_v2r8(rinv12,rinv12);
1364 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
1365 rinvsq21 = _fjsp_mul_v2r8(rinv21,rinv21);
1366 rinvsq22 = _fjsp_mul_v2r8(rinv22,rinv22);
1368 fjx0 = _fjsp_setzero_v2r8();
1369 fjy0 = _fjsp_setzero_v2r8();
1370 fjz0 = _fjsp_setzero_v2r8();
1371 fjx1 = _fjsp_setzero_v2r8();
1372 fjy1 = _fjsp_setzero_v2r8();
1373 fjz1 = _fjsp_setzero_v2r8();
1374 fjx2 = _fjsp_setzero_v2r8();
1375 fjy2 = _fjsp_setzero_v2r8();
1376 fjz2 = _fjsp_setzero_v2r8();
1378 /**************************
1379 * CALCULATE INTERACTIONS *
1380 **************************/
1382 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
1384 /* EWALD ELECTROSTATICS */
1386 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1387 ewrt = _fjsp_mul_v2r8(r00,ewtabscale);
1388 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1389 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1390 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1392 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1394 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1395 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,rinv00),_fjsp_sub_v2r8(rinvsq00,felec));
1397 /* LENNARD-JONES DISPERSION/REPULSION */
1399 rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
1400 fvdw = _fjsp_mul_v2r8(_fjsp_msub_v2r8(c12_00,rinvsix,c6_00),_fjsp_mul_v2r8(rinvsix,rinvsq00));
1402 fscal = _fjsp_add_v2r8(felec,fvdw);
1404 /* Update vectorial force */
1405 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
1406 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
1407 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
1409 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
1410 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
1411 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
1413 /**************************
1414 * CALCULATE INTERACTIONS *
1415 **************************/
1417 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
1419 /* EWALD ELECTROSTATICS */
1421 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1422 ewrt = _fjsp_mul_v2r8(r01,ewtabscale);
1423 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1424 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1425 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1427 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1429 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1430 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,rinv01),_fjsp_sub_v2r8(rinvsq01,felec));
1434 /* Update vectorial force */
1435 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
1436 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
1437 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
1439 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
1440 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
1441 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
1443 /**************************
1444 * CALCULATE INTERACTIONS *
1445 **************************/
1447 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
1449 /* EWALD ELECTROSTATICS */
1451 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1452 ewrt = _fjsp_mul_v2r8(r02,ewtabscale);
1453 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1454 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1455 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1457 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1459 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1460 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,rinv02),_fjsp_sub_v2r8(rinvsq02,felec));
1464 /* Update vectorial force */
1465 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
1466 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
1467 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
1469 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
1470 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
1471 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
1473 /**************************
1474 * CALCULATE INTERACTIONS *
1475 **************************/
1477 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
1479 /* EWALD ELECTROSTATICS */
1481 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1482 ewrt = _fjsp_mul_v2r8(r10,ewtabscale);
1483 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1484 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1485 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1487 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1489 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1490 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,rinv10),_fjsp_sub_v2r8(rinvsq10,felec));
1494 /* Update vectorial force */
1495 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
1496 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
1497 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
1499 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
1500 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
1501 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
1503 /**************************
1504 * CALCULATE INTERACTIONS *
1505 **************************/
1507 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
1509 /* EWALD ELECTROSTATICS */
1511 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1512 ewrt = _fjsp_mul_v2r8(r11,ewtabscale);
1513 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1514 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1515 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1517 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1519 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1520 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,rinv11),_fjsp_sub_v2r8(rinvsq11,felec));
1524 /* Update vectorial force */
1525 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
1526 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
1527 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
1529 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
1530 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
1531 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
1533 /**************************
1534 * CALCULATE INTERACTIONS *
1535 **************************/
1537 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
1539 /* EWALD ELECTROSTATICS */
1541 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1542 ewrt = _fjsp_mul_v2r8(r12,ewtabscale);
1543 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1544 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1545 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1547 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1549 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1550 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,rinv12),_fjsp_sub_v2r8(rinvsq12,felec));
1554 /* Update vectorial force */
1555 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
1556 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
1557 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
1559 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
1560 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
1561 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
1563 /**************************
1564 * CALCULATE INTERACTIONS *
1565 **************************/
1567 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
1569 /* EWALD ELECTROSTATICS */
1571 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1572 ewrt = _fjsp_mul_v2r8(r20,ewtabscale);
1573 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1574 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1575 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1577 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1579 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1580 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,rinv20),_fjsp_sub_v2r8(rinvsq20,felec));
1584 /* Update vectorial force */
1585 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
1586 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
1587 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
1589 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
1590 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
1591 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
1593 /**************************
1594 * CALCULATE INTERACTIONS *
1595 **************************/
1597 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
1599 /* EWALD ELECTROSTATICS */
1601 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1602 ewrt = _fjsp_mul_v2r8(r21,ewtabscale);
1603 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1604 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1605 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1607 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1609 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1610 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,rinv21),_fjsp_sub_v2r8(rinvsq21,felec));
1614 /* Update vectorial force */
1615 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
1616 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
1617 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
1619 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
1620 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
1621 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
1623 /**************************
1624 * CALCULATE INTERACTIONS *
1625 **************************/
1627 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
1629 /* EWALD ELECTROSTATICS */
1631 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1632 ewrt = _fjsp_mul_v2r8(r22,ewtabscale);
1633 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1634 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1635 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1637 gmx_fjsp_load_2pair_swizzle_v2r8(ewtab+ewconv.i[0],ewtab+ewconv.i[1],
1639 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1640 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,rinv22),_fjsp_sub_v2r8(rinvsq22,felec));
1644 /* Update vectorial force */
1645 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
1646 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
1647 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
1649 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
1650 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
1651 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
1653 gmx_fjsp_decrement_3rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
1655 /* Inner loop uses 358 flops */
1658 if(jidx<j_index_end)
1662 j_coord_offsetA = DIM*jnrA;
1664 /* load j atom coordinates */
1665 gmx_fjsp_load_3rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
1666 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
1668 /* Calculate displacement vector */
1669 dx00 = _fjsp_sub_v2r8(ix0,jx0);
1670 dy00 = _fjsp_sub_v2r8(iy0,jy0);
1671 dz00 = _fjsp_sub_v2r8(iz0,jz0);
1672 dx01 = _fjsp_sub_v2r8(ix0,jx1);
1673 dy01 = _fjsp_sub_v2r8(iy0,jy1);
1674 dz01 = _fjsp_sub_v2r8(iz0,jz1);
1675 dx02 = _fjsp_sub_v2r8(ix0,jx2);
1676 dy02 = _fjsp_sub_v2r8(iy0,jy2);
1677 dz02 = _fjsp_sub_v2r8(iz0,jz2);
1678 dx10 = _fjsp_sub_v2r8(ix1,jx0);
1679 dy10 = _fjsp_sub_v2r8(iy1,jy0);
1680 dz10 = _fjsp_sub_v2r8(iz1,jz0);
1681 dx11 = _fjsp_sub_v2r8(ix1,jx1);
1682 dy11 = _fjsp_sub_v2r8(iy1,jy1);
1683 dz11 = _fjsp_sub_v2r8(iz1,jz1);
1684 dx12 = _fjsp_sub_v2r8(ix1,jx2);
1685 dy12 = _fjsp_sub_v2r8(iy1,jy2);
1686 dz12 = _fjsp_sub_v2r8(iz1,jz2);
1687 dx20 = _fjsp_sub_v2r8(ix2,jx0);
1688 dy20 = _fjsp_sub_v2r8(iy2,jy0);
1689 dz20 = _fjsp_sub_v2r8(iz2,jz0);
1690 dx21 = _fjsp_sub_v2r8(ix2,jx1);
1691 dy21 = _fjsp_sub_v2r8(iy2,jy1);
1692 dz21 = _fjsp_sub_v2r8(iz2,jz1);
1693 dx22 = _fjsp_sub_v2r8(ix2,jx2);
1694 dy22 = _fjsp_sub_v2r8(iy2,jy2);
1695 dz22 = _fjsp_sub_v2r8(iz2,jz2);
1697 /* Calculate squared distance and things based on it */
1698 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
1699 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
1700 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
1701 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
1702 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
1703 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
1704 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
1705 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
1706 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
1708 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
1709 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
1710 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
1711 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
1712 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
1713 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
1714 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
1715 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
1716 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
1718 rinvsq00 = _fjsp_mul_v2r8(rinv00,rinv00);
1719 rinvsq01 = _fjsp_mul_v2r8(rinv01,rinv01);
1720 rinvsq02 = _fjsp_mul_v2r8(rinv02,rinv02);
1721 rinvsq10 = _fjsp_mul_v2r8(rinv10,rinv10);
1722 rinvsq11 = _fjsp_mul_v2r8(rinv11,rinv11);
1723 rinvsq12 = _fjsp_mul_v2r8(rinv12,rinv12);
1724 rinvsq20 = _fjsp_mul_v2r8(rinv20,rinv20);
1725 rinvsq21 = _fjsp_mul_v2r8(rinv21,rinv21);
1726 rinvsq22 = _fjsp_mul_v2r8(rinv22,rinv22);
1728 fjx0 = _fjsp_setzero_v2r8();
1729 fjy0 = _fjsp_setzero_v2r8();
1730 fjz0 = _fjsp_setzero_v2r8();
1731 fjx1 = _fjsp_setzero_v2r8();
1732 fjy1 = _fjsp_setzero_v2r8();
1733 fjz1 = _fjsp_setzero_v2r8();
1734 fjx2 = _fjsp_setzero_v2r8();
1735 fjy2 = _fjsp_setzero_v2r8();
1736 fjz2 = _fjsp_setzero_v2r8();
1738 /**************************
1739 * CALCULATE INTERACTIONS *
1740 **************************/
1742 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
1744 /* EWALD ELECTROSTATICS */
1746 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1747 ewrt = _fjsp_mul_v2r8(r00,ewtabscale);
1748 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1749 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1750 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1752 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1753 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1754 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,rinv00),_fjsp_sub_v2r8(rinvsq00,felec));
1756 /* LENNARD-JONES DISPERSION/REPULSION */
1758 rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
1759 fvdw = _fjsp_mul_v2r8(_fjsp_msub_v2r8(c12_00,rinvsix,c6_00),_fjsp_mul_v2r8(rinvsix,rinvsq00));
1761 fscal = _fjsp_add_v2r8(felec,fvdw);
1763 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1765 /* Update vectorial force */
1766 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
1767 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
1768 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
1770 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
1771 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
1772 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
1774 /**************************
1775 * CALCULATE INTERACTIONS *
1776 **************************/
1778 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
1780 /* EWALD ELECTROSTATICS */
1782 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1783 ewrt = _fjsp_mul_v2r8(r01,ewtabscale);
1784 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1785 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1786 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1788 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1789 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1790 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,rinv01),_fjsp_sub_v2r8(rinvsq01,felec));
1794 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1796 /* Update vectorial force */
1797 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
1798 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
1799 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
1801 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
1802 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
1803 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
1805 /**************************
1806 * CALCULATE INTERACTIONS *
1807 **************************/
1809 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
1811 /* EWALD ELECTROSTATICS */
1813 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1814 ewrt = _fjsp_mul_v2r8(r02,ewtabscale);
1815 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1816 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1817 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1819 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1820 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1821 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,rinv02),_fjsp_sub_v2r8(rinvsq02,felec));
1825 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1827 /* Update vectorial force */
1828 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
1829 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
1830 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
1832 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
1833 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
1834 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
1836 /**************************
1837 * CALCULATE INTERACTIONS *
1838 **************************/
1840 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
1842 /* EWALD ELECTROSTATICS */
1844 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1845 ewrt = _fjsp_mul_v2r8(r10,ewtabscale);
1846 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1847 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1848 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1850 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1851 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1852 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,rinv10),_fjsp_sub_v2r8(rinvsq10,felec));
1856 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1858 /* Update vectorial force */
1859 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
1860 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
1861 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
1863 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
1864 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
1865 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
1867 /**************************
1868 * CALCULATE INTERACTIONS *
1869 **************************/
1871 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
1873 /* EWALD ELECTROSTATICS */
1875 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1876 ewrt = _fjsp_mul_v2r8(r11,ewtabscale);
1877 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1878 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1879 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1881 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1882 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1883 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,rinv11),_fjsp_sub_v2r8(rinvsq11,felec));
1887 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1889 /* Update vectorial force */
1890 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
1891 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
1892 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
1894 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
1895 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
1896 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
1898 /**************************
1899 * CALCULATE INTERACTIONS *
1900 **************************/
1902 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
1904 /* EWALD ELECTROSTATICS */
1906 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1907 ewrt = _fjsp_mul_v2r8(r12,ewtabscale);
1908 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1909 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1910 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1912 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1913 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1914 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,rinv12),_fjsp_sub_v2r8(rinvsq12,felec));
1918 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1920 /* Update vectorial force */
1921 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
1922 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
1923 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
1925 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
1926 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
1927 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
1929 /**************************
1930 * CALCULATE INTERACTIONS *
1931 **************************/
1933 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
1935 /* EWALD ELECTROSTATICS */
1937 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1938 ewrt = _fjsp_mul_v2r8(r20,ewtabscale);
1939 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1940 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1941 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1943 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1944 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1945 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,rinv20),_fjsp_sub_v2r8(rinvsq20,felec));
1949 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1951 /* Update vectorial force */
1952 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
1953 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
1954 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
1956 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
1957 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
1958 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
1960 /**************************
1961 * CALCULATE INTERACTIONS *
1962 **************************/
1964 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
1966 /* EWALD ELECTROSTATICS */
1968 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
1969 ewrt = _fjsp_mul_v2r8(r21,ewtabscale);
1970 itab_tmp = _fjsp_dtox_v2r8(ewrt);
1971 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
1972 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
1974 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
1975 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
1976 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,rinv21),_fjsp_sub_v2r8(rinvsq21,felec));
1980 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1982 /* Update vectorial force */
1983 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
1984 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
1985 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
1987 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
1988 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
1989 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
1991 /**************************
1992 * CALCULATE INTERACTIONS *
1993 **************************/
1995 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
1997 /* EWALD ELECTROSTATICS */
1999 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
2000 ewrt = _fjsp_mul_v2r8(r22,ewtabscale);
2001 itab_tmp = _fjsp_dtox_v2r8(ewrt);
2002 eweps = _fjsp_sub_v2r8(ewrt,_fjsp_xtod_v2r8(itab_tmp));
2003 _fjsp_store_v2r8(&ewconv.simd,itab_tmp);
2005 gmx_fjsp_load_1pair_swizzle_v2r8(ewtab+ewconv.i[0],&ewtabF,&ewtabFn);
2006 felec = _fjsp_madd_v2r8(eweps,ewtabFn,_fjsp_nmsub_v2r8(eweps,ewtabF,ewtabF));
2007 felec = _fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,rinv22),_fjsp_sub_v2r8(rinvsq22,felec));
2011 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
2013 /* Update vectorial force */
2014 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
2015 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
2016 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
2018 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
2019 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
2020 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
2022 gmx_fjsp_decrement_3rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
2024 /* Inner loop uses 358 flops */
2027 /* End of innermost loop */
2029 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
2030 f+i_coord_offset,fshift+i_shift_offset);
2032 /* Increment number of inner iterations */
2033 inneriter += j_index_end - j_index_start;
2035 /* Outer loop uses 18 flops */
2038 /* Increment number of outer iterations */
2041 /* Update outer/inner flops */
2043 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3W3_F,outeriter*18 + inneriter*358);