From 3ca7de712d74ef336c9a582ca8065062a0e3441c Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 14 Sep 2024 10:55:02 +0000 Subject: [PATCH] [cuda] Add a return statement to suppress diagnostics. --- include/clad/Differentiator/Differentiator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clad/Differentiator/Differentiator.h b/include/clad/Differentiator/Differentiator.h index db9b699f2..3a8f35faf 100644 --- a/include/clad/Differentiator/Differentiator.h +++ b/include/clad/Differentiator/Differentiator.h @@ -145,9 +145,9 @@ CUDA_HOST_DEVICE T push(tape& to, ArgsT... val) { if (CUDAkernel) { void* argPtrs[] = {(void*)&args...}; cudaLaunchKernel((void*)f, grid, block, argPtrs, shared_mem, stream); - } else { - return f(static_cast(args)...); + return return_type_t(); } + return f(static_cast(args)...); #else return f(static_cast(args)...); #endif