Skip to content

Commit

Permalink
Revert "Add a customization point for put_parcel so we can override a…
Browse files Browse the repository at this point in the history
…ctions (e.g. rdma)"

This reverts commit 34490b3.
  • Loading branch information
biddisco committed Nov 8, 2016
1 parent 34490b3 commit 78c764e
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 175 deletions.
90 changes: 64 additions & 26 deletions hpx/runtime/applier/apply.hpp
Expand Up @@ -19,7 +19,6 @@
#include <hpx/runtime/naming/name.hpp>
#include <hpx/runtime/parcelset/put_parcel.hpp>
#include <hpx/runtime/parcelset/detail/parcel_await.hpp>
#include <hpx/traits/action_put_parcel.hpp>
#include <hpx/traits/component_type_is_compatible.hpp>
#include <hpx/traits/extract_action.hpp>
#include <hpx/traits/is_action.hpp>
Expand Down Expand Up @@ -55,9 +54,15 @@ namespace hpx
put_parcel(naming::id_type const& id, naming::address&& addr,
threads::thread_priority priority, Ts&&... vs)
{
return hpx::traits::action_put_parcel<Action>::call(
id, std::forward<naming::address>(addr),
priority, std::forward<Ts>(vs)...);
typedef
typename hpx::traits::extract_action<Action>::type
action_type;
action_type act;

parcelset::put_parcel(id, complement_addr<action_type>(addr),
act, priority, std::forward<Ts>(vs)...);

return false; // destinations are remote
}

template <typename Action, typename Continuation, typename ...Ts>
Expand All @@ -66,9 +71,16 @@ namespace hpx
threads::thread_priority priority,
Continuation && cont, Ts&&... vs)
{
return hpx::traits::action_put_parcel<Action>::call_cont(
id, std::forward<naming::address>(addr),
priority, std::forward<Continuation>(cont), std::forward<Ts>(vs)...);
typedef
typename hpx::traits::extract_action<Action>::type
action_type;
action_type act;

parcelset::put_parcel(id, complement_addr<action_type>(addr),
std::forward<Continuation>(cont),
act, priority, std::forward<Ts>(vs)...);

return false; // destinations are remote
}

template <typename Action, typename ...Ts>
Expand All @@ -77,21 +89,34 @@ namespace hpx
threads::thread_priority priority,
parcelset::parcelhandler::write_handler_type const& cb, Ts&&... vs)
{
return hpx::traits::action_put_parcel<Action>::call_cb(
id, std::forward<naming::address>(addr),
priority, cb, std::forward<Ts>(vs)...);
}
typedef
typename hpx::traits::extract_action<Action>::type
action_type;
action_type act;

parcelset::put_parcel_cb(cb, id,
complement_addr<action_type>(addr),
act, priority, std::forward<Ts>(vs)...);

return false; // destinations are remote
}

template <typename Action, typename ...Ts>
inline bool
put_parcel_cb(naming::id_type const& id, naming::address&& addr,
threads::thread_priority priority,
parcelset::parcelhandler::write_handler_type && cb, Ts&&... vs)
{
return hpx::traits::action_put_parcel<Action>::call_cb(
id, std::forward<naming::address>(addr),
priority, std::forward<parcelset::parcelhandler::write_handler_type>(cb),
std::forward<Ts>(vs)...);
typedef
typename hpx::traits::extract_action<Action>::type
action_type;
action_type act;

parcelset::put_parcel_cb(std::move(cb), id,
complement_addr<action_type>(addr),
act, priority, std::forward<Ts>(vs)...);

return false; // destinations are remote
}

template <typename Action, typename Continuation, typename ...Ts>
Expand All @@ -101,11 +126,18 @@ namespace hpx
Continuation && cont,
parcelset::parcelhandler::write_handler_type const& cb, Ts&&... vs)
{
return hpx::traits::action_put_parcel<Action>::call_cont_cb(
id, std::forward<naming::address>(addr),
priority, std::forward<Continuation>(cont), cb,
std::forward<Ts>(vs)...);
}
typedef
typename hpx::traits::extract_action<Action>::type
action_type;
action_type act;

parcelset::put_parcel_cb(cb, id,
complement_addr<action_type>(addr),
std::forward<Continuation>(cont),
act, priority, std::forward<Ts>(vs)...);

return false; // destinations are remote
}

template <typename Action, typename Continuation, typename ...Ts>
inline bool
Expand All @@ -114,12 +146,18 @@ namespace hpx
Continuation && cont,
parcelset::parcelhandler::write_handler_type && cb, Ts&&... vs)
{
return hpx::traits::action_put_parcel<Action>::call_cont_cb(
id, std::forward<naming::address>(addr),
priority, std::forward<Continuation>(cont),
std::forward<parcelset::parcelhandler::write_handler_type>(cb),
std::forward<Ts>(vs)...);
}
typedef
typename hpx::traits::extract_action<Action>::type
action_type;
action_type act;

parcelset::put_parcel_cb(std::move(cb), id,
complement_addr<action_type>(addr),
std::forward<Continuation>(cont),
act, priority, std::forward<Ts>(vs)...);

return false; // destinations are remote
}

// We know it is remote.
template <typename Action, typename ...Ts>
Expand Down
149 changes: 0 additions & 149 deletions hpx/traits/action_put_parcel.hpp

This file was deleted.

0 comments on commit 78c764e

Please sign in to comment.