Clean up trivial function and duplicating macroses from NBNXM
authorArtem Zhmurov <zhmurov@gmail.com>
Tue, 4 Feb 2020 10:04:34 +0000 (11:04 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Tue, 11 Feb 2020 22:42:36 +0000 (23:42 +0100)
The getOclPruneKernelJ4Concurrency(..) that used to implement
the concurrency parameter switching depending on vendor is now
a trivial return the same value as defined by macros. Hence,
this patch removes the function and code now uses the macro directly.

Change-Id: I61d4b0a91e9b3256633860165ab0b7f4a34f9687

src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp
src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h

index f0c88b10ba8b023897c1f0d74f95ff2063136496..05a270b7f010b78b747a2cd8313943bca470a263 100644 (file)
@@ -788,7 +788,7 @@ void gpu_launch_kernel_pruneonly(NbnxmGpu* nb, const InteractionLocality iloc, c
      *   and j-cluster concurrency, in x, y, and z, respectively.
      * - The 1D block-grid contains as many blocks as super-clusters.
      */
-    int num_threads_z = getOclPruneKernelJ4Concurrency(nb->deviceInfo->deviceVendor);
+    int num_threads_z = c_oclPruneKernelJ4ConcurrencyDEFAULT;
 
 
     /* kernel launch config */
index 74f042939cc2a3243c11f0bd8e4a1b858601772e..6e3a4101614cfa98a5cafd125abc346c78dc33fc 100644 (file)
@@ -77,17 +77,6 @@ struct gmx_wallclock_gpu_nbnxn_t;
 const int c_oclPruneKernelJ4ConcurrencyDEFAULT = GMX_NBNXN_PRUNE_KERNEL_J4_CONCURRENCY_DEFAULT;
 /*! @} */
 
-/*! \brief Returns the j4 processing concurrency parameter for the vendor \p vendorId
- *  \param deviceVendor Vendor.
- */
-static inline int getOclPruneKernelJ4Concurrency(DeviceVendor deviceVendor)
-{
-    switch (deviceVendor)
-    {
-        default: return c_oclPruneKernelJ4ConcurrencyDEFAULT;
-    }
-}
-
 /*! \brief Electrostatic OpenCL kernel flavors.
  *
  *  Types of electrostatics implementations available in the OpenCL non-bonded