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 sse4_1_single kernel generator.
44 #include "../nb_kernel.h"
45 #include "gromacs/legacyheaders/types/simple.h"
46 #include "gromacs/math/vec.h"
47 #include "gromacs/legacyheaders/nrnb.h"
49 #include "gromacs/simd/math_x86_sse4_1_single.h"
50 #include "kernelutil_x86_sse4_1_single.h"
53 * Gromacs nonbonded kernel: nb_kernel_ElecNone_VdwLJ_GeomP1P1_VF_sse4_1_single
54 * Electrostatics interaction: None
55 * VdW interaction: LennardJones
56 * Geometry: Particle-Particle
57 * Calculate force/pot: PotentialAndForce
60 nb_kernel_ElecNone_VdwLJ_GeomP1P1_VF_sse4_1_single
61 (t_nblist * gmx_restrict nlist,
62 rvec * gmx_restrict xx,
63 rvec * gmx_restrict ff,
64 t_forcerec * gmx_restrict fr,
65 t_mdatoms * gmx_restrict mdatoms,
66 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
67 t_nrnb * gmx_restrict nrnb)
69 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
70 * just 0 for non-waters.
71 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
72 * jnr indices corresponding to data put in the four positions in the SIMD register.
74 int i_shift_offset,i_coord_offset,outeriter,inneriter;
75 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
76 int jnrA,jnrB,jnrC,jnrD;
77 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
78 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
79 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
81 real *shiftvec,*fshift,*x,*f;
82 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
84 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
86 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
87 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
88 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
89 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
91 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
94 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
95 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
96 __m128 dummy_mask,cutoff_mask;
97 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
98 __m128 one = _mm_set1_ps(1.0);
99 __m128 two = _mm_set1_ps(2.0);
105 jindex = nlist->jindex;
107 shiftidx = nlist->shift;
109 shiftvec = fr->shift_vec[0];
110 fshift = fr->fshift[0];
111 nvdwtype = fr->ntype;
113 vdwtype = mdatoms->typeA;
115 /* Avoid stupid compiler warnings */
116 jnrA = jnrB = jnrC = jnrD = 0;
125 for(iidx=0;iidx<4*DIM;iidx++)
130 /* Start outer loop over neighborlists */
131 for(iidx=0; iidx<nri; iidx++)
133 /* Load shift vector for this list */
134 i_shift_offset = DIM*shiftidx[iidx];
136 /* Load limits for loop over neighbors */
137 j_index_start = jindex[iidx];
138 j_index_end = jindex[iidx+1];
140 /* Get outer coordinate index */
142 i_coord_offset = DIM*inr;
144 /* Load i particle coords and add shift vector */
145 gmx_mm_load_shift_and_1rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
147 fix0 = _mm_setzero_ps();
148 fiy0 = _mm_setzero_ps();
149 fiz0 = _mm_setzero_ps();
151 /* Load parameters for i particles */
152 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
154 /* Reset potential sums */
155 vvdwsum = _mm_setzero_ps();
157 /* Start inner kernel loop */
158 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
161 /* Get j neighbor index, and coordinate index */
166 j_coord_offsetA = DIM*jnrA;
167 j_coord_offsetB = DIM*jnrB;
168 j_coord_offsetC = DIM*jnrC;
169 j_coord_offsetD = DIM*jnrD;
171 /* load j atom coordinates */
172 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
173 x+j_coord_offsetC,x+j_coord_offsetD,
176 /* Calculate displacement vector */
177 dx00 = _mm_sub_ps(ix0,jx0);
178 dy00 = _mm_sub_ps(iy0,jy0);
179 dz00 = _mm_sub_ps(iz0,jz0);
181 /* Calculate squared distance and things based on it */
182 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
184 rinvsq00 = gmx_mm_inv_ps(rsq00);
186 /* Load parameters for j particles */
187 vdwjidx0A = 2*vdwtype[jnrA+0];
188 vdwjidx0B = 2*vdwtype[jnrB+0];
189 vdwjidx0C = 2*vdwtype[jnrC+0];
190 vdwjidx0D = 2*vdwtype[jnrD+0];
192 /**************************
193 * CALCULATE INTERACTIONS *
194 **************************/
196 /* Compute parameters for interactions between i and j atoms */
197 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
198 vdwparam+vdwioffset0+vdwjidx0B,
199 vdwparam+vdwioffset0+vdwjidx0C,
200 vdwparam+vdwioffset0+vdwjidx0D,
203 /* LENNARD-JONES DISPERSION/REPULSION */
205 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
206 vvdw6 = _mm_mul_ps(c6_00,rinvsix);
207 vvdw12 = _mm_mul_ps(c12_00,_mm_mul_ps(rinvsix,rinvsix));
208 vvdw = _mm_sub_ps( _mm_mul_ps(vvdw12,one_twelfth) , _mm_mul_ps(vvdw6,one_sixth) );
209 fvdw = _mm_mul_ps(_mm_sub_ps(vvdw12,vvdw6),rinvsq00);
211 /* Update potential sum for this i atom from the interaction with this j atom. */
212 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
216 /* Calculate temporary vectorial force */
217 tx = _mm_mul_ps(fscal,dx00);
218 ty = _mm_mul_ps(fscal,dy00);
219 tz = _mm_mul_ps(fscal,dz00);
221 /* Update vectorial force */
222 fix0 = _mm_add_ps(fix0,tx);
223 fiy0 = _mm_add_ps(fiy0,ty);
224 fiz0 = _mm_add_ps(fiz0,tz);
226 fjptrA = f+j_coord_offsetA;
227 fjptrB = f+j_coord_offsetB;
228 fjptrC = f+j_coord_offsetC;
229 fjptrD = f+j_coord_offsetD;
230 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
232 /* Inner loop uses 32 flops */
238 /* Get j neighbor index, and coordinate index */
239 jnrlistA = jjnr[jidx];
240 jnrlistB = jjnr[jidx+1];
241 jnrlistC = jjnr[jidx+2];
242 jnrlistD = jjnr[jidx+3];
243 /* Sign of each element will be negative for non-real atoms.
244 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
245 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
247 dummy_mask = gmx_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
248 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
249 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
250 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
251 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
252 j_coord_offsetA = DIM*jnrA;
253 j_coord_offsetB = DIM*jnrB;
254 j_coord_offsetC = DIM*jnrC;
255 j_coord_offsetD = DIM*jnrD;
257 /* load j atom coordinates */
258 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
259 x+j_coord_offsetC,x+j_coord_offsetD,
262 /* Calculate displacement vector */
263 dx00 = _mm_sub_ps(ix0,jx0);
264 dy00 = _mm_sub_ps(iy0,jy0);
265 dz00 = _mm_sub_ps(iz0,jz0);
267 /* Calculate squared distance and things based on it */
268 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
270 rinvsq00 = gmx_mm_inv_ps(rsq00);
272 /* Load parameters for j particles */
273 vdwjidx0A = 2*vdwtype[jnrA+0];
274 vdwjidx0B = 2*vdwtype[jnrB+0];
275 vdwjidx0C = 2*vdwtype[jnrC+0];
276 vdwjidx0D = 2*vdwtype[jnrD+0];
278 /**************************
279 * CALCULATE INTERACTIONS *
280 **************************/
282 /* Compute parameters for interactions between i and j atoms */
283 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
284 vdwparam+vdwioffset0+vdwjidx0B,
285 vdwparam+vdwioffset0+vdwjidx0C,
286 vdwparam+vdwioffset0+vdwjidx0D,
289 /* LENNARD-JONES DISPERSION/REPULSION */
291 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
292 vvdw6 = _mm_mul_ps(c6_00,rinvsix);
293 vvdw12 = _mm_mul_ps(c12_00,_mm_mul_ps(rinvsix,rinvsix));
294 vvdw = _mm_sub_ps( _mm_mul_ps(vvdw12,one_twelfth) , _mm_mul_ps(vvdw6,one_sixth) );
295 fvdw = _mm_mul_ps(_mm_sub_ps(vvdw12,vvdw6),rinvsq00);
297 /* Update potential sum for this i atom from the interaction with this j atom. */
298 vvdw = _mm_andnot_ps(dummy_mask,vvdw);
299 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
303 fscal = _mm_andnot_ps(dummy_mask,fscal);
305 /* Calculate temporary vectorial force */
306 tx = _mm_mul_ps(fscal,dx00);
307 ty = _mm_mul_ps(fscal,dy00);
308 tz = _mm_mul_ps(fscal,dz00);
310 /* Update vectorial force */
311 fix0 = _mm_add_ps(fix0,tx);
312 fiy0 = _mm_add_ps(fiy0,ty);
313 fiz0 = _mm_add_ps(fiz0,tz);
315 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
316 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
317 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
318 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
319 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
321 /* Inner loop uses 32 flops */
324 /* End of innermost loop */
326 gmx_mm_update_iforce_1atom_swizzle_ps(fix0,fiy0,fiz0,
327 f+i_coord_offset,fshift+i_shift_offset);
330 /* Update potential energies */
331 gmx_mm_update_1pot_ps(vvdwsum,kernel_data->energygrp_vdw+ggid);
333 /* Increment number of inner iterations */
334 inneriter += j_index_end - j_index_start;
336 /* Outer loop uses 7 flops */
339 /* Increment number of outer iterations */
342 /* Update outer/inner flops */
344 inc_nrnb(nrnb,eNR_NBKERNEL_VDW_VF,outeriter*7 + inneriter*32);
347 * Gromacs nonbonded kernel: nb_kernel_ElecNone_VdwLJ_GeomP1P1_F_sse4_1_single
348 * Electrostatics interaction: None
349 * VdW interaction: LennardJones
350 * Geometry: Particle-Particle
351 * Calculate force/pot: Force
354 nb_kernel_ElecNone_VdwLJ_GeomP1P1_F_sse4_1_single
355 (t_nblist * gmx_restrict nlist,
356 rvec * gmx_restrict xx,
357 rvec * gmx_restrict ff,
358 t_forcerec * gmx_restrict fr,
359 t_mdatoms * gmx_restrict mdatoms,
360 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
361 t_nrnb * gmx_restrict nrnb)
363 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
364 * just 0 for non-waters.
365 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
366 * jnr indices corresponding to data put in the four positions in the SIMD register.
368 int i_shift_offset,i_coord_offset,outeriter,inneriter;
369 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
370 int jnrA,jnrB,jnrC,jnrD;
371 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
372 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
373 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
375 real *shiftvec,*fshift,*x,*f;
376 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
378 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
380 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
381 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
382 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
383 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
385 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
388 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
389 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
390 __m128 dummy_mask,cutoff_mask;
391 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
392 __m128 one = _mm_set1_ps(1.0);
393 __m128 two = _mm_set1_ps(2.0);
399 jindex = nlist->jindex;
401 shiftidx = nlist->shift;
403 shiftvec = fr->shift_vec[0];
404 fshift = fr->fshift[0];
405 nvdwtype = fr->ntype;
407 vdwtype = mdatoms->typeA;
409 /* Avoid stupid compiler warnings */
410 jnrA = jnrB = jnrC = jnrD = 0;
419 for(iidx=0;iidx<4*DIM;iidx++)
424 /* Start outer loop over neighborlists */
425 for(iidx=0; iidx<nri; iidx++)
427 /* Load shift vector for this list */
428 i_shift_offset = DIM*shiftidx[iidx];
430 /* Load limits for loop over neighbors */
431 j_index_start = jindex[iidx];
432 j_index_end = jindex[iidx+1];
434 /* Get outer coordinate index */
436 i_coord_offset = DIM*inr;
438 /* Load i particle coords and add shift vector */
439 gmx_mm_load_shift_and_1rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
441 fix0 = _mm_setzero_ps();
442 fiy0 = _mm_setzero_ps();
443 fiz0 = _mm_setzero_ps();
445 /* Load parameters for i particles */
446 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
448 /* Start inner kernel loop */
449 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
452 /* Get j neighbor index, and coordinate index */
457 j_coord_offsetA = DIM*jnrA;
458 j_coord_offsetB = DIM*jnrB;
459 j_coord_offsetC = DIM*jnrC;
460 j_coord_offsetD = DIM*jnrD;
462 /* load j atom coordinates */
463 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
464 x+j_coord_offsetC,x+j_coord_offsetD,
467 /* Calculate displacement vector */
468 dx00 = _mm_sub_ps(ix0,jx0);
469 dy00 = _mm_sub_ps(iy0,jy0);
470 dz00 = _mm_sub_ps(iz0,jz0);
472 /* Calculate squared distance and things based on it */
473 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
475 rinvsq00 = gmx_mm_inv_ps(rsq00);
477 /* Load parameters for j particles */
478 vdwjidx0A = 2*vdwtype[jnrA+0];
479 vdwjidx0B = 2*vdwtype[jnrB+0];
480 vdwjidx0C = 2*vdwtype[jnrC+0];
481 vdwjidx0D = 2*vdwtype[jnrD+0];
483 /**************************
484 * CALCULATE INTERACTIONS *
485 **************************/
487 /* Compute parameters for interactions between i and j atoms */
488 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
489 vdwparam+vdwioffset0+vdwjidx0B,
490 vdwparam+vdwioffset0+vdwjidx0C,
491 vdwparam+vdwioffset0+vdwjidx0D,
494 /* LENNARD-JONES DISPERSION/REPULSION */
496 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
497 fvdw = _mm_mul_ps(_mm_sub_ps(_mm_mul_ps(c12_00,rinvsix),c6_00),_mm_mul_ps(rinvsix,rinvsq00));
501 /* Calculate temporary vectorial force */
502 tx = _mm_mul_ps(fscal,dx00);
503 ty = _mm_mul_ps(fscal,dy00);
504 tz = _mm_mul_ps(fscal,dz00);
506 /* Update vectorial force */
507 fix0 = _mm_add_ps(fix0,tx);
508 fiy0 = _mm_add_ps(fiy0,ty);
509 fiz0 = _mm_add_ps(fiz0,tz);
511 fjptrA = f+j_coord_offsetA;
512 fjptrB = f+j_coord_offsetB;
513 fjptrC = f+j_coord_offsetC;
514 fjptrD = f+j_coord_offsetD;
515 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
517 /* Inner loop uses 27 flops */
523 /* Get j neighbor index, and coordinate index */
524 jnrlistA = jjnr[jidx];
525 jnrlistB = jjnr[jidx+1];
526 jnrlistC = jjnr[jidx+2];
527 jnrlistD = jjnr[jidx+3];
528 /* Sign of each element will be negative for non-real atoms.
529 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
530 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
532 dummy_mask = gmx_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
533 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
534 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
535 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
536 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
537 j_coord_offsetA = DIM*jnrA;
538 j_coord_offsetB = DIM*jnrB;
539 j_coord_offsetC = DIM*jnrC;
540 j_coord_offsetD = DIM*jnrD;
542 /* load j atom coordinates */
543 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
544 x+j_coord_offsetC,x+j_coord_offsetD,
547 /* Calculate displacement vector */
548 dx00 = _mm_sub_ps(ix0,jx0);
549 dy00 = _mm_sub_ps(iy0,jy0);
550 dz00 = _mm_sub_ps(iz0,jz0);
552 /* Calculate squared distance and things based on it */
553 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
555 rinvsq00 = gmx_mm_inv_ps(rsq00);
557 /* Load parameters for j particles */
558 vdwjidx0A = 2*vdwtype[jnrA+0];
559 vdwjidx0B = 2*vdwtype[jnrB+0];
560 vdwjidx0C = 2*vdwtype[jnrC+0];
561 vdwjidx0D = 2*vdwtype[jnrD+0];
563 /**************************
564 * CALCULATE INTERACTIONS *
565 **************************/
567 /* Compute parameters for interactions between i and j atoms */
568 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
569 vdwparam+vdwioffset0+vdwjidx0B,
570 vdwparam+vdwioffset0+vdwjidx0C,
571 vdwparam+vdwioffset0+vdwjidx0D,
574 /* LENNARD-JONES DISPERSION/REPULSION */
576 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
577 fvdw = _mm_mul_ps(_mm_sub_ps(_mm_mul_ps(c12_00,rinvsix),c6_00),_mm_mul_ps(rinvsix,rinvsq00));
581 fscal = _mm_andnot_ps(dummy_mask,fscal);
583 /* Calculate temporary vectorial force */
584 tx = _mm_mul_ps(fscal,dx00);
585 ty = _mm_mul_ps(fscal,dy00);
586 tz = _mm_mul_ps(fscal,dz00);
588 /* Update vectorial force */
589 fix0 = _mm_add_ps(fix0,tx);
590 fiy0 = _mm_add_ps(fiy0,ty);
591 fiz0 = _mm_add_ps(fiz0,tz);
593 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
594 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
595 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
596 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
597 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
599 /* Inner loop uses 27 flops */
602 /* End of innermost loop */
604 gmx_mm_update_iforce_1atom_swizzle_ps(fix0,fiy0,fiz0,
605 f+i_coord_offset,fshift+i_shift_offset);
607 /* Increment number of inner iterations */
608 inneriter += j_index_end - j_index_start;
610 /* Outer loop uses 6 flops */
613 /* Increment number of outer iterations */
616 /* Update outer/inner flops */
618 inc_nrnb(nrnb,eNR_NBKERNEL_VDW_F,outeriter*6 + inneriter*27);