template<typename ObjT>
vt::objgroup::proxy::Proxy struct

A indexable proxy to object instances on all nodes that are tied together with a common ID.

After creating an objgroup, a Proxy<ObjT> is returned which can be used to perform distributed operations on that object instance across all nodes.

Proxies are very inexpensive to copy and move around the system.

Public types

using ObjGroupType = ObjT
using ReduceStamp = collective::reduce::ReduceStamp
using PendingSendType = messaging::PendingSend

Constructors, destructors, conversion operators

Proxy() defaulted
Proxy(Proxy const&) defaulted
Proxy(Proxy&&) defaulted
Proxy(ObjGroupProxyType in_proxy) explicit
Create a new proxy, called by the system.

Public functions

auto operator=(Proxy const&) -> Proxy& defaulted
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void broadcast(MsgT* msg) const
Broadcast a message to all nodes to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void broadcast(MsgPtr<MsgT> msg) const
Broadcast a message to all nodes to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
auto broadcastMsg(messaging::MsgPtrThief<MsgT> msg) const -> PendingSendType
Broadcast a message to all nodes to be delivered to the local object instance.
template<auto fn>
auto broadcastMsg(messaging::MsgPtrThief<typename ObjFuncTraits<decltype(fn)>::MsgT> msg) const -> PendingSendType
Broadcast a message to all nodes to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn, typename... Args>
auto broadcast(Args && ... args) const -> PendingSendType
Broadcast a message to all nodes to be delivered to the local object instance.
template<auto fn, typename... Args>
auto broadcast(Args && ... args) const -> PendingSendType
Broadcast a message to all nodes to be delivered to the local object instance.
template<auto fn, typename... Args>
auto multicast(GroupType type, Args && ... args) const -> PendingSendType
Multicast a message to nodes that are part of given group to be delivered to the local object instance.
template<auto fn, typename... Args>
auto multicast(group::region::Region::RegionUPtrType&& nodes, Args && ... args) const -> PendingSendType
Multicast a message to nodes specified by the region to be delivered to the local object instance.
template<auto f, template<typename Arg> class Op = collective::NoneOp, typename... Args>
auto allreduce(Args && ... args) const -> PendingSendType
All-reduce back to this objgroup. Performs a reduction using operator Op followed by a broadcast to f with the result.
template<auto f, template<typename Arg> class Op = collective::NoneOp, typename Target, typename... Args>
auto reduce(Target target, Args && ... args) const -> PendingSendType
Reduce back to a point target. Performs a reduction using operator Op followed by a send to f with the result.
template<template<typename Arg> class Op = collective::NoneOp, typename... CBArgs, typename... Args>
auto reduce(vt::Callback<CBArgs...> cb, Args && ... args) const -> PendingSendType
Reduce back to an arbitrary callback. Performs a reduction using operator Op and then delivers the result to the callback cb.
template<typename OpT = collective::None, typename MsgPtrT, typename MsgT, ActiveTypedFnType<MsgT>* f>
auto reduce(MsgPtrT msg, Callback<MsgT> cb, ReduceStamp stamp = ReduceStamp{}) const -> PendingSendType
Reduce over the objgroup instances on each node with a callback target.
template<typename OpT = collective::None, typename MsgPtrT, typename MsgT = typename util::MsgPtrType<MsgPtrT>::MsgType>
auto reduce(MsgPtrT msg, Callback<MsgT> cb, ReduceStamp stamp = ReduceStamp{}) const -> PendingSendType
template<typename OpT = collective::None, typename FunctorT, typename MsgPtrT, typename MsgT = typename util::MsgPtrType<MsgPtrT>::MsgType, ActiveTypedFnType<MsgT>* f>
auto reduce(MsgPtrT msg, ReduceStamp stamp = ReduceStamp{}) const -> PendingSendType
Reduce over the objgroup instances on each node with a functor target.
template<typename OpT = collective::None, typename FunctorT, typename MsgPtrT, typename MsgT = typename util::MsgPtrType<MsgPtrT>::MsgType>
auto reduce(MsgPtrT msg, ReduceStamp stamp = ReduceStamp{}) const -> PendingSendType
template<typename MsgPtrT, typename MsgT = typename util::MsgPtrType<MsgPtrT>::MsgType, ActiveTypedFnType<MsgT>* f>
auto reduce(MsgPtrT msg, ReduceStamp stamp = ReduceStamp{}) const -> PendingSendType
Reduce over the objgroup instance on each node with target specified in reduction message type.
auto get() const -> ObjT*
Get raw pointer to the local object instance residing on the current node.
auto getProxy() const -> ObjGroupProxyType
Get the underlying proxy bits that are used to identify the objgroup.
template<typename BaseT>
auto castToBase() const -> Proxy<BaseT>
Cast typed proxy to the base class type for this objgroup.
void destroyCollective() const
Collective destroy this objgroup instance on all nodes.
template<typename T>
auto makeHandleRDMA(std::size_t count, bool is_uniform) const -> vt::rdma::Handle<T>
Make a new RDMA handle for this objgroup—a collective invocation.
template<typename T>
void destroyHandleRDMA(vt::rdma::Handle<T> handle) const
Destroy an RDMA handle created from this objgroup.
template<typename T>
auto makeHandleSetRDMA(int32_t max_elm, std::unordered_map<int32_t, std::size_t> const& map, bool is_uniform) const -> vt::rdma::HandleSet<T>
Make a new set of RDMA handles for this objgroup—a collective invocation. This is the overload for a potentially sparse set of handles with a non-zero starting index.
template<typename T>
auto makeHandleSetRDMA(int32_t max_elm, std::vector<std::size_t> const& vec, bool is_uniform) const -> vt::rdma::HandleSet<T>
Make a new set of RDMA handles for this objgroup—a collective invocation. This is the overload for a dense, start at zero set of handles to create.
template<typename T>
void destroyHandleSetRDMA(vt::rdma::HandleSet<T> handle) const
Destroy a set of RDMA handles created from this objgroup.
auto operator[](NodeType node) const -> ProxyElm<ObjT>
Index the proxy to get the element proxy for a particular node.
auto operator()(NodeType node) const -> ProxyElm<ObjT>
Index the proxy to get the element proxy for a particular node.
template<typename Serializer>
void serialize(Serializer& s)

