Slight simplifcation of 2xnn
authorRoland Schulz <roland@utk.edu>
Mon, 25 Aug 2014 16:37:25 +0000 (12:37 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 4 Sep 2014 17:20:17 +0000 (19:20 +0200)
Change-Id: Ibca1e9bb2d3a3657fa684050d0080280ac7269d8

src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h

index 228fa8b25831d5e5b85e4d46644c2c1b6fe00fe0..a87ca0eb169f9d344beb90311960b78106c8026c 100644 (file)
@@ -49,7 +49,7 @@
 #define UNROLLJ    (GMX_SIMD_REAL_WIDTH/GMX_SIMD_J_UNROLL_SIZE)
 
 /* The stride of all the atom data arrays is equal to half the SIMD width */
-#define STRIDE     (GMX_SIMD_REAL_WIDTH/GMX_SIMD_J_UNROLL_SIZE)
+#define STRIDE     UNROLLJ
 
 #include "../nbnxn_kernel_simd_utils.h"
 
index c051d7e763696668fbdea0f26f390ae12752875e..2f45b53bafe0acd349b949ad2bf60e603a0e1220 100644 (file)
     /* Atom indices (of the first atom in the cluster) */
     aj            = cj*UNROLLJ;
 #if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM)
-#if UNROLLJ == STRIDE
     aj2           = aj*2;
-#else
-    aj2           = (cj>>1)*2*STRIDE + (cj & 1)*UNROLLJ;
-#endif
 #endif
-#if UNROLLJ == STRIDE
     ajx           = aj*DIM;
-#else
-    ajx           = (cj>>1)*DIM*STRIDE + (cj & 1)*UNROLLJ;
-#endif
     ajy           = ajx + STRIDE;
     ajz           = ajy + STRIDE;