Send Message to Functor Variants module
Send a message to an auto-registered functor-type handler.
Send message using functor handler. These handlers are type-safe and do not require the user to specify the message because it can be automatically detected.
struct MyMsg : vt::Message { explicit MyMsg(int in_a) : a_(in_a) { } int a_; }; struct X { void operator()(MyMsg* msg) const { ... }; }; void sendCode() { // X is automatically registered with the overload and the message // type is automatically detected theMsg()->sendMsg<X>(1, msg); }
Functions
-
template<typename FunctorT, typename MsgT>auto broadcastMsg(MsgPtrThief<MsgT> msg, bool deliver_to_sender = true, TagType tag = no_tag) -> PendingSendType
- Broadcast a message.
-
template<typename FunctorT>auto broadcastMsg(MsgPtrThief<typename util::FunctorExtractor<FunctorT>::MessageType> msg, bool deliver_to_sender = true, TagType tag = no_tag) -> PendingSendType
- Broadcast a message.
-
template<typename FunctorT, typename MsgT = typename util::auto broadcastMsgAuto(MsgPtrThief<MsgT> msg, TagType tag = no_tag) -> PendingSendType deprecated
FunctorExtractor<FunctorT>::MessageType> - Broadcast a message.
-
template<typename FunctorT, typename MsgT>auto sendMsg(NodeType dest, MsgPtrThief<MsgT> msg, TagType tag = no_tag) -> PendingSendType
- Send a message with a type-safe handler.
-
template<typename FunctorT>auto sendMsg(NodeType dest, MsgPtrThief<typename util::FunctorExtractor<FunctorT>::MessageType> msg, TagType tag = no_tag) -> PendingSendType
- Send a message with a type-safe handler.
-
template<typename FunctorT, typename MsgT = typename util::auto sendMsgAuto(NodeType dest, MsgPtrThief<MsgT> msg, TagType tag = no_tag) -> PendingSendType deprecated
FunctorExtractor<FunctorT>::MessageType> - Send a message.
Function documentation
#include <src/vt/messaging/active.h>
template<typename FunctorT, typename MsgT>
PendingSendType broadcastMsg(MsgPtrThief<MsgT> msg,
bool deliver_to_sender = true,
TagType tag = no_tag)
Broadcast a message.
Parameters | |
---|---|
msg in | the message to broadcast |
deliver_to_sender in | whether msg should be delivered to sender |
tag in | the optional tag to put on the message |
Returns | the PendingSend for the broadcast |
#include <src/vt/messaging/active.h>
template<typename FunctorT>
PendingSendType broadcastMsg(MsgPtrThief<typename util::FunctorExtractor<FunctorT>::MessageType> msg,
bool deliver_to_sender = true,
TagType tag = no_tag)
Broadcast a message.
Parameters | |
---|---|
msg in | the message to broadcast |
deliver_to_sender in | whether msg should be delivered to sender |
tag in | the optional tag to put on the message |
Returns | the PendingSend for the broadcast |
#include <src/vt/messaging/active.h>
template<typename FunctorT, typename MsgT = typename util:: FunctorExtractor<FunctorT>::MessageType>
PendingSendType broadcastMsgAuto(MsgPtrThief<MsgT> msg,
TagType tag = no_tag)
Broadcast a message.
Parameters | |
---|---|
msg in | the message to send |
tag in | the optional tag to put on the message |
Returns | the PendingSend for the broadcast |
#include <src/vt/messaging/active.h>
template<typename FunctorT, typename MsgT>
PendingSendType sendMsg(NodeType dest,
MsgPtrThief<MsgT> msg,
TagType tag = no_tag)
Send a message with a type-safe handler.
Parameters | |
---|---|
dest in | the destination node to send the message to |
msg in | the message to broadcast |
tag in | the tag to put on the message |
Returns | the PendingSend for the send |
#include <src/vt/messaging/active.h>
template<typename FunctorT>
PendingSendType sendMsg(NodeType dest,
MsgPtrThief<typename util::FunctorExtractor<FunctorT>::MessageType> msg,
TagType tag = no_tag)
Send a message with a type-safe handler.
Parameters | |
---|---|
dest in | the destination node to send the message to |
msg in | the message to broadcast |
tag in | the tag to put on the message |
Returns | the PendingSend for the send |
#include <src/vt/messaging/active.h>
template<typename FunctorT, typename MsgT = typename util:: FunctorExtractor<FunctorT>::MessageType>
PendingSendType sendMsgAuto(NodeType dest,
MsgPtrThief<MsgT> msg,
TagType tag = no_tag)
Send a message.
Parameters | |
---|---|
dest in | the destination node to send the message to |
msg in | the message to broadcast |
tag in | the optional tag to put on the message |
Returns | the PendingSend for the send |