Function documentation

template<typename ObjT>
vt::objgroup::proxy::Proxy<ObjT>::Proxy(ObjGroupProxyType in_proxy) explicit

Create a new proxy, called by the system.

Parameters
in_proxy in the proxy ID

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void vt::objgroup::proxy::Proxy<ObjT>::broadcast(MsgT* msg) const

Broadcast a message to all nodes to be delivered to the local object instance.

Parameters
msg in raw pointer to the message

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void vt::objgroup::proxy::Proxy<ObjT>::broadcast(MsgPtr<MsgT> msg) const

Broadcast a message to all nodes to be delivered to the local object instance.

Parameters
msg in managed pointer to the message

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::broadcastMsg(messaging::MsgPtrThief<MsgT> msg) const

Broadcast a message to all nodes to be delivered to the local object instance.

Parameters
msg in the message

template<typename ObjT> template<auto fn>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::broadcastMsg(messaging::MsgPtrThief<typename ObjFuncTraits<decltype(fn)>::MsgT> msg) const

Broadcast a message to all nodes to be delivered to the local object instance.

Parameters
msg in the message

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::broadcast(Args && ... args) const

Broadcast a message to all nodes to be delivered to the local object instance.

Parameters
args in args to pass to the message constructor

template<typename ObjT> template<auto fn, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::broadcast(Args && ... args) const

Broadcast a message to all nodes to be delivered to the local object instance.

Parameters
args in args to pass to the message constructor

template<typename ObjT> template<auto fn, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::multicast(GroupType type, Args && ... args) const

Multicast a message to nodes that are part of given group to be delivered to the local object instance.

Parameters
type in group to multicast
args in args to pass to the message constructor

template<typename ObjT> template<auto fn, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::multicast(group::region::Region::RegionUPtrType&& nodes, Args && ... args) const

Multicast a message to nodes specified by the region to be delivered to the local object instance.

Parameters
nodes in region of nodes to multicast to
args in args to pass to the message constructor

template<typename ObjT> template<auto f, template<typename Arg> class Op = collective::NoneOp, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::allreduce(Args && ... args) const

All-reduce back to this objgroup. Performs a reduction using operator Op followed by a broadcast to f with the result.

Parameters
args in the arguments to reduce.
Returns a pending send

template<typename ObjT> template<auto f, template<typename Arg> class Op = collective::NoneOp, typename Target, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::reduce(Target target, Args && ... args) const

Reduce back to a point target. Performs a reduction using operator Op followed by a send to f with the result.

Parameters
target
args in the arguments to reduce.
Returns a pending send

template<typename ObjT> template<template<typename Arg> class Op = collective::NoneOp, typename... CBArgs, typename... Args>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::reduce(vt::Callback<CBArgs...> cb, Args && ... args) const

Reduce back to an arbitrary callback. Performs a reduction using operator Op and then delivers the result to the callback cb.

Parameters
cb in the callback to trigger with the reduction result
args in the arguments to reduce.
Returns a pending send

