Skip to content

Commit

Permalink
#1024: Suggest switching away from explicit message instantiation to …
Browse files Browse the repository at this point in the history
…the send/broadcast(Args...) version
  • Loading branch information
JacobDomagala authored and Braden Mailloux committed Oct 15, 2020
1 parent 489dc15 commit d8f3802
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/vt/objgroup/proxy/proxy_objgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ struct Proxy {
* \param[in] msg raw pointer to the message
*/
template <typename MsgT, ActiveObjType<MsgT, ObjT> fn>
[[deprecated("Use broadcastMsg instead")]]
[[deprecated("For simple create and broadcast message use broadcast(Args...),\
otherwise use broadcastMsg(MsgPtrThief)")]]
void broadcast(MsgT* msg) const;

/**
Expand All @@ -112,7 +113,8 @@ struct Proxy {
* \param[in] msg managed pointer to the message
*/
template <typename MsgT, ActiveObjType<MsgT, ObjT> fn>
[[deprecated("Use broadcastMsg instead")]]
[[deprecated("For simple create and broadcast message use broadcast(Args...),\
otherwise use broadcastMsg(MsgPtrThief)")]]
void broadcast(MsgPtr<MsgT> msg) const;

/**
Expand Down
6 changes: 4 additions & 2 deletions src/vt/objgroup/proxy/proxy_objgroup_elm.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ struct ProxyElm {
* \param[in] msg raw pointer to the message
*/
template <typename MsgT, ActiveObjType<MsgT, ObjT> fn>
[[deprecated("Use sendMsg instead")]]
[[deprecated("For simple create and send message use send(Args...),\
otherwise use sendMsg(MsgPtrThief)")]]
void send(MsgT* msg) const;

/**
Expand All @@ -102,7 +103,8 @@ struct ProxyElm {
* \param[in] msg managed pointer to the message
*/
template <typename MsgT, ActiveObjType<MsgT, ObjT> fn>
[[deprecated("Use sendMsg instead")]]
[[deprecated("For simple create and send message use send(Args...),\
otherwise use sendMsg(MsgPtrThief)")]]
void send(MsgSharedPtr<MsgT> msg) const;

/**
Expand Down
12 changes: 8 additions & 4 deletions src/vt/vrt/collection/broadcast/broadcastable.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ struct Broadcastable : BaseProxyT {
Broadcastable& operator=(Broadcastable const&) = default;

template <typename MsgT, ActiveColTypedFnType<MsgT, ColT> *f>
[[deprecated("Use broadcastMsg instead")]]
[[deprecated("For simple create and broadcast message use broadcast(Args...),\
otherwise use broadcastMsg(MsgPtrThief)")]]
messaging::PendingSend broadcast(MsgT* msg) const;
template <typename MsgT, ActiveColTypedFnType<MsgT, ColT> *f>
[[deprecated("Use broadcastMsg instead")]]
[[deprecated("For simple create and broadcast message use broadcast(Args...),\
otherwise use broadcastMsg(MsgPtrThief)")]]
messaging::PendingSend broadcast(MsgSharedPtr<MsgT> msg) const;

/**
Expand All @@ -93,10 +95,12 @@ struct Broadcastable : BaseProxyT {
messaging::PendingSend broadcast(Args&&... args) const;

template <typename MsgT, ActiveColMemberTypedFnType<MsgT, ColT> f>
[[deprecated("Use broadcastMsg instead")]]
[[deprecated("For simple create and broadcast message use broadcast(Args...),\
otherwise use broadcastMsg(MsgPtrThief)")]]
messaging::PendingSend broadcast(MsgT* msg) const;
template <typename MsgT, ActiveColMemberTypedFnType<MsgT, ColT> f>
[[deprecated("Use broadcastMsg instead")]]
[[deprecated("For simple create and broadcast message use broadcast(Args...),\
otherwise use broadcastMsg(MsgPtrThief)")]]
messaging::PendingSend broadcast(MsgSharedPtr<MsgT> msg) const;

/**
Expand Down
12 changes: 8 additions & 4 deletions src/vt/vrt/collection/send/sendable.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ struct Sendable : BaseProxyT {
void serialize(SerializerT& s);

template <typename MsgT, ActiveColTypedFnType<MsgT,ColT> *f>
[[deprecated("Use sendMsg instead")]]
[[deprecated("For simple create and send message use send(Args...),\
otherwise use sendMsg(MsgPtrThief)")]]
messaging::PendingSend send(MsgT* msg) const;
template <typename MsgT, ActiveColTypedFnType<MsgT,ColT> *f>
[[deprecated("Use sendMsg instead")]]
[[deprecated("For simple create and send message use send(Args...),\
otherwise use sendMsg(MsgPtrThief)")]]
messaging::PendingSend send(MsgSharedPtr<MsgT> msg) const;

/**
Expand All @@ -91,10 +93,12 @@ struct Sendable : BaseProxyT {
messaging::PendingSend send(Args&&... args) const;

template <typename MsgT, ActiveColMemberTypedFnType<MsgT,ColT> f>
[[deprecated("Use sendMsg instead")]]
[[deprecated("For simple create and send message use send(Args...),\
otherwise use sendMsg(MsgPtrThief)")]]
messaging::PendingSend send(MsgT* msg) const;
template <typename MsgT, ActiveColMemberTypedFnType<MsgT,ColT> f>
[[deprecated("Use sendMsg instead")]]
[[deprecated("For simple create and send message use send(Args...),\
otherwise use sendMsg(MsgPtrThief)")]]
messaging::PendingSend send(MsgSharedPtr<MsgT> msg) const;

/**
Expand Down

0 comments on commit d8f3802

Please sign in to comment.