Skip to content

Commit

Permalink
Add missing inline keywords to cudautils::launch (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard authored Dec 13, 2019
1 parent d02f4be commit 17fe590
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions HeterogeneousCore/CUDAUtilities/interface/launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename F, typename... Args>
template <typename F, typename... Args> inline
#if __cplusplus >= 201703L
std::enable_if_t<std::is_invocable_r<void, F, Args&&...>::value>
#else
Expand All @@ -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 <typename F, typename... Args>
template <typename F, typename... Args> inline
#if __cplusplus >= 201703L
std::enable_if_t<std::is_invocable_r<void, F, Args&&...>::value>
#else
Expand Down

0 comments on commit 17fe590

Please sign in to comment.