From 9e5ebaf478e9ccea013a3b59203e4dcd79d5bc78 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Sun, 7 Jan 2024 00:55:09 +0200 Subject: [PATCH] Fixes #569: Avoiding a compiler warning in release mode by only defining `validate_all_dimensions_compatibility()` when `NDEBUG` is undefined --- src/cuda/api/launch_config_builder.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cuda/api/launch_config_builder.hpp b/src/cuda/api/launch_config_builder.hpp index 8d45a3b2..74a39a19 100644 --- a/src/cuda/api/launch_config_builder.hpp +++ b/src/cuda/api/launch_config_builder.hpp @@ -44,6 +44,8 @@ inline dimensions_t div_rounding_up(overall_dimensions_t overall_dims, block_dim } // namespace grid +#ifndef NDEBUG + namespace detail_ { static void validate_all_dimensions_compatibility( @@ -58,6 +60,8 @@ static void validate_all_dimensions_compatibility( } // namespace detail_ +#endif // NDEBUG + class launch_config_builder_t { protected: memory::shared::size_t get_dynamic_shared_memory_size(grid::block_dimensions_t block_dims) const