template<typename ObjT> template<typename OpT = collective::None, typename MsgPtrT, typename MsgT, ActiveTypedFnType<MsgT>* f>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::reduce(MsgPtrT msg, Callback<MsgT> cb, ReduceStamp stamp = ReduceStamp{}) const

Reduce over the objgroup instances on each node with a callback target.

Parameters
msg in the reduction message
cb in the callback to trigger after the reduction is finished
stamp in the stamp to identify the reduction
Returns the PendingSend associated with the reduce

template<typename ObjT> template<typename OpT = collective::None, typename FunctorT, typename MsgPtrT, typename MsgT = typename util::MsgPtrType<MsgPtrT>::MsgType, ActiveTypedFnType<MsgT>* f>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::reduce(MsgPtrT msg, ReduceStamp stamp = ReduceStamp{}) const

Reduce over the objgroup instances on each node with a functor target.

Parameters
msg in the reduction message
stamp in the stamp to identify the reduction
Returns the PendingSend associated with the reduce

template<typename ObjT> template<typename MsgPtrT, typename MsgT = typename util::MsgPtrType<MsgPtrT>::MsgType, ActiveTypedFnType<MsgT>* f>
PendingSendType vt::objgroup::proxy::Proxy<ObjT>::reduce(MsgPtrT msg, ReduceStamp stamp = ReduceStamp{}) const

Reduce over the objgroup instance on each node with target specified in reduction message type.

Parameters
msg in the reduction message
stamp in the stamp to identify the reduction
Returns the PendingSend associated with the reduce

template<typename ObjT>
ObjT* vt::objgroup::proxy::Proxy<ObjT>::get() const

Get raw pointer to the local object instance residing on the current node.

Returns raw pointer to the object

template<typename ObjT>
ObjGroupProxyType vt::objgroup::proxy::Proxy<ObjT>::getProxy() const

Get the underlying proxy bits that are used to identify the objgroup.

Returns the proxy ID

template<typename ObjT> template<typename BaseT>
Proxy<BaseT> vt::objgroup::proxy::Proxy<ObjT>::castToBase() const

Cast typed proxy to the base class type for this objgroup.

Returns base class proxy

template<typename ObjT> template<typename T>
vt::rdma::Handle<T> vt::objgroup::proxy::Proxy<ObjT>::makeHandleRDMA(std::size_t count, bool is_uniform) const

Make a new RDMA handle for this objgroup—a collective invocation.

Parameters
count in the local count of T for this handle
is_uniform in whether all handles have the same count
Returns the new RDMA handle

template<typename ObjT> template<typename T>
void vt::objgroup::proxy::Proxy<ObjT>::destroyHandleRDMA(vt::rdma::Handle<T> handle) const

Destroy an RDMA handle created from this objgroup.

Parameters
handle in the handle to destroy

template<typename ObjT> template<typename T>
vt::rdma::HandleSet<T> vt::objgroup::proxy::Proxy<ObjT>::makeHandleSetRDMA(int32_t max_elm, std::unordered_map<int32_t, std::size_t> const& map, bool is_uniform) const

Make a new set of RDMA handles for this objgroup—a collective invocation. This is the overload for a potentially sparse set of handles with a non-zero starting index.

Parameters
max_elm in the largest lookup key on any node
map in a map of the handles and corresponding counts to create
is_uniform in whether all handles have the same count
Returns the new RDMA handle

template<typename ObjT> template<typename T>
vt::rdma::HandleSet<T> vt::objgroup::proxy::Proxy<ObjT>::makeHandleSetRDMA(int32_t max_elm, std::vector<std::size_t> const& vec, bool is_uniform) const

Make a new set of RDMA handles for this objgroup—a collective invocation. This is the overload for a dense, start at zero set of handles to create.

Parameters
max_elm in the largest lookup key on any node
vec in a vector of the handle counts to create
is_uniform in whether all handles have the same count
Returns the new RDMA handle

template<typename ObjT> template<typename T>
void vt::objgroup::proxy::Proxy<ObjT>::destroyHandleSetRDMA(vt::rdma::HandleSet<T> handle) const

Destroy a set of RDMA handles created from this objgroup.

Parameters
handle in the handle set to destroy

template<typename ObjT>
ProxyElm<ObjT> vt::objgroup::proxy::Proxy<ObjT>::operator[](NodeType node) const

Index the proxy to get the element proxy for a particular node.

Parameters
node in the desired node
Returns an indexed proxy to that node

template<typename ObjT>
ProxyElm<ObjT> vt::objgroup::proxy::Proxy<ObjT>::operator()(NodeType node) const

Index the proxy to get the element proxy for a particular node.

Parameters
node in the desired node
Returns an indexed proxy to that node