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.
42 #include "../nb_kernel.h"
43 #include "gromacs/legacyheaders/types/simple.h"
44 #include "gromacs/math/vec.h"
45 #include "gromacs/legacyheaders/nrnb.h"
47 #include "gromacs/simd/math_x86_sse4_1_single.h"
48 #include "kernelutil_x86_sse4_1_single.h"
51 * Gromacs nonbonded kernel: nb_kernel_ElecNone_VdwLJ_GeomP1P1_VF_sse4_1_single
52 * Electrostatics interaction: None
53 * VdW interaction: LennardJones
54 * Geometry: Particle-Particle
55 * Calculate force/pot: PotentialAndForce
58 nb_kernel_ElecNone_VdwLJ_GeomP1P1_VF_sse4_1_single
59 (t_nblist * gmx_restrict nlist,
60 rvec * gmx_restrict xx,
61 rvec * gmx_restrict ff,
62 t_forcerec * gmx_restrict fr,
63 t_mdatoms * gmx_restrict mdatoms,
64 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
65 t_nrnb * gmx_restrict nrnb)
67 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
68 * just 0 for non-waters.
69 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
70 * jnr indices corresponding to data put in the four positions in the SIMD register.
72 int i_shift_offset,i_coord_offset,outeriter,inneriter;
73 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
74 int jnrA,jnrB,jnrC,jnrD;
75 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
76 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
77 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
79 real *shiftvec,*fshift,*x,*f;
80 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
82 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
84 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
85 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
86 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
87 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
89 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
92 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
93 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
94 __m128 dummy_mask,cutoff_mask;
95 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
96 __m128 one = _mm_set1_ps(1.0);
97 __m128 two = _mm_set1_ps(2.0);
103 jindex = nlist->jindex;
105 shiftidx = nlist->shift;
107 shiftvec = fr->shift_vec[0];
108 fshift = fr->fshift[0];
109 nvdwtype = fr->ntype;
111 vdwtype = mdatoms->typeA;
113 /* Avoid stupid compiler warnings */
114 jnrA = jnrB = jnrC = jnrD = 0;
123 for(iidx=0;iidx<4*DIM;iidx++)
128 /* Start outer loop over neighborlists */
129 for(iidx=0; iidx<nri; iidx++)
131 /* Load shift vector for this list */
132 i_shift_offset = DIM*shiftidx[iidx];
134 /* Load limits for loop over neighbors */
135 j_index_start = jindex[iidx];
136 j_index_end = jindex[iidx+1];
138 /* Get outer coordinate index */
140 i_coord_offset = DIM*inr;
142 /* Load i particle coords and add shift vector */
143 gmx_mm_load_shift_and_1rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
145 fix0 = _mm_setzero_ps();
146 fiy0 = _mm_setzero_ps();
147 fiz0 = _mm_setzero_ps();
149 /* Load parameters for i particles */
150 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
152 /* Reset potential sums */
153 vvdwsum = _mm_setzero_ps();
155 /* Start inner kernel loop */
156 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
159 /* Get j neighbor index, and coordinate index */
164 j_coord_offsetA = DIM*jnrA;
165 j_coord_offsetB = DIM*jnrB;
166 j_coord_offsetC = DIM*jnrC;
167 j_coord_offsetD = DIM*jnrD;
169 /* load j atom coordinates */
170 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
171 x+j_coord_offsetC,x+j_coord_offsetD,
174 /* Calculate displacement vector */
175 dx00 = _mm_sub_ps(ix0,jx0);
176 dy00 = _mm_sub_ps(iy0,jy0);
177 dz00 = _mm_sub_ps(iz0,jz0);
179 /* Calculate squared distance and things based on it */
180 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
182 rinvsq00 = gmx_mm_inv_ps(rsq00);
184 /* Load parameters for j particles */
185 vdwjidx0A = 2*vdwtype[jnrA+0];
186 vdwjidx0B = 2*vdwtype[jnrB+0];
187 vdwjidx0C = 2*vdwtype[jnrC+0];
188 vdwjidx0D = 2*vdwtype[jnrD+0];
190 /**************************
191 * CALCULATE INTERACTIONS *
192 **************************/
194 /* Compute parameters for interactions between i and j atoms */
195 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
196 vdwparam+vdwioffset0+vdwjidx0B,
197 vdwparam+vdwioffset0+vdwjidx0C,
198 vdwparam+vdwioffset0+vdwjidx0D,
201 /* LENNARD-JONES DISPERSION/REPULSION */
203 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
204 vvdw6 = _mm_mul_ps(c6_00,rinvsix);
205 vvdw12 = _mm_mul_ps(c12_00,_mm_mul_ps(rinvsix,rinvsix));
206 vvdw = _mm_sub_ps( _mm_mul_ps(vvdw12,one_twelfth) , _mm_mul_ps(vvdw6,one_sixth) );
207 fvdw = _mm_mul_ps(_mm_sub_ps(vvdw12,vvdw6),rinvsq00);
209 /* Update potential sum for this i atom from the interaction with this j atom. */
210 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
214 /* Calculate temporary vectorial force */
215 tx = _mm_mul_ps(fscal,dx00);
216 ty = _mm_mul_ps(fscal,dy00);
217 tz = _mm_mul_ps(fscal,dz00);
219 /* Update vectorial force */
220 fix0 = _mm_add_ps(fix0,tx);
221 fiy0 = _mm_add_ps(fiy0,ty);
222 fiz0 = _mm_add_ps(fiz0,tz);
224 fjptrA = f+j_coord_offsetA;
225 fjptrB = f+j_coord_offsetB;
226 fjptrC = f+j_coord_offsetC;
227 fjptrD = f+j_coord_offsetD;
228 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
230 /* Inner loop uses 32 flops */
236 /* Get j neighbor index, and coordinate index */
237 jnrlistA = jjnr[jidx];
238 jnrlistB = jjnr[jidx+1];
239 jnrlistC = jjnr[jidx+2];
240 jnrlistD = jjnr[jidx+3];
241 /* Sign of each element will be negative for non-real atoms.
242 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
243 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
245 dummy_mask = gmx_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
246 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
247 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
248 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
249 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
250 j_coord_offsetA = DIM*jnrA;
251 j_coord_offsetB = DIM*jnrB;
252 j_coord_offsetC = DIM*jnrC;
253 j_coord_offsetD = DIM*jnrD;
255 /* load j atom coordinates */
256 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
257 x+j_coord_offsetC,x+j_coord_offsetD,
260 /* Calculate displacement vector */
261 dx00 = _mm_sub_ps(ix0,jx0);
262 dy00 = _mm_sub_ps(iy0,jy0);
263 dz00 = _mm_sub_ps(iz0,jz0);
265 /* Calculate squared distance and things based on it */
266 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
268 rinvsq00 = gmx_mm_inv_ps(rsq00);
270 /* Load parameters for j particles */
271 vdwjidx0A = 2*vdwtype[jnrA+0];
272 vdwjidx0B = 2*vdwtype[jnrB+0];
273 vdwjidx0C = 2*vdwtype[jnrC+0];
274 vdwjidx0D = 2*vdwtype[jnrD+0];
276 /**************************
277 * CALCULATE INTERACTIONS *
278 **************************/
280 /* Compute parameters for interactions between i and j atoms */
281 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
282 vdwparam+vdwioffset0+vdwjidx0B,
283 vdwparam+vdwioffset0+vdwjidx0C,
284 vdwparam+vdwioffset0+vdwjidx0D,
287 /* LENNARD-JONES DISPERSION/REPULSION */
289 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
290 vvdw6 = _mm_mul_ps(c6_00,rinvsix);
291 vvdw12 = _mm_mul_ps(c12_00,_mm_mul_ps(rinvsix,rinvsix));
292 vvdw = _mm_sub_ps( _mm_mul_ps(vvdw12,one_twelfth) , _mm_mul_ps(vvdw6,one_sixth) );
293 fvdw = _mm_mul_ps(_mm_sub_ps(vvdw12,vvdw6),rinvsq00);
295 /* Update potential sum for this i atom from the interaction with this j atom. */
296 vvdw = _mm_andnot_ps(dummy_mask,vvdw);
297 vvdwsum = _mm_add_ps(vvdwsum,vvdw);
301 fscal = _mm_andnot_ps(dummy_mask,fscal);
303 /* Calculate temporary vectorial force */
304 tx = _mm_mul_ps(fscal,dx00);
305 ty = _mm_mul_ps(fscal,dy00);
306 tz = _mm_mul_ps(fscal,dz00);
308 /* Update vectorial force */
309 fix0 = _mm_add_ps(fix0,tx);
310 fiy0 = _mm_add_ps(fiy0,ty);
311 fiz0 = _mm_add_ps(fiz0,tz);
313 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
314 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
315 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
316 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
317 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
319 /* Inner loop uses 32 flops */
322 /* End of innermost loop */
324 gmx_mm_update_iforce_1atom_swizzle_ps(fix0,fiy0,fiz0,
325 f+i_coord_offset,fshift+i_shift_offset);
328 /* Update potential energies */
329 gmx_mm_update_1pot_ps(vvdwsum,kernel_data->energygrp_vdw+ggid);
331 /* Increment number of inner iterations */
332 inneriter += j_index_end - j_index_start;
334 /* Outer loop uses 7 flops */
337 /* Increment number of outer iterations */
340 /* Update outer/inner flops */
342 inc_nrnb(nrnb,eNR_NBKERNEL_VDW_VF,outeriter*7 + inneriter*32);
345 * Gromacs nonbonded kernel: nb_kernel_ElecNone_VdwLJ_GeomP1P1_F_sse4_1_single
346 * Electrostatics interaction: None
347 * VdW interaction: LennardJones
348 * Geometry: Particle-Particle
349 * Calculate force/pot: Force
352 nb_kernel_ElecNone_VdwLJ_GeomP1P1_F_sse4_1_single
353 (t_nblist * gmx_restrict nlist,
354 rvec * gmx_restrict xx,
355 rvec * gmx_restrict ff,
356 t_forcerec * gmx_restrict fr,
357 t_mdatoms * gmx_restrict mdatoms,
358 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
359 t_nrnb * gmx_restrict nrnb)
361 /* Suffixes 0,1,2,3 refer to particle indices for waters in the inner or outer loop, or
362 * just 0 for non-waters.
363 * Suffixes A,B,C,D refer to j loop unrolling done with SSE, e.g. for the four different
364 * jnr indices corresponding to data put in the four positions in the SIMD register.
366 int i_shift_offset,i_coord_offset,outeriter,inneriter;
367 int j_index_start,j_index_end,jidx,nri,inr,ggid,iidx;
368 int jnrA,jnrB,jnrC,jnrD;
369 int jnrlistA,jnrlistB,jnrlistC,jnrlistD;
370 int j_coord_offsetA,j_coord_offsetB,j_coord_offsetC,j_coord_offsetD;
371 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
373 real *shiftvec,*fshift,*x,*f;
374 real *fjptrA,*fjptrB,*fjptrC,*fjptrD;
376 __m128 tx,ty,tz,fscal,rcutoff,rcutoff2,jidxall;
378 __m128 ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
379 int vdwjidx0A,vdwjidx0B,vdwjidx0C,vdwjidx0D;
380 __m128 jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
381 __m128 dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00;
383 __m128 rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,sh_vdw_invrcut6;
386 __m128 one_sixth = _mm_set1_ps(1.0/6.0);
387 __m128 one_twelfth = _mm_set1_ps(1.0/12.0);
388 __m128 dummy_mask,cutoff_mask;
389 __m128 signbit = _mm_castsi128_ps( _mm_set1_epi32(0x80000000) );
390 __m128 one = _mm_set1_ps(1.0);
391 __m128 two = _mm_set1_ps(2.0);
397 jindex = nlist->jindex;
399 shiftidx = nlist->shift;
401 shiftvec = fr->shift_vec[0];
402 fshift = fr->fshift[0];
403 nvdwtype = fr->ntype;
405 vdwtype = mdatoms->typeA;
407 /* Avoid stupid compiler warnings */
408 jnrA = jnrB = jnrC = jnrD = 0;
417 for(iidx=0;iidx<4*DIM;iidx++)
422 /* Start outer loop over neighborlists */
423 for(iidx=0; iidx<nri; iidx++)
425 /* Load shift vector for this list */
426 i_shift_offset = DIM*shiftidx[iidx];
428 /* Load limits for loop over neighbors */
429 j_index_start = jindex[iidx];
430 j_index_end = jindex[iidx+1];
432 /* Get outer coordinate index */
434 i_coord_offset = DIM*inr;
436 /* Load i particle coords and add shift vector */
437 gmx_mm_load_shift_and_1rvec_broadcast_ps(shiftvec+i_shift_offset,x+i_coord_offset,&ix0,&iy0,&iz0);
439 fix0 = _mm_setzero_ps();
440 fiy0 = _mm_setzero_ps();
441 fiz0 = _mm_setzero_ps();
443 /* Load parameters for i particles */
444 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
446 /* Start inner kernel loop */
447 for(jidx=j_index_start; jidx<j_index_end && jjnr[jidx+3]>=0; jidx+=4)
450 /* Get j neighbor index, and coordinate index */
455 j_coord_offsetA = DIM*jnrA;
456 j_coord_offsetB = DIM*jnrB;
457 j_coord_offsetC = DIM*jnrC;
458 j_coord_offsetD = DIM*jnrD;
460 /* load j atom coordinates */
461 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
462 x+j_coord_offsetC,x+j_coord_offsetD,
465 /* Calculate displacement vector */
466 dx00 = _mm_sub_ps(ix0,jx0);
467 dy00 = _mm_sub_ps(iy0,jy0);
468 dz00 = _mm_sub_ps(iz0,jz0);
470 /* Calculate squared distance and things based on it */
471 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
473 rinvsq00 = gmx_mm_inv_ps(rsq00);
475 /* Load parameters for j particles */
476 vdwjidx0A = 2*vdwtype[jnrA+0];
477 vdwjidx0B = 2*vdwtype[jnrB+0];
478 vdwjidx0C = 2*vdwtype[jnrC+0];
479 vdwjidx0D = 2*vdwtype[jnrD+0];
481 /**************************
482 * CALCULATE INTERACTIONS *
483 **************************/
485 /* Compute parameters for interactions between i and j atoms */
486 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
487 vdwparam+vdwioffset0+vdwjidx0B,
488 vdwparam+vdwioffset0+vdwjidx0C,
489 vdwparam+vdwioffset0+vdwjidx0D,
492 /* LENNARD-JONES DISPERSION/REPULSION */
494 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
495 fvdw = _mm_mul_ps(_mm_sub_ps(_mm_mul_ps(c12_00,rinvsix),c6_00),_mm_mul_ps(rinvsix,rinvsq00));
499 /* Calculate temporary vectorial force */
500 tx = _mm_mul_ps(fscal,dx00);
501 ty = _mm_mul_ps(fscal,dy00);
502 tz = _mm_mul_ps(fscal,dz00);
504 /* Update vectorial force */
505 fix0 = _mm_add_ps(fix0,tx);
506 fiy0 = _mm_add_ps(fiy0,ty);
507 fiz0 = _mm_add_ps(fiz0,tz);
509 fjptrA = f+j_coord_offsetA;
510 fjptrB = f+j_coord_offsetB;
511 fjptrC = f+j_coord_offsetC;
512 fjptrD = f+j_coord_offsetD;
513 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
515 /* Inner loop uses 27 flops */
521 /* Get j neighbor index, and coordinate index */
522 jnrlistA = jjnr[jidx];
523 jnrlistB = jjnr[jidx+1];
524 jnrlistC = jjnr[jidx+2];
525 jnrlistD = jjnr[jidx+3];
526 /* Sign of each element will be negative for non-real atoms.
527 * This mask will be 0xFFFFFFFF for dummy entries and 0x0 for real ones,
528 * so use it as val = _mm_andnot_ps(mask,val) to clear dummy entries.
530 dummy_mask = gmx_mm_castsi128_ps(_mm_cmplt_epi32(_mm_loadu_si128((const __m128i *)(jjnr+jidx)),_mm_setzero_si128()));
531 jnrA = (jnrlistA>=0) ? jnrlistA : 0;
532 jnrB = (jnrlistB>=0) ? jnrlistB : 0;
533 jnrC = (jnrlistC>=0) ? jnrlistC : 0;
534 jnrD = (jnrlistD>=0) ? jnrlistD : 0;
535 j_coord_offsetA = DIM*jnrA;
536 j_coord_offsetB = DIM*jnrB;
537 j_coord_offsetC = DIM*jnrC;
538 j_coord_offsetD = DIM*jnrD;
540 /* load j atom coordinates */
541 gmx_mm_load_1rvec_4ptr_swizzle_ps(x+j_coord_offsetA,x+j_coord_offsetB,
542 x+j_coord_offsetC,x+j_coord_offsetD,
545 /* Calculate displacement vector */
546 dx00 = _mm_sub_ps(ix0,jx0);
547 dy00 = _mm_sub_ps(iy0,jy0);
548 dz00 = _mm_sub_ps(iz0,jz0);
550 /* Calculate squared distance and things based on it */
551 rsq00 = gmx_mm_calc_rsq_ps(dx00,dy00,dz00);
553 rinvsq00 = gmx_mm_inv_ps(rsq00);
555 /* Load parameters for j particles */
556 vdwjidx0A = 2*vdwtype[jnrA+0];
557 vdwjidx0B = 2*vdwtype[jnrB+0];
558 vdwjidx0C = 2*vdwtype[jnrC+0];
559 vdwjidx0D = 2*vdwtype[jnrD+0];
561 /**************************
562 * CALCULATE INTERACTIONS *
563 **************************/
565 /* Compute parameters for interactions between i and j atoms */
566 gmx_mm_load_4pair_swizzle_ps(vdwparam+vdwioffset0+vdwjidx0A,
567 vdwparam+vdwioffset0+vdwjidx0B,
568 vdwparam+vdwioffset0+vdwjidx0C,
569 vdwparam+vdwioffset0+vdwjidx0D,
572 /* LENNARD-JONES DISPERSION/REPULSION */
574 rinvsix = _mm_mul_ps(_mm_mul_ps(rinvsq00,rinvsq00),rinvsq00);
575 fvdw = _mm_mul_ps(_mm_sub_ps(_mm_mul_ps(c12_00,rinvsix),c6_00),_mm_mul_ps(rinvsix,rinvsq00));
579 fscal = _mm_andnot_ps(dummy_mask,fscal);
581 /* Calculate temporary vectorial force */
582 tx = _mm_mul_ps(fscal,dx00);
583 ty = _mm_mul_ps(fscal,dy00);
584 tz = _mm_mul_ps(fscal,dz00);
586 /* Update vectorial force */
587 fix0 = _mm_add_ps(fix0,tx);
588 fiy0 = _mm_add_ps(fiy0,ty);
589 fiz0 = _mm_add_ps(fiz0,tz);
591 fjptrA = (jnrlistA>=0) ? f+j_coord_offsetA : scratch;
592 fjptrB = (jnrlistB>=0) ? f+j_coord_offsetB : scratch;
593 fjptrC = (jnrlistC>=0) ? f+j_coord_offsetC : scratch;
594 fjptrD = (jnrlistD>=0) ? f+j_coord_offsetD : scratch;
595 gmx_mm_decrement_1rvec_4ptr_swizzle_ps(fjptrA,fjptrB,fjptrC,fjptrD,tx,ty,tz);
597 /* Inner loop uses 27 flops */
600 /* End of innermost loop */
602 gmx_mm_update_iforce_1atom_swizzle_ps(fix0,fiy0,fiz0,
603 f+i_coord_offset,fshift+i_shift_offset);
605 /* Increment number of inner iterations */
606 inneriter += j_index_end - j_index_start;
608 /* Outer loop uses 6 flops */
611 /* Increment number of outer iterations */
614 /* Update outer/inner flops */
616 inc_nrnb(nrnb,eNR_NBKERNEL_VDW_F,outeriter*6 + inneriter*27);