Fix NBNxN SIMD reference kernels
authorRoland Schulz <roland@rschulz.eu>
Wed, 23 Oct 2013 22:12:12 +0000 (18:12 -0400)
committerMark Abraham <mark.j.abraham@gmail.com>
Sat, 26 Oct 2013 11:33:53 +0000 (13:33 +0200)
nbfp_stride was added independently by both 25eb0e14 and 5deee8a0.

Removing static is not OK for gcc. Mark will resolve later whether
this was even needed for his upstream work.

Change-Id: I97ea4131163512354b5e339dd19549c3e49e9de2

include/gmx_simd_ref.h
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_utils.h

index a1b78400b5ff8581c163395b91783843b522fc92..ecad324af08c55557aa70c11989a0f47cffba41d 100644 (file)
@@ -347,9 +347,8 @@ gmx_simd_ref_cmplt_pr(gmx_simd_ref_pr a, gmx_simd_ref_pr b)
     return c;
 }
 
-/* Logical AND on SIMD booleans. Can't be static or it can't be a
-   template parameter (at least on XLC for BlueGene/Q) */
-gmx_inline gmx_simd_ref_pb
+/* Logical AND on SIMD booleans. */
+static gmx_inline gmx_simd_ref_pb
 gmx_simd_ref_and_pb(gmx_simd_ref_pb a, gmx_simd_ref_pb b)
 {
     gmx_simd_ref_pb c;
@@ -363,9 +362,8 @@ gmx_simd_ref_and_pb(gmx_simd_ref_pb a, gmx_simd_ref_pb b)
     return c;
 }
 
-/* Logical OR on SIMD booleans. Can't be static or it can't be a
-   template parameter (at least on XLC for BlueGene/Q) */
-gmx_inline gmx_simd_ref_pb
+/* Logical OR on SIMD booleans. */
+static gmx_inline gmx_simd_ref_pb
 gmx_simd_ref_or_pb(gmx_simd_ref_pb a, gmx_simd_ref_pb b)
 {
     gmx_simd_ref_pb c;
index 9fde8f06e7c5caa2f9c53dbf7e4dd8db5c18d40d..20215c6210319420a937b811ebf391bc82f511f2 100644 (file)
 
 #ifdef GMX_SIMD_REFERENCE_PLAIN_C
 
-/* Set the stride for the lookup of the two LJ parameters from their
- * (padded) array.
- * Note that currently only arrays with stride 2 and 4 are available.
- * Since the reference code does not require alignment, we can always use 2.
- */
-static const int nbfp_stride = 2;
-
 /* Align a stack-based thread-local working array. */
 static gmx_inline int *
 prepare_table_load_buffer(const int *array)