Skip to content

Commit

Permalink
Fixing core compilation problems
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Oct 3, 2017
1 parent 05bca6d commit 5f7ddc7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hpx/parallel/executors/execution_parameters_fwd.hpp
Expand Up @@ -211,13 +211,13 @@ namespace hpx { namespace parallel { namespace execution
reset_thread_distribution(Parameters&& params, Executor&& exec)
-> decltype(reset_thread_distribution_fn_helper<
typename hpx::util::decay_unwrap<Parameters>::type,
typename hpx::util::decay_unwrap<Executor>::type
typename hpx::util::decay<Executor>::type
>::call(std::forward<Parameters>(params),
std::forward<Executor>(exec)))
{
return reset_thread_distribution_fn_helper<
typename hpx::util::decay_unwrap<Parameters>::type,
typename hpx::util::decay_unwrap<Executor>::type
typename hpx::util::decay<Executor>::type
>::call(std::forward<Parameters>(params),
std::forward<Executor>(exec));
}
Expand Down
39 changes: 36 additions & 3 deletions hpx/parallel/executors/v1/executor_parameter_traits.hpp
Expand Up @@ -96,12 +96,45 @@ namespace hpx { namespace parallel { inline namespace v3
execution::detail::has_maximal_number_of_chunks<T>;

///////////////////////////////////////////////////////////////////////
template <typename Parameters_>
struct reset_thread_distribution_helper
{
template <typename Parameters, typename Executor>
static void call(hpx::traits::detail::wrap_int, Parameters &&,
Executor &&)
{
}

template <typename Parameters, typename Executor>
static auto call(int, Parameters && params, Executor && exec)
-> decltype(
params.reset_thread_distribution(
std::forward<Executor>(exec))
)
{
params.reset_thread_distribution(std::forward<Executor>(exec));
}

template <typename Executor>
static void call(Parameters_& params, Executor && exec)
{
call(0, params, std::forward<Executor>(exec));
}

template <typename Parameters, typename Executor>
static void call(Parameters params, Executor && exec)
{
call(static_cast<Parameters_&>(params),
std::forward<Executor>(exec));
}
};

template <typename Parameters, typename Executor>
void call_reset_thread_distribution(Parameters && params,
Executor && exec)
{
execution::detail::reset_thread_distribution_fn_helper<
typename hpx::util::decay_unwrap<Parameters>::type, Executor
reset_thread_distribution_helper<
typename hpx::util::decay_unwrap<Parameters>::type
>::call(std::forward<Parameters>(params),
std::forward<Executor>(exec));
}
Expand Down Expand Up @@ -316,7 +349,7 @@ namespace hpx { namespace parallel { inline namespace v3
template <typename Parameters, typename Executor>
HPX_FORCEINLINE
typename std::enable_if<
hpx::traits::is_executor_parameters<Parameters>::value &&
// hpx::traits::is_executor_parameters<Parameters>::value &&
hpx::traits::is_executor<Executor>::value
>::type
reset_thread_distribution(Parameters && params, Executor && exec)
Expand Down
1 change: 1 addition & 0 deletions hpx/traits/is_executor_parameters.hpp
Expand Up @@ -12,6 +12,7 @@

#include <hpx/config.hpp>
#include <hpx/util/always_void.hpp>
#include <hpx/traits/v1/is_executor_parameters.hpp> // backwards compatibility

#include <functional>
#include <type_traits>
Expand Down

0 comments on commit 5f7ddc7

Please sign in to comment.