Allow OCL CL_SIZE to be set to 4 for Intel
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_pairlist.h
index 4e064ec910a917aff85339cead883dfc71637da8..352c6791465edd4b5b13b50209ee23dbd048f7f3 100644 (file)
@@ -36,6 +36,8 @@
 #ifndef _nbnxn_pairlist_h
 #define _nbnxn_pairlist_h
 
+#include "config.h"
+
 #include <cstddef>
 
 #include "gromacs/math/vectypes.h"
@@ -74,8 +76,12 @@ struct NbnxnListParameters
 
 /*! \endcond */
 
-/* With GPU kernels the i and j cluster size is 8 atoms */
+/* With GPU kernels the i and j cluster size is 8 atoms for CUDA and can be set at compile time for OpenCL */
+#if GMX_GPU == GMX_GPU_OPENCL
+static constexpr int c_nbnxnGpuClusterSize = GMX_OCL_CLUSTER_SIZE;
+#else
 static constexpr int c_nbnxnGpuClusterSize = 8;
+#endif
 
 /* The number of clusters in a super-cluster, used for GPU */
 static constexpr int c_nbnxnGpuNumClusterPerSupercluster = 8;