From 17fe59093cf534306a07de99f973ed8fe4797989 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Fri, 13 Dec 2019 16:00:24 +0100 Subject: [PATCH] Add missing inline keywords to cudautils::launch (#430) --- HeterogeneousCore/CUDAUtilities/interface/launch.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/HeterogeneousCore/CUDAUtilities/interface/launch.h b/HeterogeneousCore/CUDAUtilities/interface/launch.h index 24282d690005e..5b98e8c515550 100644 --- a/HeterogeneousCore/CUDAUtilities/interface/launch.h +++ b/HeterogeneousCore/CUDAUtilities/interface/launch.h @@ -88,19 +88,16 @@ namespace cudautils { void operator()(void const* ptrs[], Tuple const& t) {} }; -#if 0 -#endif - } // namespace detail // wrappers for cudaLaunchKernel - void launch(void (*kernel)(), LaunchParameters config) { + inline void launch(void (*kernel)(), LaunchParameters config) { cudaCheck(cudaLaunchKernel( (const void*)kernel, config.gridDim, config.blockDim, nullptr, config.sharedMem, config.stream)); } - template + template inline #if __cplusplus >= 201703L std::enable_if_t::value> #else @@ -120,12 +117,12 @@ namespace cudautils { // wrappers for cudaLaunchCooperativeKernel - void launch_cooperative(void (*kernel)(), LaunchParameters config) { + inline void launch_cooperative(void (*kernel)(), LaunchParameters config) { cudaCheck(cudaLaunchCooperativeKernel( (const void*)kernel, config.gridDim, config.blockDim, nullptr, config.sharedMem, config.stream)); } - template + template inline #if __cplusplus >= 201703L std::enable_if_t::value> #else