From db46b8b7ceb5cc678fafa0697e4b5a2231e685c5 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 28 Jun 2024 19:11:06 +0200 Subject: [PATCH 1/2] Update tests.yml (#513) --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index adaebb4e0..c15980bf3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -142,12 +142,12 @@ jobs: 'cpu-clang') export CC=clang export CXX=clang++ - DDC_CMAKE_CXX_FLAGS="-Werror=extra-semi -Werror=old-style-cast" + DDC_CMAKE_CXX_FLAGS="-Wextra-semi -Wextra-semi-stmt -Wold-style-cast" ;; 'cpu-gcc') export CC=gcc export CXX=g++ - DDC_CMAKE_CXX_FLAGS="-Werror=extra-semi -Werror=old-style-cast" + DDC_CMAKE_CXX_FLAGS="-Wextra-semi -Wold-style-cast" if [ 'xDebug' = 'x${{matrix.cmake_build_type}}' ] then DDC_CMAKE_CXX_FLAGS="${DDC_CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address" From 729cd846a8c022eba605c281f1cb28c7ed8ade24 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 28 Jun 2024 21:14:56 +0200 Subject: [PATCH 2/2] Add SFINAE to fix the selection of the algorithm (#514) --- include/ddc/parallel_for_each.hpp | 2 +- include/ddc/parallel_transform_reduce.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ddc/parallel_for_each.hpp b/include/ddc/parallel_for_each.hpp index 7b58843ac..54a725501 100644 --- a/include/ddc/parallel_for_each.hpp +++ b/include/ddc/parallel_for_each.hpp @@ -167,7 +167,7 @@ void parallel_for_each( * @param[in] f a functor taking an index as parameter */ template -void parallel_for_each( +std::enable_if_t> parallel_for_each( ExecSpace const& execution_space, DiscreteDomain const& domain, Functor&& f) noexcept diff --git a/include/ddc/parallel_transform_reduce.hpp b/include/ddc/parallel_transform_reduce.hpp index 54d87656d..2cc4ea6b3 100644 --- a/include/ddc/parallel_transform_reduce.hpp +++ b/include/ddc/parallel_transform_reduce.hpp @@ -329,7 +329,7 @@ T parallel_transform_reduce( * range. The return type must be acceptable as input to reduce */ template -T parallel_transform_reduce( +std::enable_if_t, T> parallel_transform_reduce( ExecSpace const& execution_space, DiscreteDomain const& domain, T neutral,