From ad2284daa81928ef98dea288b1d418b8fb6e26d3 Mon Sep 17 00:00:00 2001 From: Artem Zhmurov Date: Tue, 4 Feb 2020 11:04:34 +0100 Subject: [PATCH] Clean up trivial function and duplicating macroses from NBNXM 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 | 2 +- src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp b/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp index f0c88b10ba..05a270b7f0 100644 --- a/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp +++ b/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp @@ -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 */ diff --git a/src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h b/src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h index 74f042939c..6e3a410161 100644 --- a/src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h +++ b/src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h @@ -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 -- 2.22.0