Skip to content

Commit

Permalink
Merge pull request #36 from hkaiser/hpx_namespace
Browse files Browse the repository at this point in the history
Recent HPX master has changed some namespaces for the executor traits specialization
  • Loading branch information
G-071 authored Dec 10, 2024
2 parents c228fd0 + b45bee0 commit 32fa213
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
6 changes: 6 additions & 0 deletions include/cppuddle/common/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,9 @@ operator!=(allocator_slice<T, Host_Allocator, Executor> 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<typename E> */
/* struct is_one_way_executor<typename aggregated_executor<E>::executor_slice> */
/* : std::true_type */
Expand All @@ -1064,6 +1064,6 @@ struct is_two_way_executor<
hpx::cuda::experimental::cuda_executor>::executor_slice>
: std::true_type {};
#endif
}}}
}
#endif
5 changes: 3 additions & 2 deletions tests/work_aggregation_cpu_triad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <hpx/futures/future.hpp>
#undef NDEBUG

#include "cppuddle/common/config.hpp"
#include "cppuddle/memory_recycling/std_recycling_allocators.hpp"
#include "cppuddle/kernel_aggregation/kernel_aggregation_interface.hpp"

Expand Down Expand Up @@ -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<Dummy_Executor>
: std::true_type
Expand All @@ -85,7 +86,7 @@ namespace hpx { namespace parallel { namespace execution {
{
// we support returning a waitable/future
};
}}}
}


//===============================================================================
Expand Down
5 changes: 3 additions & 2 deletions tests/work_aggregation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <boost/program_options.hpp>

#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""
Expand Down Expand Up @@ -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<Dummy_Executor>
: std::true_type
Expand All @@ -110,7 +111,7 @@ namespace hpx { namespace parallel { namespace execution {
{
// we support returning a waitable/future
};
}}}
}
//===============================================================================
//===============================================================================
Expand Down

0 comments on commit 32fa213

Please sign in to comment.