Ensure minimum exec width of the PME OpenCL kernels
[alexxy/gromacs.git] / src / gromacs / ewald / pme-gpu-constants.h
index 50accc397ef888ca9b4981bc46333f2cb9b52726..5f66f09d11f67784b4b9871e5667c5d2a44316d5 100644 (file)
@@ -121,6 +121,13 @@ constexpr int c_virialAndEnergyCount = 7;
  */
 #define PME_SPREADGATHER_THREADS_PER_ATOM (order * order)
 
+/*! \brief Minimum execution width of the PME spread and gather kernels.
+ *
+ * Due to the one thread per atom and order=4 implementation constraints, order^2 threads
+ * should execute without synchronization needed. See PME_SPREADGATHER_THREADS_PER_ATOM
+ */
+constexpr int c_pmeSpreadGatherMinWarpSize = 16;
+
 /*! \brief
  * Atom data alignment (in terms of number of atoms).
  * This is the least common multiple of number of atoms processed by