Made reference SIMD work again
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_kernels / nbnxn_kernel_simd_utils_ref.h
index 642a2a49a24efef25020046baac687c679f09c5d..e757a8d56177069104c80d4c0c59ec8e028c390f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -96,10 +96,13 @@ gmx_add_pr4(gmx_mm_pr4 a, gmx_mm_pr4 b)
 
     return c;
 }
-
 #else
 
-typedef gmx_simd_ref_pr gmx_simd_ref_pr4;
+typedef gmx_simd_ref_pr gmx_mm_pr4;
+
+#define gmx_load_pr4   gmx_load_pr
+#define gmx_store_pr4  gmx_store_pr
+#define gmx_add_pr4    gmx_add_pr
 
 #endif
 
@@ -225,6 +228,7 @@ gmx_sum4_hpr(gmx_simd_ref_pr a, gmx_simd_ref_pr b)
     return c;
 }
 
+#ifdef GMX_NBNXN_SIMD_2XNN
 /* Sum the elements of halfs of each input register and store sums in out */
 static gmx_inline gmx_mm_pr4
 gmx_mm_transpose_sum4h_pr(gmx_simd_ref_pr a, gmx_simd_ref_pr b)
@@ -247,6 +251,7 @@ gmx_mm_transpose_sum4h_pr(gmx_simd_ref_pr a, gmx_simd_ref_pr b)
 
     return sum;
 }
+#endif
 
 static gmx_inline void
 gmx_pr_to_2hpr(gmx_simd_ref_pr a, gmx_mm_hpr *b, gmx_mm_hpr *c)
@@ -276,7 +281,8 @@ gmx_2hpr_to_pr(gmx_mm_hpr a, gmx_mm_hpr b, gmx_simd_ref_pr *c)
 
 #ifndef TAB_FDV0
 static gmx_inline void
-load_table_f(const real *tab_coul_F, gmx_simd_ref_epi32 ti_S, int *ti,
+load_table_f(const real *tab_coul_F, gmx_simd_ref_epi32 ti_S,
+             int gmx_unused *ti,
              gmx_simd_ref_pr *ctab0_S, gmx_simd_ref_pr *ctab1_S)
 {
     int i;
@@ -397,8 +403,8 @@ static gmx_inline void
 gmx_mm_invsqrt2_pd(gmx_simd_ref_pr in0, gmx_simd_ref_pr in1,
                    gmx_simd_ref_pr *out0, gmx_simd_ref_pr *out1)
 {
-    out0 = gmx_invsqrt_pr(in0);
-    out1 = gmx_invsqrt_pr(in1);
+    *out0 = gmx_invsqrt_pr(in0);
+    *out1 = gmx_invsqrt_pr(in1);
 }
 #endif