2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012, by the GROMACS development team, led by
5 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
6 * others, as listed in the AUTHORS file in the top-level source
7 * 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"
49 #include "kernelutil_sparc64_hpc_ace_double.h"
52 * Gromacs nonbonded kernel: nb_kernel_ElecCSTab_VdwNone_GeomW3W3_VF_sparc64_hpc_ace_double
53 * Electrostatics interaction: CubicSplineTable
54 * VdW interaction: None
55 * Geometry: Water3-Water3
56 * Calculate force/pot: PotentialAndForce
59 nb_kernel_ElecCSTab_VdwNone_GeomW3W3_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_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 int vdwjidx1A,vdwjidx1B;
90 _fjsp_v2r8 jx1,jy1,jz1,fjx1,fjy1,fjz1,jq1,isaj1;
91 int vdwjidx2A,vdwjidx2B;
92 _fjsp_v2r8 jx2,jy2,jz2,fjx2,fjy2,fjz2,jq2,isaj2;
93 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
94 _fjsp_v2r8 dx01,dy01,dz01,rsq01,rinv01,rinvsq01,r01,qq01,c6_01,c12_01;
95 _fjsp_v2r8 dx02,dy02,dz02,rsq02,rinv02,rinvsq02,r02,qq02,c6_02,c12_02;
96 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
97 _fjsp_v2r8 dx11,dy11,dz11,rsq11,rinv11,rinvsq11,r11,qq11,c6_11,c12_11;
98 _fjsp_v2r8 dx12,dy12,dz12,rsq12,rinv12,rinvsq12,r12,qq12,c6_12,c12_12;
99 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
100 _fjsp_v2r8 dx21,dy21,dz21,rsq21,rinv21,rinvsq21,r21,qq21,c6_21,c12_21;
101 _fjsp_v2r8 dx22,dy22,dz22,rsq22,rinv22,rinvsq22,r22,qq22,c6_22,c12_22;
102 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
104 _fjsp_v2r8 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF,twovfeps;
107 _fjsp_v2r8 dummy_mask,cutoff_mask;
108 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
109 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
110 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
117 jindex = nlist->jindex;
119 shiftidx = nlist->shift;
121 shiftvec = fr->shift_vec[0];
122 fshift = fr->fshift[0];
123 facel = gmx_fjsp_set1_v2r8(fr->epsfac);
124 charge = mdatoms->chargeA;
126 vftab = kernel_data->table_elec->data;
127 vftabscale = gmx_fjsp_set1_v2r8(kernel_data->table_elec->scale);
129 /* Setup water-specific parameters */
130 inr = nlist->iinr[0];
131 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
132 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
133 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
135 jq0 = gmx_fjsp_set1_v2r8(charge[inr+0]);
136 jq1 = gmx_fjsp_set1_v2r8(charge[inr+1]);
137 jq2 = gmx_fjsp_set1_v2r8(charge[inr+2]);
138 qq00 = _fjsp_mul_v2r8(iq0,jq0);
139 qq01 = _fjsp_mul_v2r8(iq0,jq1);
140 qq02 = _fjsp_mul_v2r8(iq0,jq2);
141 qq10 = _fjsp_mul_v2r8(iq1,jq0);
142 qq11 = _fjsp_mul_v2r8(iq1,jq1);
143 qq12 = _fjsp_mul_v2r8(iq1,jq2);
144 qq20 = _fjsp_mul_v2r8(iq2,jq0);
145 qq21 = _fjsp_mul_v2r8(iq2,jq1);
146 qq22 = _fjsp_mul_v2r8(iq2,jq2);
148 /* Avoid stupid compiler warnings */
156 /* Start outer loop over neighborlists */
157 for(iidx=0; iidx<nri; iidx++)
159 /* Load shift vector for this list */
160 i_shift_offset = DIM*shiftidx[iidx];
162 /* Load limits for loop over neighbors */
163 j_index_start = jindex[iidx];
164 j_index_end = jindex[iidx+1];
166 /* Get outer coordinate index */
168 i_coord_offset = DIM*inr;
170 /* Load i particle coords and add shift vector */
171 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
172 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
174 fix0 = _fjsp_setzero_v2r8();
175 fiy0 = _fjsp_setzero_v2r8();
176 fiz0 = _fjsp_setzero_v2r8();
177 fix1 = _fjsp_setzero_v2r8();
178 fiy1 = _fjsp_setzero_v2r8();
179 fiz1 = _fjsp_setzero_v2r8();
180 fix2 = _fjsp_setzero_v2r8();
181 fiy2 = _fjsp_setzero_v2r8();
182 fiz2 = _fjsp_setzero_v2r8();
184 /* Reset potential sums */
185 velecsum = _fjsp_setzero_v2r8();
187 /* Start inner kernel loop */
188 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
191 /* Get j neighbor index, and coordinate index */
194 j_coord_offsetA = DIM*jnrA;
195 j_coord_offsetB = DIM*jnrB;
197 /* load j atom coordinates */
198 gmx_fjsp_load_3rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
199 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
201 /* Calculate displacement vector */
202 dx00 = _fjsp_sub_v2r8(ix0,jx0);
203 dy00 = _fjsp_sub_v2r8(iy0,jy0);
204 dz00 = _fjsp_sub_v2r8(iz0,jz0);
205 dx01 = _fjsp_sub_v2r8(ix0,jx1);
206 dy01 = _fjsp_sub_v2r8(iy0,jy1);
207 dz01 = _fjsp_sub_v2r8(iz0,jz1);
208 dx02 = _fjsp_sub_v2r8(ix0,jx2);
209 dy02 = _fjsp_sub_v2r8(iy0,jy2);
210 dz02 = _fjsp_sub_v2r8(iz0,jz2);
211 dx10 = _fjsp_sub_v2r8(ix1,jx0);
212 dy10 = _fjsp_sub_v2r8(iy1,jy0);
213 dz10 = _fjsp_sub_v2r8(iz1,jz0);
214 dx11 = _fjsp_sub_v2r8(ix1,jx1);
215 dy11 = _fjsp_sub_v2r8(iy1,jy1);
216 dz11 = _fjsp_sub_v2r8(iz1,jz1);
217 dx12 = _fjsp_sub_v2r8(ix1,jx2);
218 dy12 = _fjsp_sub_v2r8(iy1,jy2);
219 dz12 = _fjsp_sub_v2r8(iz1,jz2);
220 dx20 = _fjsp_sub_v2r8(ix2,jx0);
221 dy20 = _fjsp_sub_v2r8(iy2,jy0);
222 dz20 = _fjsp_sub_v2r8(iz2,jz0);
223 dx21 = _fjsp_sub_v2r8(ix2,jx1);
224 dy21 = _fjsp_sub_v2r8(iy2,jy1);
225 dz21 = _fjsp_sub_v2r8(iz2,jz1);
226 dx22 = _fjsp_sub_v2r8(ix2,jx2);
227 dy22 = _fjsp_sub_v2r8(iy2,jy2);
228 dz22 = _fjsp_sub_v2r8(iz2,jz2);
230 /* Calculate squared distance and things based on it */
231 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
232 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
233 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
234 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
235 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
236 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
237 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
238 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
239 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
241 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
242 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
243 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
244 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
245 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
246 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
247 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
248 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
249 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
251 fjx0 = _fjsp_setzero_v2r8();
252 fjy0 = _fjsp_setzero_v2r8();
253 fjz0 = _fjsp_setzero_v2r8();
254 fjx1 = _fjsp_setzero_v2r8();
255 fjy1 = _fjsp_setzero_v2r8();
256 fjz1 = _fjsp_setzero_v2r8();
257 fjx2 = _fjsp_setzero_v2r8();
258 fjy2 = _fjsp_setzero_v2r8();
259 fjz2 = _fjsp_setzero_v2r8();
261 /**************************
262 * CALCULATE INTERACTIONS *
263 **************************/
265 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
267 /* Calculate table index by multiplying r with table scale and truncate to integer */
268 rt = _fjsp_mul_v2r8(r00,vftabscale);
269 itab_tmp = _fjsp_dtox_v2r8(rt);
270 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
271 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
272 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
277 /* CUBIC SPLINE TABLE ELECTROSTATICS */
278 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
279 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
280 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
281 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
282 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
283 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
284 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
285 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
286 velec = _fjsp_mul_v2r8(qq00,VV);
287 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
288 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,FF),_fjsp_mul_v2r8(vftabscale,rinv00)));
290 /* Update potential sum for this i atom from the interaction with this j atom. */
291 velecsum = _fjsp_add_v2r8(velecsum,velec);
295 /* Update vectorial force */
296 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
297 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
298 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
300 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
301 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
302 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
304 /**************************
305 * CALCULATE INTERACTIONS *
306 **************************/
308 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
310 /* Calculate table index by multiplying r with table scale and truncate to integer */
311 rt = _fjsp_mul_v2r8(r01,vftabscale);
312 itab_tmp = _fjsp_dtox_v2r8(rt);
313 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
314 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
315 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
320 /* CUBIC SPLINE TABLE ELECTROSTATICS */
321 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
322 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
323 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
324 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
325 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
326 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
327 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
328 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
329 velec = _fjsp_mul_v2r8(qq01,VV);
330 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
331 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,FF),_fjsp_mul_v2r8(vftabscale,rinv01)));
333 /* Update potential sum for this i atom from the interaction with this j atom. */
334 velecsum = _fjsp_add_v2r8(velecsum,velec);
338 /* Update vectorial force */
339 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
340 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
341 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
343 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
344 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
345 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
347 /**************************
348 * CALCULATE INTERACTIONS *
349 **************************/
351 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
353 /* Calculate table index by multiplying r with table scale and truncate to integer */
354 rt = _fjsp_mul_v2r8(r02,vftabscale);
355 itab_tmp = _fjsp_dtox_v2r8(rt);
356 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
357 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
358 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
363 /* CUBIC SPLINE TABLE ELECTROSTATICS */
364 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
365 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
366 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
367 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
368 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
369 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
370 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
371 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
372 velec = _fjsp_mul_v2r8(qq02,VV);
373 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
374 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,FF),_fjsp_mul_v2r8(vftabscale,rinv02)));
376 /* Update potential sum for this i atom from the interaction with this j atom. */
377 velecsum = _fjsp_add_v2r8(velecsum,velec);
381 /* Update vectorial force */
382 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
383 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
384 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
386 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
387 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
388 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
390 /**************************
391 * CALCULATE INTERACTIONS *
392 **************************/
394 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
396 /* Calculate table index by multiplying r with table scale and truncate to integer */
397 rt = _fjsp_mul_v2r8(r10,vftabscale);
398 itab_tmp = _fjsp_dtox_v2r8(rt);
399 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
400 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
401 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
406 /* CUBIC SPLINE TABLE ELECTROSTATICS */
407 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
408 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
409 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
410 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
411 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
412 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
413 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
414 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
415 velec = _fjsp_mul_v2r8(qq10,VV);
416 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
417 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,FF),_fjsp_mul_v2r8(vftabscale,rinv10)));
419 /* Update potential sum for this i atom from the interaction with this j atom. */
420 velecsum = _fjsp_add_v2r8(velecsum,velec);
424 /* Update vectorial force */
425 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
426 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
427 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
429 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
430 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
431 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
433 /**************************
434 * CALCULATE INTERACTIONS *
435 **************************/
437 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
439 /* Calculate table index by multiplying r with table scale and truncate to integer */
440 rt = _fjsp_mul_v2r8(r11,vftabscale);
441 itab_tmp = _fjsp_dtox_v2r8(rt);
442 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
443 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
444 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
449 /* CUBIC SPLINE TABLE ELECTROSTATICS */
450 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
451 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
452 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
453 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
454 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
455 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
456 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
457 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
458 velec = _fjsp_mul_v2r8(qq11,VV);
459 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
460 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,FF),_fjsp_mul_v2r8(vftabscale,rinv11)));
462 /* Update potential sum for this i atom from the interaction with this j atom. */
463 velecsum = _fjsp_add_v2r8(velecsum,velec);
467 /* Update vectorial force */
468 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
469 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
470 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
472 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
473 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
474 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
476 /**************************
477 * CALCULATE INTERACTIONS *
478 **************************/
480 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
482 /* Calculate table index by multiplying r with table scale and truncate to integer */
483 rt = _fjsp_mul_v2r8(r12,vftabscale);
484 itab_tmp = _fjsp_dtox_v2r8(rt);
485 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
486 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
487 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
492 /* CUBIC SPLINE TABLE ELECTROSTATICS */
493 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
494 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
495 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
496 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
497 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
498 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
499 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
500 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
501 velec = _fjsp_mul_v2r8(qq12,VV);
502 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
503 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,FF),_fjsp_mul_v2r8(vftabscale,rinv12)));
505 /* Update potential sum for this i atom from the interaction with this j atom. */
506 velecsum = _fjsp_add_v2r8(velecsum,velec);
510 /* Update vectorial force */
511 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
512 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
513 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
515 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
516 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
517 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
519 /**************************
520 * CALCULATE INTERACTIONS *
521 **************************/
523 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
525 /* Calculate table index by multiplying r with table scale and truncate to integer */
526 rt = _fjsp_mul_v2r8(r20,vftabscale);
527 itab_tmp = _fjsp_dtox_v2r8(rt);
528 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
529 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
530 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
535 /* CUBIC SPLINE TABLE ELECTROSTATICS */
536 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
537 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
538 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
539 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
540 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
541 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
542 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
543 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
544 velec = _fjsp_mul_v2r8(qq20,VV);
545 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
546 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,FF),_fjsp_mul_v2r8(vftabscale,rinv20)));
548 /* Update potential sum for this i atom from the interaction with this j atom. */
549 velecsum = _fjsp_add_v2r8(velecsum,velec);
553 /* Update vectorial force */
554 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
555 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
556 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
558 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
559 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
560 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
562 /**************************
563 * CALCULATE INTERACTIONS *
564 **************************/
566 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
568 /* Calculate table index by multiplying r with table scale and truncate to integer */
569 rt = _fjsp_mul_v2r8(r21,vftabscale);
570 itab_tmp = _fjsp_dtox_v2r8(rt);
571 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
572 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
573 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
578 /* CUBIC SPLINE TABLE ELECTROSTATICS */
579 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
580 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
581 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
582 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
583 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
584 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
585 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
586 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
587 velec = _fjsp_mul_v2r8(qq21,VV);
588 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
589 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,FF),_fjsp_mul_v2r8(vftabscale,rinv21)));
591 /* Update potential sum for this i atom from the interaction with this j atom. */
592 velecsum = _fjsp_add_v2r8(velecsum,velec);
596 /* Update vectorial force */
597 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
598 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
599 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
601 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
602 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
603 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
605 /**************************
606 * CALCULATE INTERACTIONS *
607 **************************/
609 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
611 /* Calculate table index by multiplying r with table scale and truncate to integer */
612 rt = _fjsp_mul_v2r8(r22,vftabscale);
613 itab_tmp = _fjsp_dtox_v2r8(rt);
614 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
615 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
616 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
621 /* CUBIC SPLINE TABLE ELECTROSTATICS */
622 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
623 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
624 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
625 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
626 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
627 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
628 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
629 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
630 velec = _fjsp_mul_v2r8(qq22,VV);
631 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
632 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,FF),_fjsp_mul_v2r8(vftabscale,rinv22)));
634 /* Update potential sum for this i atom from the interaction with this j atom. */
635 velecsum = _fjsp_add_v2r8(velecsum,velec);
639 /* Update vectorial force */
640 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
641 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
642 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
644 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
645 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
646 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
648 gmx_fjsp_decrement_3rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
650 /* Inner loop uses 414 flops */
657 j_coord_offsetA = DIM*jnrA;
659 /* load j atom coordinates */
660 gmx_fjsp_load_3rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
661 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
663 /* Calculate displacement vector */
664 dx00 = _fjsp_sub_v2r8(ix0,jx0);
665 dy00 = _fjsp_sub_v2r8(iy0,jy0);
666 dz00 = _fjsp_sub_v2r8(iz0,jz0);
667 dx01 = _fjsp_sub_v2r8(ix0,jx1);
668 dy01 = _fjsp_sub_v2r8(iy0,jy1);
669 dz01 = _fjsp_sub_v2r8(iz0,jz1);
670 dx02 = _fjsp_sub_v2r8(ix0,jx2);
671 dy02 = _fjsp_sub_v2r8(iy0,jy2);
672 dz02 = _fjsp_sub_v2r8(iz0,jz2);
673 dx10 = _fjsp_sub_v2r8(ix1,jx0);
674 dy10 = _fjsp_sub_v2r8(iy1,jy0);
675 dz10 = _fjsp_sub_v2r8(iz1,jz0);
676 dx11 = _fjsp_sub_v2r8(ix1,jx1);
677 dy11 = _fjsp_sub_v2r8(iy1,jy1);
678 dz11 = _fjsp_sub_v2r8(iz1,jz1);
679 dx12 = _fjsp_sub_v2r8(ix1,jx2);
680 dy12 = _fjsp_sub_v2r8(iy1,jy2);
681 dz12 = _fjsp_sub_v2r8(iz1,jz2);
682 dx20 = _fjsp_sub_v2r8(ix2,jx0);
683 dy20 = _fjsp_sub_v2r8(iy2,jy0);
684 dz20 = _fjsp_sub_v2r8(iz2,jz0);
685 dx21 = _fjsp_sub_v2r8(ix2,jx1);
686 dy21 = _fjsp_sub_v2r8(iy2,jy1);
687 dz21 = _fjsp_sub_v2r8(iz2,jz1);
688 dx22 = _fjsp_sub_v2r8(ix2,jx2);
689 dy22 = _fjsp_sub_v2r8(iy2,jy2);
690 dz22 = _fjsp_sub_v2r8(iz2,jz2);
692 /* Calculate squared distance and things based on it */
693 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
694 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
695 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
696 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
697 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
698 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
699 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
700 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
701 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
703 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
704 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
705 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
706 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
707 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
708 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
709 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
710 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
711 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
713 fjx0 = _fjsp_setzero_v2r8();
714 fjy0 = _fjsp_setzero_v2r8();
715 fjz0 = _fjsp_setzero_v2r8();
716 fjx1 = _fjsp_setzero_v2r8();
717 fjy1 = _fjsp_setzero_v2r8();
718 fjz1 = _fjsp_setzero_v2r8();
719 fjx2 = _fjsp_setzero_v2r8();
720 fjy2 = _fjsp_setzero_v2r8();
721 fjz2 = _fjsp_setzero_v2r8();
723 /**************************
724 * CALCULATE INTERACTIONS *
725 **************************/
727 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
729 /* Calculate table index by multiplying r with table scale and truncate to integer */
730 rt = _fjsp_mul_v2r8(r00,vftabscale);
731 itab_tmp = _fjsp_dtox_v2r8(rt);
732 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
733 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
734 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
739 /* CUBIC SPLINE TABLE ELECTROSTATICS */
740 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
741 F = _fjsp_setzero_v2r8();
742 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
743 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
744 H = _fjsp_setzero_v2r8();
745 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
746 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
747 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
748 velec = _fjsp_mul_v2r8(qq00,VV);
749 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
750 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,FF),_fjsp_mul_v2r8(vftabscale,rinv00)));
752 /* Update potential sum for this i atom from the interaction with this j atom. */
753 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
754 velecsum = _fjsp_add_v2r8(velecsum,velec);
758 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
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 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
775 /* Calculate table index by multiplying r with table scale and truncate to integer */
776 rt = _fjsp_mul_v2r8(r01,vftabscale);
777 itab_tmp = _fjsp_dtox_v2r8(rt);
778 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
779 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
780 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
785 /* CUBIC SPLINE TABLE ELECTROSTATICS */
786 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
787 F = _fjsp_setzero_v2r8();
788 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
789 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
790 H = _fjsp_setzero_v2r8();
791 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
792 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
793 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
794 velec = _fjsp_mul_v2r8(qq01,VV);
795 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
796 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,FF),_fjsp_mul_v2r8(vftabscale,rinv01)));
798 /* Update potential sum for this i atom from the interaction with this j atom. */
799 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
800 velecsum = _fjsp_add_v2r8(velecsum,velec);
804 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
806 /* Update vectorial force */
807 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
808 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
809 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
811 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
812 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
813 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
815 /**************************
816 * CALCULATE INTERACTIONS *
817 **************************/
819 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
821 /* Calculate table index by multiplying r with table scale and truncate to integer */
822 rt = _fjsp_mul_v2r8(r02,vftabscale);
823 itab_tmp = _fjsp_dtox_v2r8(rt);
824 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
825 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
826 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
831 /* CUBIC SPLINE TABLE ELECTROSTATICS */
832 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
833 F = _fjsp_setzero_v2r8();
834 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
835 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
836 H = _fjsp_setzero_v2r8();
837 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
838 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
839 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
840 velec = _fjsp_mul_v2r8(qq02,VV);
841 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
842 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,FF),_fjsp_mul_v2r8(vftabscale,rinv02)));
844 /* Update potential sum for this i atom from the interaction with this j atom. */
845 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
846 velecsum = _fjsp_add_v2r8(velecsum,velec);
850 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
852 /* Update vectorial force */
853 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
854 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
855 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
857 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
858 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
859 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
861 /**************************
862 * CALCULATE INTERACTIONS *
863 **************************/
865 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
867 /* Calculate table index by multiplying r with table scale and truncate to integer */
868 rt = _fjsp_mul_v2r8(r10,vftabscale);
869 itab_tmp = _fjsp_dtox_v2r8(rt);
870 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
871 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
872 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
877 /* CUBIC SPLINE TABLE ELECTROSTATICS */
878 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
879 F = _fjsp_setzero_v2r8();
880 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
881 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
882 H = _fjsp_setzero_v2r8();
883 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
884 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
885 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
886 velec = _fjsp_mul_v2r8(qq10,VV);
887 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
888 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,FF),_fjsp_mul_v2r8(vftabscale,rinv10)));
890 /* Update potential sum for this i atom from the interaction with this j atom. */
891 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
892 velecsum = _fjsp_add_v2r8(velecsum,velec);
896 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
898 /* Update vectorial force */
899 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
900 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
901 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
903 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
904 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
905 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
907 /**************************
908 * CALCULATE INTERACTIONS *
909 **************************/
911 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
913 /* Calculate table index by multiplying r with table scale and truncate to integer */
914 rt = _fjsp_mul_v2r8(r11,vftabscale);
915 itab_tmp = _fjsp_dtox_v2r8(rt);
916 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
917 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
918 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
923 /* CUBIC SPLINE TABLE ELECTROSTATICS */
924 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
925 F = _fjsp_setzero_v2r8();
926 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
927 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
928 H = _fjsp_setzero_v2r8();
929 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
930 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
931 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
932 velec = _fjsp_mul_v2r8(qq11,VV);
933 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
934 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,FF),_fjsp_mul_v2r8(vftabscale,rinv11)));
936 /* Update potential sum for this i atom from the interaction with this j atom. */
937 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
938 velecsum = _fjsp_add_v2r8(velecsum,velec);
942 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
944 /* Update vectorial force */
945 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
946 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
947 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
949 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
950 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
951 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
953 /**************************
954 * CALCULATE INTERACTIONS *
955 **************************/
957 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
959 /* Calculate table index by multiplying r with table scale and truncate to integer */
960 rt = _fjsp_mul_v2r8(r12,vftabscale);
961 itab_tmp = _fjsp_dtox_v2r8(rt);
962 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
963 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
964 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
969 /* CUBIC SPLINE TABLE ELECTROSTATICS */
970 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
971 F = _fjsp_setzero_v2r8();
972 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
973 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
974 H = _fjsp_setzero_v2r8();
975 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
976 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
977 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
978 velec = _fjsp_mul_v2r8(qq12,VV);
979 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
980 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,FF),_fjsp_mul_v2r8(vftabscale,rinv12)));
982 /* Update potential sum for this i atom from the interaction with this j atom. */
983 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
984 velecsum = _fjsp_add_v2r8(velecsum,velec);
988 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
990 /* Update vectorial force */
991 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
992 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
993 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
995 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
996 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
997 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
999 /**************************
1000 * CALCULATE INTERACTIONS *
1001 **************************/
1003 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
1005 /* Calculate table index by multiplying r with table scale and truncate to integer */
1006 rt = _fjsp_mul_v2r8(r20,vftabscale);
1007 itab_tmp = _fjsp_dtox_v2r8(rt);
1008 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1009 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1010 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1015 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1016 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1017 F = _fjsp_setzero_v2r8();
1018 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1019 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1020 H = _fjsp_setzero_v2r8();
1021 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1022 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1023 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
1024 velec = _fjsp_mul_v2r8(qq20,VV);
1025 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1026 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,FF),_fjsp_mul_v2r8(vftabscale,rinv20)));
1028 /* Update potential sum for this i atom from the interaction with this j atom. */
1029 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
1030 velecsum = _fjsp_add_v2r8(velecsum,velec);
1034 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1036 /* Update vectorial force */
1037 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
1038 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
1039 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
1041 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
1042 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
1043 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
1045 /**************************
1046 * CALCULATE INTERACTIONS *
1047 **************************/
1049 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
1051 /* Calculate table index by multiplying r with table scale and truncate to integer */
1052 rt = _fjsp_mul_v2r8(r21,vftabscale);
1053 itab_tmp = _fjsp_dtox_v2r8(rt);
1054 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1055 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1056 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1061 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1062 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1063 F = _fjsp_setzero_v2r8();
1064 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1065 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1066 H = _fjsp_setzero_v2r8();
1067 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1068 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1069 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
1070 velec = _fjsp_mul_v2r8(qq21,VV);
1071 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1072 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,FF),_fjsp_mul_v2r8(vftabscale,rinv21)));
1074 /* Update potential sum for this i atom from the interaction with this j atom. */
1075 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
1076 velecsum = _fjsp_add_v2r8(velecsum,velec);
1080 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1082 /* Update vectorial force */
1083 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
1084 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
1085 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
1087 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
1088 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
1089 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
1091 /**************************
1092 * CALCULATE INTERACTIONS *
1093 **************************/
1095 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
1097 /* Calculate table index by multiplying r with table scale and truncate to integer */
1098 rt = _fjsp_mul_v2r8(r22,vftabscale);
1099 itab_tmp = _fjsp_dtox_v2r8(rt);
1100 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1101 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1102 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1107 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1108 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1109 F = _fjsp_setzero_v2r8();
1110 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1111 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1112 H = _fjsp_setzero_v2r8();
1113 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1114 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1115 VV = _fjsp_madd_v2r8(vfeps,Fp,Y);
1116 velec = _fjsp_mul_v2r8(qq22,VV);
1117 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1118 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,FF),_fjsp_mul_v2r8(vftabscale,rinv22)));
1120 /* Update potential sum for this i atom from the interaction with this j atom. */
1121 velec = _fjsp_unpacklo_v2r8(velec,_fjsp_setzero_v2r8());
1122 velecsum = _fjsp_add_v2r8(velecsum,velec);
1126 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1128 /* Update vectorial force */
1129 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
1130 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
1131 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
1133 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
1134 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
1135 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
1137 gmx_fjsp_decrement_3rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
1139 /* Inner loop uses 414 flops */
1142 /* End of innermost loop */
1144 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
1145 f+i_coord_offset,fshift+i_shift_offset);
1148 /* Update potential energies */
1149 gmx_fjsp_update_1pot_v2r8(velecsum,kernel_data->energygrp_elec+ggid);
1151 /* Increment number of inner iterations */
1152 inneriter += j_index_end - j_index_start;
1154 /* Outer loop uses 19 flops */
1157 /* Increment number of outer iterations */
1160 /* Update outer/inner flops */
1162 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_W3W3_VF,outeriter*19 + inneriter*414);
1165 * Gromacs nonbonded kernel: nb_kernel_ElecCSTab_VdwNone_GeomW3W3_F_sparc64_hpc_ace_double
1166 * Electrostatics interaction: CubicSplineTable
1167 * VdW interaction: None
1168 * Geometry: Water3-Water3
1169 * Calculate force/pot: Force
1172 nb_kernel_ElecCSTab_VdwNone_GeomW3W3_F_sparc64_hpc_ace_double
1173 (t_nblist * gmx_restrict nlist,
1174 rvec * gmx_restrict xx,
1175 rvec * gmx_restrict ff,
1176 t_forcerec * gmx_restrict fr,
1177 t_mdatoms * gmx_restrict mdatoms,
1178 nb_kernel_data_t * gmx_restrict kernel_data,
1179 t_nrnb * gmx_restrict nrnb)
1181 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
1182 * just 0 for non-waters.
1183 * Suffixes A,B refer to j loop unrolling done with double precision SIMD, e.g. for the two different
1184 * jnr indices corresponding to data put in the four positions in the SIMD register.
1186 int i_shift_offset,i_coord_offset,outeriter,inneriter;
1187 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
1189 int j_coord_offsetA,j_coord_offsetB;
1190 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
1191 real rcutoff_scalar;
1192 real *shiftvec,*fshift,*x,*f;
1193 _fjsp_v2r8 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
1195 _fjsp_v2r8 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
1197 _fjsp_v2r8 ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
1199 _fjsp_v2r8 ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
1200 int vdwjidx0A,vdwjidx0B;
1201 _fjsp_v2r8 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
1202 int vdwjidx1A,vdwjidx1B;
1203 _fjsp_v2r8 jx1,jy1,jz1,fjx1,fjy1,fjz1,jq1,isaj1;
1204 int vdwjidx2A,vdwjidx2B;
1205 _fjsp_v2r8 jx2,jy2,jz2,fjx2,fjy2,fjz2,jq2,isaj2;
1206 _fjsp_v2r8 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
1207 _fjsp_v2r8 dx01,dy01,dz01,rsq01,rinv01,rinvsq01,r01,qq01,c6_01,c12_01;
1208 _fjsp_v2r8 dx02,dy02,dz02,rsq02,rinv02,rinvsq02,r02,qq02,c6_02,c12_02;
1209 _fjsp_v2r8 dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10;
1210 _fjsp_v2r8 dx11,dy11,dz11,rsq11,rinv11,rinvsq11,r11,qq11,c6_11,c12_11;
1211 _fjsp_v2r8 dx12,dy12,dz12,rsq12,rinv12,rinvsq12,r12,qq12,c6_12,c12_12;
1212 _fjsp_v2r8 dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20;
1213 _fjsp_v2r8 dx21,dy21,dz21,rsq21,rinv21,rinvsq21,r21,qq21,c6_21,c12_21;
1214 _fjsp_v2r8 dx22,dy22,dz22,rsq22,rinv22,rinvsq22,r22,qq22,c6_22,c12_22;
1215 _fjsp_v2r8 velec,felec,velecsum,facel,crf,krf,krf2;
1217 _fjsp_v2r8 rt,vfeps,vftabscale,Y,F,G,H,Heps,Fp,VV,FF,twovfeps;
1219 _fjsp_v2r8 itab_tmp;
1220 _fjsp_v2r8 dummy_mask,cutoff_mask;
1221 _fjsp_v2r8 one = gmx_fjsp_set1_v2r8(1.0);
1222 _fjsp_v2r8 two = gmx_fjsp_set1_v2r8(2.0);
1223 union { _fjsp_v2r8 simd; long long int i[2]; } vfconv,gbconv,ewconv;
1230 jindex = nlist->jindex;
1232 shiftidx = nlist->shift;
1234 shiftvec = fr->shift_vec[0];
1235 fshift = fr->fshift[0];
1236 facel = gmx_fjsp_set1_v2r8(fr->epsfac);
1237 charge = mdatoms->chargeA;
1239 vftab = kernel_data->table_elec->data;
1240 vftabscale = gmx_fjsp_set1_v2r8(kernel_data->table_elec->scale);
1242 /* Setup water-specific parameters */
1243 inr = nlist->iinr[0];
1244 iq0 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+0]));
1245 iq1 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+1]));
1246 iq2 = _fjsp_mul_v2r8(facel,gmx_fjsp_set1_v2r8(charge[inr+2]));
1248 jq0 = gmx_fjsp_set1_v2r8(charge[inr+0]);
1249 jq1 = gmx_fjsp_set1_v2r8(charge[inr+1]);
1250 jq2 = gmx_fjsp_set1_v2r8(charge[inr+2]);
1251 qq00 = _fjsp_mul_v2r8(iq0,jq0);
1252 qq01 = _fjsp_mul_v2r8(iq0,jq1);
1253 qq02 = _fjsp_mul_v2r8(iq0,jq2);
1254 qq10 = _fjsp_mul_v2r8(iq1,jq0);
1255 qq11 = _fjsp_mul_v2r8(iq1,jq1);
1256 qq12 = _fjsp_mul_v2r8(iq1,jq2);
1257 qq20 = _fjsp_mul_v2r8(iq2,jq0);
1258 qq21 = _fjsp_mul_v2r8(iq2,jq1);
1259 qq22 = _fjsp_mul_v2r8(iq2,jq2);
1261 /* Avoid stupid compiler warnings */
1263 j_coord_offsetA = 0;
1264 j_coord_offsetB = 0;
1269 /* Start outer loop over neighborlists */
1270 for(iidx=0; iidx<nri; iidx++)
1272 /* Load shift vector for this list */
1273 i_shift_offset = DIM*shiftidx[iidx];
1275 /* Load limits for loop over neighbors */
1276 j_index_start = jindex[iidx];
1277 j_index_end = jindex[iidx+1];
1279 /* Get outer coordinate index */
1281 i_coord_offset = DIM*inr;
1283 /* Load i particle coords and add shift vector */
1284 gmx_fjsp_load_shift_and_3rvec_broadcast_v2r8(shiftvec+i_shift_offset,x+i_coord_offset,
1285 &ix0,&iy0,&iz0,&ix1,&iy1,&iz1,&ix2,&iy2,&iz2);
1287 fix0 = _fjsp_setzero_v2r8();
1288 fiy0 = _fjsp_setzero_v2r8();
1289 fiz0 = _fjsp_setzero_v2r8();
1290 fix1 = _fjsp_setzero_v2r8();
1291 fiy1 = _fjsp_setzero_v2r8();
1292 fiz1 = _fjsp_setzero_v2r8();
1293 fix2 = _fjsp_setzero_v2r8();
1294 fiy2 = _fjsp_setzero_v2r8();
1295 fiz2 = _fjsp_setzero_v2r8();
1297 /* Start inner kernel loop */
1298 for(jidx=j_index_start; jidx<j_index_end-1; jidx+=2)
1301 /* Get j neighbor index, and coordinate index */
1303 jnrB = jjnr[jidx+1];
1304 j_coord_offsetA = DIM*jnrA;
1305 j_coord_offsetB = DIM*jnrB;
1307 /* load j atom coordinates */
1308 gmx_fjsp_load_3rvec_2ptr_swizzle_v2r8(x+j_coord_offsetA,x+j_coord_offsetB,
1309 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
1311 /* Calculate displacement vector */
1312 dx00 = _fjsp_sub_v2r8(ix0,jx0);
1313 dy00 = _fjsp_sub_v2r8(iy0,jy0);
1314 dz00 = _fjsp_sub_v2r8(iz0,jz0);
1315 dx01 = _fjsp_sub_v2r8(ix0,jx1);
1316 dy01 = _fjsp_sub_v2r8(iy0,jy1);
1317 dz01 = _fjsp_sub_v2r8(iz0,jz1);
1318 dx02 = _fjsp_sub_v2r8(ix0,jx2);
1319 dy02 = _fjsp_sub_v2r8(iy0,jy2);
1320 dz02 = _fjsp_sub_v2r8(iz0,jz2);
1321 dx10 = _fjsp_sub_v2r8(ix1,jx0);
1322 dy10 = _fjsp_sub_v2r8(iy1,jy0);
1323 dz10 = _fjsp_sub_v2r8(iz1,jz0);
1324 dx11 = _fjsp_sub_v2r8(ix1,jx1);
1325 dy11 = _fjsp_sub_v2r8(iy1,jy1);
1326 dz11 = _fjsp_sub_v2r8(iz1,jz1);
1327 dx12 = _fjsp_sub_v2r8(ix1,jx2);
1328 dy12 = _fjsp_sub_v2r8(iy1,jy2);
1329 dz12 = _fjsp_sub_v2r8(iz1,jz2);
1330 dx20 = _fjsp_sub_v2r8(ix2,jx0);
1331 dy20 = _fjsp_sub_v2r8(iy2,jy0);
1332 dz20 = _fjsp_sub_v2r8(iz2,jz0);
1333 dx21 = _fjsp_sub_v2r8(ix2,jx1);
1334 dy21 = _fjsp_sub_v2r8(iy2,jy1);
1335 dz21 = _fjsp_sub_v2r8(iz2,jz1);
1336 dx22 = _fjsp_sub_v2r8(ix2,jx2);
1337 dy22 = _fjsp_sub_v2r8(iy2,jy2);
1338 dz22 = _fjsp_sub_v2r8(iz2,jz2);
1340 /* Calculate squared distance and things based on it */
1341 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
1342 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
1343 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
1344 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
1345 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
1346 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
1347 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
1348 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
1349 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
1351 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
1352 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
1353 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
1354 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
1355 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
1356 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
1357 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
1358 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
1359 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
1361 fjx0 = _fjsp_setzero_v2r8();
1362 fjy0 = _fjsp_setzero_v2r8();
1363 fjz0 = _fjsp_setzero_v2r8();
1364 fjx1 = _fjsp_setzero_v2r8();
1365 fjy1 = _fjsp_setzero_v2r8();
1366 fjz1 = _fjsp_setzero_v2r8();
1367 fjx2 = _fjsp_setzero_v2r8();
1368 fjy2 = _fjsp_setzero_v2r8();
1369 fjz2 = _fjsp_setzero_v2r8();
1371 /**************************
1372 * CALCULATE INTERACTIONS *
1373 **************************/
1375 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
1377 /* Calculate table index by multiplying r with table scale and truncate to integer */
1378 rt = _fjsp_mul_v2r8(r00,vftabscale);
1379 itab_tmp = _fjsp_dtox_v2r8(rt);
1380 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1381 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1382 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1387 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1388 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1389 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1390 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1391 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1392 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1393 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1394 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1395 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1396 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,FF),_fjsp_mul_v2r8(vftabscale,rinv00)));
1400 /* Update vectorial force */
1401 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
1402 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
1403 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
1405 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
1406 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
1407 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
1409 /**************************
1410 * CALCULATE INTERACTIONS *
1411 **************************/
1413 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
1415 /* Calculate table index by multiplying r with table scale and truncate to integer */
1416 rt = _fjsp_mul_v2r8(r01,vftabscale);
1417 itab_tmp = _fjsp_dtox_v2r8(rt);
1418 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1419 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1420 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1425 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1426 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1427 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1428 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1429 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1430 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1431 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1432 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1433 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1434 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,FF),_fjsp_mul_v2r8(vftabscale,rinv01)));
1438 /* Update vectorial force */
1439 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
1440 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
1441 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
1443 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
1444 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
1445 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
1447 /**************************
1448 * CALCULATE INTERACTIONS *
1449 **************************/
1451 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
1453 /* Calculate table index by multiplying r with table scale and truncate to integer */
1454 rt = _fjsp_mul_v2r8(r02,vftabscale);
1455 itab_tmp = _fjsp_dtox_v2r8(rt);
1456 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1457 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1458 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1463 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1464 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1465 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1466 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1467 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1468 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1469 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1470 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1471 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1472 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,FF),_fjsp_mul_v2r8(vftabscale,rinv02)));
1476 /* Update vectorial force */
1477 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
1478 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
1479 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
1481 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
1482 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
1483 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
1485 /**************************
1486 * CALCULATE INTERACTIONS *
1487 **************************/
1489 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
1491 /* Calculate table index by multiplying r with table scale and truncate to integer */
1492 rt = _fjsp_mul_v2r8(r10,vftabscale);
1493 itab_tmp = _fjsp_dtox_v2r8(rt);
1494 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1495 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1496 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1501 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1502 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1503 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1504 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1505 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1506 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1507 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1508 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1509 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1510 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,FF),_fjsp_mul_v2r8(vftabscale,rinv10)));
1514 /* Update vectorial force */
1515 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
1516 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
1517 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
1519 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
1520 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
1521 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
1523 /**************************
1524 * CALCULATE INTERACTIONS *
1525 **************************/
1527 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
1529 /* Calculate table index by multiplying r with table scale and truncate to integer */
1530 rt = _fjsp_mul_v2r8(r11,vftabscale);
1531 itab_tmp = _fjsp_dtox_v2r8(rt);
1532 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1533 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1534 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1539 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1540 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1541 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1542 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1543 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1544 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1545 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1546 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1547 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1548 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,FF),_fjsp_mul_v2r8(vftabscale,rinv11)));
1552 /* Update vectorial force */
1553 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
1554 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
1555 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
1557 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
1558 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
1559 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
1561 /**************************
1562 * CALCULATE INTERACTIONS *
1563 **************************/
1565 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
1567 /* Calculate table index by multiplying r with table scale and truncate to integer */
1568 rt = _fjsp_mul_v2r8(r12,vftabscale);
1569 itab_tmp = _fjsp_dtox_v2r8(rt);
1570 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1571 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1572 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1577 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1578 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1579 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1580 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1581 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1582 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1583 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1584 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1585 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1586 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,FF),_fjsp_mul_v2r8(vftabscale,rinv12)));
1590 /* Update vectorial force */
1591 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
1592 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
1593 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
1595 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
1596 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
1597 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
1599 /**************************
1600 * CALCULATE INTERACTIONS *
1601 **************************/
1603 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
1605 /* Calculate table index by multiplying r with table scale and truncate to integer */
1606 rt = _fjsp_mul_v2r8(r20,vftabscale);
1607 itab_tmp = _fjsp_dtox_v2r8(rt);
1608 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1609 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1610 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1615 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1616 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1617 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1618 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1619 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1620 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1621 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1622 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1623 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1624 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,FF),_fjsp_mul_v2r8(vftabscale,rinv20)));
1628 /* Update vectorial force */
1629 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
1630 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
1631 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
1633 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
1634 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
1635 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
1637 /**************************
1638 * CALCULATE INTERACTIONS *
1639 **************************/
1641 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
1643 /* Calculate table index by multiplying r with table scale and truncate to integer */
1644 rt = _fjsp_mul_v2r8(r21,vftabscale);
1645 itab_tmp = _fjsp_dtox_v2r8(rt);
1646 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1647 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1648 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1653 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1654 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1655 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1656 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1657 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1658 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1659 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1660 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1661 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1662 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,FF),_fjsp_mul_v2r8(vftabscale,rinv21)));
1666 /* Update vectorial force */
1667 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
1668 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
1669 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
1671 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
1672 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
1673 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
1675 /**************************
1676 * CALCULATE INTERACTIONS *
1677 **************************/
1679 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
1681 /* Calculate table index by multiplying r with table scale and truncate to integer */
1682 rt = _fjsp_mul_v2r8(r22,vftabscale);
1683 itab_tmp = _fjsp_dtox_v2r8(rt);
1684 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1685 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1686 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1691 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1692 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1693 F = _fjsp_load_v2r8( vftab + vfconv.i[1] );
1694 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1695 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1696 H = _fjsp_load_v2r8( vftab + vfconv.i[1] +2);
1697 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1698 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1699 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1700 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,FF),_fjsp_mul_v2r8(vftabscale,rinv22)));
1704 /* Update vectorial force */
1705 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
1706 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
1707 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
1709 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
1710 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
1711 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
1713 gmx_fjsp_decrement_3rvec_2ptr_swizzle_v2r8(f+j_coord_offsetA,f+j_coord_offsetB,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
1715 /* Inner loop uses 378 flops */
1718 if(jidx<j_index_end)
1722 j_coord_offsetA = DIM*jnrA;
1724 /* load j atom coordinates */
1725 gmx_fjsp_load_3rvec_1ptr_swizzle_v2r8(x+j_coord_offsetA,
1726 &jx0,&jy0,&jz0,&jx1,&jy1,&jz1,&jx2,&jy2,&jz2);
1728 /* Calculate displacement vector */
1729 dx00 = _fjsp_sub_v2r8(ix0,jx0);
1730 dy00 = _fjsp_sub_v2r8(iy0,jy0);
1731 dz00 = _fjsp_sub_v2r8(iz0,jz0);
1732 dx01 = _fjsp_sub_v2r8(ix0,jx1);
1733 dy01 = _fjsp_sub_v2r8(iy0,jy1);
1734 dz01 = _fjsp_sub_v2r8(iz0,jz1);
1735 dx02 = _fjsp_sub_v2r8(ix0,jx2);
1736 dy02 = _fjsp_sub_v2r8(iy0,jy2);
1737 dz02 = _fjsp_sub_v2r8(iz0,jz2);
1738 dx10 = _fjsp_sub_v2r8(ix1,jx0);
1739 dy10 = _fjsp_sub_v2r8(iy1,jy0);
1740 dz10 = _fjsp_sub_v2r8(iz1,jz0);
1741 dx11 = _fjsp_sub_v2r8(ix1,jx1);
1742 dy11 = _fjsp_sub_v2r8(iy1,jy1);
1743 dz11 = _fjsp_sub_v2r8(iz1,jz1);
1744 dx12 = _fjsp_sub_v2r8(ix1,jx2);
1745 dy12 = _fjsp_sub_v2r8(iy1,jy2);
1746 dz12 = _fjsp_sub_v2r8(iz1,jz2);
1747 dx20 = _fjsp_sub_v2r8(ix2,jx0);
1748 dy20 = _fjsp_sub_v2r8(iy2,jy0);
1749 dz20 = _fjsp_sub_v2r8(iz2,jz0);
1750 dx21 = _fjsp_sub_v2r8(ix2,jx1);
1751 dy21 = _fjsp_sub_v2r8(iy2,jy1);
1752 dz21 = _fjsp_sub_v2r8(iz2,jz1);
1753 dx22 = _fjsp_sub_v2r8(ix2,jx2);
1754 dy22 = _fjsp_sub_v2r8(iy2,jy2);
1755 dz22 = _fjsp_sub_v2r8(iz2,jz2);
1757 /* Calculate squared distance and things based on it */
1758 rsq00 = gmx_fjsp_calc_rsq_v2r8(dx00,dy00,dz00);
1759 rsq01 = gmx_fjsp_calc_rsq_v2r8(dx01,dy01,dz01);
1760 rsq02 = gmx_fjsp_calc_rsq_v2r8(dx02,dy02,dz02);
1761 rsq10 = gmx_fjsp_calc_rsq_v2r8(dx10,dy10,dz10);
1762 rsq11 = gmx_fjsp_calc_rsq_v2r8(dx11,dy11,dz11);
1763 rsq12 = gmx_fjsp_calc_rsq_v2r8(dx12,dy12,dz12);
1764 rsq20 = gmx_fjsp_calc_rsq_v2r8(dx20,dy20,dz20);
1765 rsq21 = gmx_fjsp_calc_rsq_v2r8(dx21,dy21,dz21);
1766 rsq22 = gmx_fjsp_calc_rsq_v2r8(dx22,dy22,dz22);
1768 rinv00 = gmx_fjsp_invsqrt_v2r8(rsq00);
1769 rinv01 = gmx_fjsp_invsqrt_v2r8(rsq01);
1770 rinv02 = gmx_fjsp_invsqrt_v2r8(rsq02);
1771 rinv10 = gmx_fjsp_invsqrt_v2r8(rsq10);
1772 rinv11 = gmx_fjsp_invsqrt_v2r8(rsq11);
1773 rinv12 = gmx_fjsp_invsqrt_v2r8(rsq12);
1774 rinv20 = gmx_fjsp_invsqrt_v2r8(rsq20);
1775 rinv21 = gmx_fjsp_invsqrt_v2r8(rsq21);
1776 rinv22 = gmx_fjsp_invsqrt_v2r8(rsq22);
1778 fjx0 = _fjsp_setzero_v2r8();
1779 fjy0 = _fjsp_setzero_v2r8();
1780 fjz0 = _fjsp_setzero_v2r8();
1781 fjx1 = _fjsp_setzero_v2r8();
1782 fjy1 = _fjsp_setzero_v2r8();
1783 fjz1 = _fjsp_setzero_v2r8();
1784 fjx2 = _fjsp_setzero_v2r8();
1785 fjy2 = _fjsp_setzero_v2r8();
1786 fjz2 = _fjsp_setzero_v2r8();
1788 /**************************
1789 * CALCULATE INTERACTIONS *
1790 **************************/
1792 r00 = _fjsp_mul_v2r8(rsq00,rinv00);
1794 /* Calculate table index by multiplying r with table scale and truncate to integer */
1795 rt = _fjsp_mul_v2r8(r00,vftabscale);
1796 itab_tmp = _fjsp_dtox_v2r8(rt);
1797 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1798 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1799 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1804 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1805 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1806 F = _fjsp_setzero_v2r8();
1807 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1808 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1809 H = _fjsp_setzero_v2r8();
1810 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1811 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1812 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1813 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq00,FF),_fjsp_mul_v2r8(vftabscale,rinv00)));
1817 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1819 /* Update vectorial force */
1820 fix0 = _fjsp_madd_v2r8(dx00,fscal,fix0);
1821 fiy0 = _fjsp_madd_v2r8(dy00,fscal,fiy0);
1822 fiz0 = _fjsp_madd_v2r8(dz00,fscal,fiz0);
1824 fjx0 = _fjsp_madd_v2r8(dx00,fscal,fjx0);
1825 fjy0 = _fjsp_madd_v2r8(dy00,fscal,fjy0);
1826 fjz0 = _fjsp_madd_v2r8(dz00,fscal,fjz0);
1828 /**************************
1829 * CALCULATE INTERACTIONS *
1830 **************************/
1832 r01 = _fjsp_mul_v2r8(rsq01,rinv01);
1834 /* Calculate table index by multiplying r with table scale and truncate to integer */
1835 rt = _fjsp_mul_v2r8(r01,vftabscale);
1836 itab_tmp = _fjsp_dtox_v2r8(rt);
1837 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1838 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1839 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1844 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1845 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1846 F = _fjsp_setzero_v2r8();
1847 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1848 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1849 H = _fjsp_setzero_v2r8();
1850 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1851 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1852 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1853 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq01,FF),_fjsp_mul_v2r8(vftabscale,rinv01)));
1857 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1859 /* Update vectorial force */
1860 fix0 = _fjsp_madd_v2r8(dx01,fscal,fix0);
1861 fiy0 = _fjsp_madd_v2r8(dy01,fscal,fiy0);
1862 fiz0 = _fjsp_madd_v2r8(dz01,fscal,fiz0);
1864 fjx1 = _fjsp_madd_v2r8(dx01,fscal,fjx1);
1865 fjy1 = _fjsp_madd_v2r8(dy01,fscal,fjy1);
1866 fjz1 = _fjsp_madd_v2r8(dz01,fscal,fjz1);
1868 /**************************
1869 * CALCULATE INTERACTIONS *
1870 **************************/
1872 r02 = _fjsp_mul_v2r8(rsq02,rinv02);
1874 /* Calculate table index by multiplying r with table scale and truncate to integer */
1875 rt = _fjsp_mul_v2r8(r02,vftabscale);
1876 itab_tmp = _fjsp_dtox_v2r8(rt);
1877 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1878 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1879 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1884 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1885 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1886 F = _fjsp_setzero_v2r8();
1887 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1888 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1889 H = _fjsp_setzero_v2r8();
1890 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1891 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1892 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1893 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq02,FF),_fjsp_mul_v2r8(vftabscale,rinv02)));
1897 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1899 /* Update vectorial force */
1900 fix0 = _fjsp_madd_v2r8(dx02,fscal,fix0);
1901 fiy0 = _fjsp_madd_v2r8(dy02,fscal,fiy0);
1902 fiz0 = _fjsp_madd_v2r8(dz02,fscal,fiz0);
1904 fjx2 = _fjsp_madd_v2r8(dx02,fscal,fjx2);
1905 fjy2 = _fjsp_madd_v2r8(dy02,fscal,fjy2);
1906 fjz2 = _fjsp_madd_v2r8(dz02,fscal,fjz2);
1908 /**************************
1909 * CALCULATE INTERACTIONS *
1910 **************************/
1912 r10 = _fjsp_mul_v2r8(rsq10,rinv10);
1914 /* Calculate table index by multiplying r with table scale and truncate to integer */
1915 rt = _fjsp_mul_v2r8(r10,vftabscale);
1916 itab_tmp = _fjsp_dtox_v2r8(rt);
1917 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1918 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1919 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1924 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1925 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1926 F = _fjsp_setzero_v2r8();
1927 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1928 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1929 H = _fjsp_setzero_v2r8();
1930 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1931 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1932 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1933 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq10,FF),_fjsp_mul_v2r8(vftabscale,rinv10)));
1937 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1939 /* Update vectorial force */
1940 fix1 = _fjsp_madd_v2r8(dx10,fscal,fix1);
1941 fiy1 = _fjsp_madd_v2r8(dy10,fscal,fiy1);
1942 fiz1 = _fjsp_madd_v2r8(dz10,fscal,fiz1);
1944 fjx0 = _fjsp_madd_v2r8(dx10,fscal,fjx0);
1945 fjy0 = _fjsp_madd_v2r8(dy10,fscal,fjy0);
1946 fjz0 = _fjsp_madd_v2r8(dz10,fscal,fjz0);
1948 /**************************
1949 * CALCULATE INTERACTIONS *
1950 **************************/
1952 r11 = _fjsp_mul_v2r8(rsq11,rinv11);
1954 /* Calculate table index by multiplying r with table scale and truncate to integer */
1955 rt = _fjsp_mul_v2r8(r11,vftabscale);
1956 itab_tmp = _fjsp_dtox_v2r8(rt);
1957 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1958 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1959 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
1964 /* CUBIC SPLINE TABLE ELECTROSTATICS */
1965 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
1966 F = _fjsp_setzero_v2r8();
1967 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
1968 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
1969 H = _fjsp_setzero_v2r8();
1970 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
1971 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
1972 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
1973 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq11,FF),_fjsp_mul_v2r8(vftabscale,rinv11)));
1977 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
1979 /* Update vectorial force */
1980 fix1 = _fjsp_madd_v2r8(dx11,fscal,fix1);
1981 fiy1 = _fjsp_madd_v2r8(dy11,fscal,fiy1);
1982 fiz1 = _fjsp_madd_v2r8(dz11,fscal,fiz1);
1984 fjx1 = _fjsp_madd_v2r8(dx11,fscal,fjx1);
1985 fjy1 = _fjsp_madd_v2r8(dy11,fscal,fjy1);
1986 fjz1 = _fjsp_madd_v2r8(dz11,fscal,fjz1);
1988 /**************************
1989 * CALCULATE INTERACTIONS *
1990 **************************/
1992 r12 = _fjsp_mul_v2r8(rsq12,rinv12);
1994 /* Calculate table index by multiplying r with table scale and truncate to integer */
1995 rt = _fjsp_mul_v2r8(r12,vftabscale);
1996 itab_tmp = _fjsp_dtox_v2r8(rt);
1997 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
1998 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
1999 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
2004 /* CUBIC SPLINE TABLE ELECTROSTATICS */
2005 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
2006 F = _fjsp_setzero_v2r8();
2007 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
2008 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
2009 H = _fjsp_setzero_v2r8();
2010 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
2011 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
2012 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
2013 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq12,FF),_fjsp_mul_v2r8(vftabscale,rinv12)));
2017 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
2019 /* Update vectorial force */
2020 fix1 = _fjsp_madd_v2r8(dx12,fscal,fix1);
2021 fiy1 = _fjsp_madd_v2r8(dy12,fscal,fiy1);
2022 fiz1 = _fjsp_madd_v2r8(dz12,fscal,fiz1);
2024 fjx2 = _fjsp_madd_v2r8(dx12,fscal,fjx2);
2025 fjy2 = _fjsp_madd_v2r8(dy12,fscal,fjy2);
2026 fjz2 = _fjsp_madd_v2r8(dz12,fscal,fjz2);
2028 /**************************
2029 * CALCULATE INTERACTIONS *
2030 **************************/
2032 r20 = _fjsp_mul_v2r8(rsq20,rinv20);
2034 /* Calculate table index by multiplying r with table scale and truncate to integer */
2035 rt = _fjsp_mul_v2r8(r20,vftabscale);
2036 itab_tmp = _fjsp_dtox_v2r8(rt);
2037 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
2038 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
2039 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
2044 /* CUBIC SPLINE TABLE ELECTROSTATICS */
2045 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
2046 F = _fjsp_setzero_v2r8();
2047 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
2048 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
2049 H = _fjsp_setzero_v2r8();
2050 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
2051 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
2052 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
2053 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq20,FF),_fjsp_mul_v2r8(vftabscale,rinv20)));
2057 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
2059 /* Update vectorial force */
2060 fix2 = _fjsp_madd_v2r8(dx20,fscal,fix2);
2061 fiy2 = _fjsp_madd_v2r8(dy20,fscal,fiy2);
2062 fiz2 = _fjsp_madd_v2r8(dz20,fscal,fiz2);
2064 fjx0 = _fjsp_madd_v2r8(dx20,fscal,fjx0);
2065 fjy0 = _fjsp_madd_v2r8(dy20,fscal,fjy0);
2066 fjz0 = _fjsp_madd_v2r8(dz20,fscal,fjz0);
2068 /**************************
2069 * CALCULATE INTERACTIONS *
2070 **************************/
2072 r21 = _fjsp_mul_v2r8(rsq21,rinv21);
2074 /* Calculate table index by multiplying r with table scale and truncate to integer */
2075 rt = _fjsp_mul_v2r8(r21,vftabscale);
2076 itab_tmp = _fjsp_dtox_v2r8(rt);
2077 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
2078 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
2079 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
2084 /* CUBIC SPLINE TABLE ELECTROSTATICS */
2085 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
2086 F = _fjsp_setzero_v2r8();
2087 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
2088 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
2089 H = _fjsp_setzero_v2r8();
2090 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
2091 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
2092 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
2093 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq21,FF),_fjsp_mul_v2r8(vftabscale,rinv21)));
2097 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
2099 /* Update vectorial force */
2100 fix2 = _fjsp_madd_v2r8(dx21,fscal,fix2);
2101 fiy2 = _fjsp_madd_v2r8(dy21,fscal,fiy2);
2102 fiz2 = _fjsp_madd_v2r8(dz21,fscal,fiz2);
2104 fjx1 = _fjsp_madd_v2r8(dx21,fscal,fjx1);
2105 fjy1 = _fjsp_madd_v2r8(dy21,fscal,fjy1);
2106 fjz1 = _fjsp_madd_v2r8(dz21,fscal,fjz1);
2108 /**************************
2109 * CALCULATE INTERACTIONS *
2110 **************************/
2112 r22 = _fjsp_mul_v2r8(rsq22,rinv22);
2114 /* Calculate table index by multiplying r with table scale and truncate to integer */
2115 rt = _fjsp_mul_v2r8(r22,vftabscale);
2116 itab_tmp = _fjsp_dtox_v2r8(rt);
2117 vfeps = _fjsp_sub_v2r8(rt, _fjsp_xtod_v2r8(itab_tmp));
2118 twovfeps = _fjsp_add_v2r8(vfeps,vfeps);
2119 _fjsp_store_v2r8(&vfconv.simd,itab_tmp);
2124 /* CUBIC SPLINE TABLE ELECTROSTATICS */
2125 Y = _fjsp_load_v2r8( vftab + vfconv.i[0] );
2126 F = _fjsp_setzero_v2r8();
2127 GMX_FJSP_TRANSPOSE2_V2R8(Y,F);
2128 G = _fjsp_load_v2r8( vftab + vfconv.i[0] +2);
2129 H = _fjsp_setzero_v2r8();
2130 GMX_FJSP_TRANSPOSE2_V2R8(G,H);
2131 Fp = _fjsp_madd_v2r8(vfeps,_fjsp_madd_v2r8(vfeps,H,G),F);
2132 FF = _fjsp_madd_v2r8(_fjsp_madd_v2r8(twovfeps,H,G),vfeps,Fp);
2133 felec = _fjsp_neg_v2r8(_fjsp_mul_v2r8(_fjsp_mul_v2r8(qq22,FF),_fjsp_mul_v2r8(vftabscale,rinv22)));
2137 fscal = _fjsp_unpacklo_v2r8(fscal,_fjsp_setzero_v2r8());
2139 /* Update vectorial force */
2140 fix2 = _fjsp_madd_v2r8(dx22,fscal,fix2);
2141 fiy2 = _fjsp_madd_v2r8(dy22,fscal,fiy2);
2142 fiz2 = _fjsp_madd_v2r8(dz22,fscal,fiz2);
2144 fjx2 = _fjsp_madd_v2r8(dx22,fscal,fjx2);
2145 fjy2 = _fjsp_madd_v2r8(dy22,fscal,fjy2);
2146 fjz2 = _fjsp_madd_v2r8(dz22,fscal,fjz2);
2148 gmx_fjsp_decrement_3rvec_1ptr_swizzle_v2r8(f+j_coord_offsetA,fjx0,fjy0,fjz0,fjx1,fjy1,fjz1,fjx2,fjy2,fjz2);
2150 /* Inner loop uses 378 flops */
2153 /* End of innermost loop */
2155 gmx_fjsp_update_iforce_3atom_swizzle_v2r8(fix0,fiy0,fiz0,fix1,fiy1,fiz1,fix2,fiy2,fiz2,
2156 f+i_coord_offset,fshift+i_shift_offset);
2158 /* Increment number of inner iterations */
2159 inneriter += j_index_end - j_index_start;
2161 /* Outer loop uses 18 flops */
2164 /* Increment number of outer iterations */
2167 /* Update outer/inner flops */
2169 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_W3W3_F,outeriter*18 + inneriter*378);