Skip to content

Commit

Permalink
Suppress GCC warning about pointer to object conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelVarvarin committed Nov 26, 2024
1 parent 310ad88 commit 6e2808b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/alpaka/kernel/TaskKernelGpuUniformCudaHipRt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,23 @@ namespace alpaka
{
void const* kernelArgs[] = {&threadElemExtent, &task.m_kernelFnObj, &args...};

// Suppress warning about pointer-to-object and pointer-to-function
# if defined(__GNUC__)

# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wconditionally-supported"
# endif

ALPAKA_UNIFORM_CUDA_HIP_RT_CHECK(TApi::launchCooperativeKernel(
reinterpret_cast<void*>(kernelName),
gridDim,
blockDim,
const_cast<void**>(kernelArgs),
static_cast<std::size_t>(blockSharedMemDynSizeBytes),
queue.getNativeHandle()));
# if defined(__GNUC__)
# pragma GCC diagnostic pop
# endif
}
else
{
Expand Down

0 comments on commit 6e2808b

Please sign in to comment.