#include <array>
#include <string>
+#include <type_traits>
#include "gromacs/gpu_utils/device_stream.h"
#include "gromacs/gpu_utils/gputraits.cuh"
const CurrentArg* argPtr,
const RemainingArgs*... otherArgsPtrs)
{
- // NOLINTNEXTLINE(google-readability-casting)
- (*kernelArgsPtr)[argIndex] = (void*)argPtr;
+ (*kernelArgsPtr)[argIndex] = const_cast<void*>(static_cast<const void*>(argPtr));
prepareGpuKernelArgument(kernel, kernelArgsPtr, argIndex + 1, otherArgsPtrs...);
}
* \param[in] deviceStream GPU stream to launch kernel in
* \param[in] kernelName Human readable kernel description, for error handling only
* \param[in] kernelArgs Array of the pointers to the kernel arguments, prepared by
- * prepareGpuKernelArguments() \throws gmx::InternalError on kernel launch failure
+ * prepareGpuKernelArguments()
+ * \throws gmx::InternalError on kernel launch failure
*/
template<typename... Args>
void launchGpuKernel(void (*kernel)(Args...),
{
dim3 blockSize(config.blockSize[0], config.blockSize[1], config.blockSize[2]);
dim3 gridSize(config.gridSize[0], config.gridSize[1], config.gridSize[2]);
- // NOLINTNEXTLINE(google-readability-casting)
- cudaLaunchKernel((void*)kernel,
+ cudaLaunchKernel(reinterpret_cast<void*>(kernel),
gridSize,
blockSize,
const_cast<void**>(kernelArgs.data()),