vt::pipe::PipeManager struct

Core VT component that provides an interface to create type-erased callbacks to many endpoint types.

Allows creation of callback to many types of handlers with different modes—like send and broadcast.

Base classes

template<typename T>
struct vt::runtime::component::Component<PipeManager>
Component class for a generic VT runtime module, CRTP'ed over the component's actual type
struct PipeManagerTL
struct PipeManagerTyped

Public types

template<typename FunctorT>
using GetMsgType = typename util::FunctorExtractor<FunctorT>::MessageType
using Void = V

Constructors, destructors, conversion operators

PipeManager()
System constructor for making a new PipeManager component.

Public functions

auto name() -> std::string override
Get the name of the component.
template<auto f, typename Target>
auto makeSend(Target target) -> auto
Make callback to an active function, objgroup, or collection.
template<typename FunctorT>
auto makeSend(NodeType node) -> auto
Make callback to a functor.
template<auto f>
auto makeBcast() -> auto
Make callback to an active function.
template<typename FunctorT>
auto makeBcast() -> auto
Make callback to a functor.
template<auto f, typename ProxyT>
auto makeBcast(ProxyT proxy) -> auto
Make callback to an objgroup or collection.
template<typename MsgT, typename ContextT>
auto makeFunc(LifetimeEnum life, ContextT* ctx, FuncMsgCtxType<MsgT, ContextT> fn) -> Callback<MsgT>
Make callback to a function (including lambdas) with a context pointer to any object on this node.
template<typename ContextT>
auto makeFunc(LifetimeEnum life, ContextT* ctx, FuncCtxType<ContextT> fn) -> Callback
Make a void callback to a function (including lambdas) with a context pointer to any object on this node.
template<typename MsgT>
auto makeFunc(LifetimeEnum life, FuncMsgType<MsgT> fn) -> Callback<MsgT>
Make a callback to a function (including lambdas) on this node with a message.
auto makeFunc(LifetimeEnum life, FuncVoidType fn) -> Callback
Make a void callback to a function (including lambdas) on this node.
template<typename MsgT, ActiveTypedFnType<MsgT>* f>
auto makeSend(NodeType const& node) -> Callback<MsgT>
Make a callback to a active message handler to be invoked on a certain node with a message.
template<typename ColT, typename MsgT, ColHanType<ColT, MsgT>* f>
auto makeSend(typename ColT::ProxyType proxy) -> Callback<MsgT>
Make a callback to a particular collection element invoking a non-intrusive collection active function handler.
template<typename ColT, typename MsgT, ColMemType<ColT, MsgT> f>
auto makeSend(typename ColT::ProxyType proxy) -> Callback<MsgT>
Make a callback to a particular collection element invoking an intrusive collection member handler.
template<typename ObjT, typename MsgT, ObjMemType<ObjT, MsgT> f>
auto makeSend(objgroup::proxy::ProxyElm<ObjT> proxy) -> Callback<MsgT>
Make a callback to a particular objgroup element (node) invoking a objgroup member handler.
template<typename MsgT, ActiveTypedFnType<MsgT>* f>
auto makeBcast() -> Callback<MsgT>
Make a callback to a active message handler with a message to be broadcast to all nodes.
template<typename ColT, typename MsgT, ColHanType<ColT, MsgT>* f>
auto makeBcast(ColProxyType<ColT> proxy) -> Callback<MsgT>
Make a callback to a whole collection invoking a non-intrusive collection active function handler.
template<typename ColT, typename MsgT, ColMemType<ColT, MsgT> f>
auto makeBcast(ColProxyType<ColT> proxy) -> Callback<MsgT>
Make a callback to a whole collection invoking an intrusive collection member handler.
template<typename ObjT, typename MsgT, ObjMemType<ObjT, MsgT> f>
auto makeBcast(objgroup::proxy::Proxy<ObjT> proxy) -> Callback<MsgT>
Make a callback to a whole objgroup invoking a objgroup member handler.
template<typename MsgT>
void triggerSendBack(PipeType const& pipe, MsgT* data)
Trigger and send back on a pipe that is not locally triggerable and thus requires communication if it is "sent" off-node.
template<typename Serializer>
void serialize(Serializer& s)
template<typename MsgT>
void triggerSendBack(PipeType const& pipe, ] MsgT* data)
template<typename C>
auto makeFunc(LifetimeEnum life, C* ctx, FuncCtxType<C> fn) -> Callback
template<typename MsgT, typename C>
auto makeFunc(LifetimeEnum life, C* ctx, FuncMsgCtxType<MsgT, C> fn) -> Callback<MsgT>

Function documentation

template<auto f, typename Target>
auto vt::pipe::PipeManager::makeSend(Target target)

Make callback to an active function, objgroup, or collection.

Parameters
target in the node or proxy to target
Returns a callback

template<typename FunctorT>
auto vt::pipe::PipeManager::makeSend(NodeType node)

Make callback to a functor.

Parameters
node in the node to target
Returns a callback

template<auto f>
auto vt::pipe::PipeManager::makeBcast()

Make callback to an active function.

Returns a callback

template<typename FunctorT>
auto vt::pipe::PipeManager::makeBcast()

Make callback to a functor.

Returns a callback

template<auto f, typename ProxyT>
auto vt::pipe::PipeManager::makeBcast(ProxyT proxy)

Make callback to an objgroup or collection.

Parameters
proxy in the proxy to target
Returns a callback

template<typename MsgT, typename ContextT>
Callback<MsgT> vt::pipe::PipeManager::makeFunc(LifetimeEnum life, ContextT* ctx, FuncMsgCtxType<MsgT, ContextT> fn)

