From acea7b4d7ce032c3311181be7b30a31a7f45f1ac Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Tue, 23 Jul 2019 21:46:51 +0200 Subject: [PATCH] Fix for MSVC+CUDA MSVC finds it hard to deal with template parameter packs in a few situations. We don't test with MSVC+CUDA, but a user reports this works in that case. Change-Id: Id576482facaaf40972ba4fd55b2afcba3113d0e8 --- src/gromacs/gpu_utils/cudautils.cuh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gromacs/gpu_utils/cudautils.cuh b/src/gromacs/gpu_utils/cudautils.cuh index 1116d66674..1309a10bd9 100644 --- a/src/gromacs/gpu_utils/cudautils.cuh +++ b/src/gromacs/gpu_utils/cudautils.cuh @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2014,2015,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -304,13 +304,14 @@ void prepareGpuKernelArgument(KernelPtr kernel, * A wrapper function for setting up all the CUDA kernel arguments. * Calls the recursive functions above. * + * \tparam KernelPtr Kernel function handle type * \tparam Args Types of all the kernel arguments * \param[in] kernel Kernel function handle * \param[in] argsPtrs Pointers to all the kernel arguments * \returns A prepared parameter pack to be used with launchGpuKernel() as the last argument. */ -template -std::array prepareGpuKernelArguments(void (*kernel)(Args...), +template +std::array prepareGpuKernelArguments(KernelPtr kernel, const KernelLaunchConfig & /*config */, const Args *... argsPtrs) { -- 2.22.0