From d4c552ff94ea45def121ca346ab778e41627637b Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Tue, 26 Nov 2024 17:41:38 -0600 Subject: [PATCH] Recent HPX master has changed some namespaces for the executor traits specialization --- include/cppuddle/common/config.hpp | 6 ++++++ .../detail/aggregation_executors_and_allocators.hpp | 6 +++--- tests/work_aggregation_cpu_triad.cpp | 5 +++-- tests/work_aggregation_test.cpp | 5 +++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/cppuddle/common/config.hpp b/include/cppuddle/common/config.hpp index 2ff888a6..2c087644 100644 --- a/include/cppuddle/common/config.hpp +++ b/include/cppuddle/common/config.hpp @@ -67,4 +67,10 @@ inline size_t get_device_id(const size_t number_gpus) { } // end namespace cppuddle +#if HPX_VERSION_FULL >= 0x011100 +#define CPPUDDLE_HPX_EXECUTOR_SPECIALIZATION_NS hpx::execution::experimental +#else +#define CPPUDDLE_HPX_EXECUTOR_SPECIALIZATION_NS hpx::parallel::execution +#endif + #endif diff --git a/include/cppuddle/kernel_aggregation/detail/aggregation_executors_and_allocators.hpp b/include/cppuddle/kernel_aggregation/detail/aggregation_executors_and_allocators.hpp index a2b8b4b0..93bd6dd4 100644 --- a/include/cppuddle/kernel_aggregation/detail/aggregation_executors_and_allocators.hpp +++ b/include/cppuddle/kernel_aggregation/detail/aggregation_executors_and_allocators.hpp @@ -1039,9 +1039,9 @@ operator!=(allocator_slice const &, -namespace hpx { namespace parallel { namespace execution { +namespace CPPUDDLE_HPX_EXECUTOR_SPECIALIZATION_NS { // TODO Unfortunately does not work that way! Create trait that works for Executor Slices with - // compatible unlying executor types + // compatible underlying executor types /* template */ /* struct is_one_way_executor::executor_slice> */ /* : std::true_type */ @@ -1064,6 +1064,6 @@ struct is_two_way_executor< hpx::cuda::experimental::cuda_executor>::executor_slice> : std::true_type {}; #endif -}}} +} #endif diff --git a/tests/work_aggregation_cpu_triad.cpp b/tests/work_aggregation_cpu_triad.cpp index d65c9668..8419a44b 100644 --- a/tests/work_aggregation_cpu_triad.cpp +++ b/tests/work_aggregation_cpu_triad.cpp @@ -5,6 +5,7 @@ #include #undef NDEBUG +#include "cppuddle/common/config.hpp" #include "cppuddle/memory_recycling/std_recycling_allocators.hpp" #include "cppuddle/kernel_aggregation/kernel_aggregation_interface.hpp" @@ -71,7 +72,7 @@ struct Dummy_Executor { } }; -namespace hpx { namespace parallel { namespace execution { +namespace CPPUDDLE_HPX_EXECUTOR_SPECIALIZATION_NS { template <> struct is_one_way_executor : std::true_type @@ -85,7 +86,7 @@ namespace hpx { namespace parallel { namespace execution { { // we support returning a waitable/future }; -}}} +} //=============================================================================== diff --git a/tests/work_aggregation_test.cpp b/tests/work_aggregation_test.cpp index abe827f4..ef912e7b 100644 --- a/tests/work_aggregation_test.cpp +++ b/tests/work_aggregation_test.cpp @@ -12,6 +12,7 @@ #include +#include "cppuddle/common/config.hpp" #include "cppuddle/memory_recycling/cuda_recycling_allocators.hpp" #include "cppuddle/memory_recycling/util/cuda_recycling_device_buffer.hpp" #include "cppuddle/executor_recycling/executor_pools_interface.hpp"" @@ -96,7 +97,7 @@ struct Dummy_Executor { } }; -namespace hpx { namespace parallel { namespace execution { +namespace CPPUDDLE_HPX_EXECUTOR_SPECIALIZATION_NS { template <> struct is_one_way_executor : std::true_type @@ -110,7 +111,7 @@ namespace hpx { namespace parallel { namespace execution { { // we support returning a waitable/future }; -}}} +} //=============================================================================== //===============================================================================