Make callback to a function (including lambdas) with a context pointer to any object on this node.

Parameters
life in the lifetime for this callback
ctx in pointer to the object context passed to callback function
fn in endpoint function that takes a message and context pointer
Returns a new callback

Example snippet:

struct DataMsg : vt::Message { };
struct Context { int val = 129; };
int main() {
  auto ctx = std::make_unique<Context>();
  auto cb = vt::theCB()->makeFunc<DataMsg,Context>(
    ctx.get(), [](DataMsg* msg, Context* my_ctx){
      // callback triggered with message and associated context
    }
  );
  cb.send();
}

template<typename ContextT>
Callback vt::pipe::PipeManager::makeFunc(LifetimeEnum life, ContextT* ctx, FuncCtxType<ContextT> fn)

Make a void callback to a function (including lambdas) with a context pointer to any object on this node.

Parameters
life in the lifetime for this callback
ctx in pointer to the object context passed to callback function
fn in endpoint function that takes a context pointer
Returns a new callback

Example snippet:

struct Context { int val = 129; };
int main() {
  auto ctx = std::make_unique<Context>();
  auto cb = vt::theCB()->makeFunc<Context>(
    ctx.get(), [](Context* my_ctx){
      // callback triggered with associated context
    }
  );
  cb.send();
}

template<typename MsgT>
Callback<MsgT> vt::pipe::PipeManager::makeFunc(LifetimeEnum life, FuncMsgType<MsgT> fn)

Make a callback to a function (including lambdas) on this node with a message.

Parameters
life in the lifetime for this callback
fn in endpoint function that takes a message
Returns the new callback

Example snippet:

struct DataMsg : vt::Message { };
int main() {
  auto cb = vt::theCB()->makeFunc<DataMsg>(
    [](DataMsg* msg){
      // callback triggered with message
    }
  );
  cb.send();
}

Callback vt::pipe::PipeManager::makeFunc(LifetimeEnum life, FuncVoidType fn)

Make a void callback to a function (including lambdas) on this node.

Parameters
life in the lifetime for this callback
fn in void endpoint function
Returns the new callback

Example snippet:

int main() {
  auto cb = vt::theCB()->makeFunc([]{
    // callback triggered with message
  });
  cb.send();
}

template<typename MsgT, ActiveTypedFnType<MsgT>* f>
Callback<MsgT> vt::pipe::PipeManager::makeSend(NodeType const& node)

Make a callback to a active message handler to be invoked on a certain node with a message.

Parameters
node in node to invoke callback on
Returns the new callback

template<typename ColT, typename MsgT, ColHanType<ColT, MsgT>* f>
Callback<MsgT> vt::pipe::PipeManager::makeSend(typename ColT::ProxyType proxy)

Make a callback to a particular collection element invoking a non-intrusive collection active function handler.

Parameters
proxy in element proxy to collection
Returns the new callback

template<typename ColT, typename MsgT, ColMemType<ColT, MsgT> f>
Callback<MsgT> vt::pipe::PipeManager::makeSend(typename ColT::ProxyType proxy)

Make a callback to a particular collection element invoking an intrusive collection member handler.

Parameters
proxy in element proxy to collection
Returns the new callback

template<typename ObjT, typename MsgT, ObjMemType<ObjT, MsgT> f>
Callback<MsgT> vt::pipe::PipeManager::makeSend(objgroup::proxy::ProxyElm<ObjT> proxy)

Make a callback to a particular objgroup element (node) invoking a objgroup member handler.

Parameters
proxy in element proxy to objgroup
Returns the new callback

template<typename MsgT, ActiveTypedFnType<MsgT>* f>
Callback<MsgT> vt::pipe::PipeManager::makeBcast()

Make a callback to a active message handler with a message to be broadcast to all nodes.

Returns the new callback

template<typename ColT, typename MsgT, ColHanType<ColT, MsgT>* f>
Callback<MsgT> vt::pipe::PipeManager::makeBcast(ColProxyType<ColT> proxy)

Make a callback to a whole collection invoking a non-intrusive collection active function handler.

Parameters
proxy in proxy to collection
Returns the new callback

template<typename ColT, typename MsgT, ColMemType<ColT, MsgT> f>
Callback<MsgT> vt::pipe::PipeManager::makeBcast(ColProxyType<ColT> proxy)

Make a callback to a whole collection invoking an intrusive collection member handler.

Parameters
proxy in proxy to collection
Returns the new callback

template<typename ObjT, typename MsgT, ObjMemType<ObjT, MsgT> f>
Callback<MsgT> vt::pipe::PipeManager::makeBcast(objgroup::proxy::Proxy<ObjT> proxy)

Make a callback to a whole objgroup invoking a objgroup member handler.

Parameters
proxy in proxy to objgroup
Returns the new callback

template<typename MsgT>
void vt::pipe::PipeManager::triggerSendBack(PipeType const& pipe, MsgT* data)

Trigger and send back on a pipe that is not locally triggerable and thus requires communication if it is "sent" off-node.

Parameters
pipe in the pipe ID
data in the message to send

template<typename MsgT>
void vt::pipe::PipeManager::triggerSendBack(PipeType const& pipe, ] MsgT* data)

template<typename C>
Callback vt::pipe::PipeManager::makeFunc(LifetimeEnum life, C* ctx, FuncCtxType<C> fn)

template<typename MsgT, typename C>
Callback<MsgT> vt::pipe::PipeManager::makeFunc(LifetimeEnum life, C* ctx, FuncMsgCtxType<MsgT, C> fn)