44#if !defined INCLUDED_VT_RDMAHANDLE_SUB_HANDLE_H
45#define INCLUDED_VT_RDMAHANDLE_SUB_HANDLE_H
54#include <unordered_map>
56namespace vt {
namespace rdma {
64template <
typename T, HandleEnum E,
typename IndexT>
74 SubInfo(uint64_t in_count, uint64_t in_offset)
84 ProxyType in_proxy,
bool in_is_migratable, IndexT in_range,
90 typename IndexT::DenseIndexType
linearize(IndexT idx);
100 void get(IndexT
const& idx,
Lock l, T* ptr, uint64_t len,
int offset);
102 std::size_t
getCount(IndexT
const& idx,
Lock l = Lock::Shared);
105 IndexT
const& idx,
Lock l, T* ptr, uint64_t len,
int offset
109 IndexT
const& idx,
Lock l, T* ptr, uint64_t len,
int offset
112 void put(IndexT
const& idx,
Lock l, T* ptr, uint64_t len,
int offset);
115 IndexT
const& idx,
Lock l, T* ptr, uint64_t len,
int offset,
120 IndexT
const& idx,
Lock l, T* ptr, uint64_t len,
int offset,
124 T
fetchOp(IndexT
const& idx,
Lock l, T ptr,
int offset, MPI_Op op);
128 template <
typename Callable>
129 void access(IndexT idx,
Lock l, Callable fn, uint64_t offset);
165 template <mapping::ActiveMapTypedFnType<IndexT> map_fn>
167 bool in_is_migratable, IndexT in_range,
bool in_dense_start_with_zero
170 bool in_is_migratable, IndexT in_range,
bool in_dense_start_with_zero,
175 template <
typename U>
Definition base_index.h:49
Definition rdma_channel.cc:50
Lock
Definition lock_mpi.h:52
PhysicalResourceType NodeType
Used to hold the current node/rank or the number of nodes.
Definition types_type.h:57
int64_t HandlerType
Used to hold a handler ID which identifier a function pointer/context.
Definition types_type.h:63
A indexable proxy to object instances on all nodes that are tied together with a common ID.
Definition proxy_objgroup.h:78
Handle specialization for index-level RDMA access (overdecomposed).
Definition handle.fwd.h:58
Definition index_info.h:51
Definition request_holder.h:56
uint64_t count_
Definition sub_handle.h:78
SubInfo(uint64_t in_count, uint64_t in_offset)
Definition sub_handle.h:74
uint64_t offset_
Definition sub_handle.h:79
void migratedInIndex(IndexT index)
Definition sub_handle.impl.h:554
std::size_t count_if_uniform_
Definition sub_handle.h:193
ProxyType proxy_
Definition sub_handle.h:179
std::vector< IndexT > migrate_out_
Definition sub_handle.h:195
bool ready_
Definition sub_handle.h:190
static void destroyCollective(ProxyType proxy)
Definition sub_handle.impl.h:528
void deleteHandle()
Definition sub_handle.impl.h:481
bool dense_start_with_zero_
Definition sub_handle.h:199
Handle< uint64_t, E > loc_handle_
Definition sub_handle.h:188
void makeSubHandles(bool initial=true)
Definition sub_handle.impl.h:67
Handle< T, E, IndexT > addLocalIndex(IndexT index, uint64_t count)
Definition sub_handle.impl.h:423
std::vector< IndexT > migrate_in_
Definition sub_handle.h:196
std::size_t getCount(IndexT const &idx, Lock l=Lock::Shared)
Definition sub_handle.impl.h:337
bool is_migratable_
Definition sub_handle.h:180
void put(IndexT const &idx, Lock l, T *ptr, uint64_t len, int offset)
Definition sub_handle.impl.h:369
IndexT::DenseIndexType linearize(IndexT idx)
Definition sub_handle.impl.h:145
bool ordered_opt_
Definition sub_handle.h:197
std::unordered_map< IndexT, int > ordered_local_offset_
Definition sub_handle.h:198
void updateInfo(IndexT const &idx, IndexInfo info, NodeType home)
Definition sub_handle.impl.h:187
vt::objgroup::proxy::Proxy< SubHandle< T, E, IndexT > > ProxyType
Definition sub_handle.h:67
std::size_t collection_expected_count_
Definition sub_handle.h:194
std::size_t getNumActiveHandles() const
Definition sub_handle.impl.h:476
bool ready() const
Definition sub_handle.h:145
std::unordered_map< IndexT, std::size_t > sub_handles_staged_
Definition sub_handle.h:184
RequestHolder rget(IndexT const &idx, Lock l, T *ptr, uint64_t len, int offset)
Definition sub_handle.impl.h:347
void waitForHandleReady(Handle< U, E > const &h)
Definition sub_handle.impl.h:517
vt::HandlerType map_han_
Definition sub_handle.h:181
void migratedOutIndex(IndexT index)
Definition sub_handle.impl.h:544
RequestHolder rput(IndexT const &idx, Lock l, T *ptr, uint64_t len, int offset)
Definition sub_handle.impl.h:358
int getOrderedOffset(IndexT idx, NodeType home_node)
Definition sub_handle.impl.h:163
IndexT range_
Definition sub_handle.h:182
bool mpi2_
Definition sub_handle.h:191
Handle< T, vt::rdma::HandleEnum::StaticSize, IndexT > HandleType
Definition sub_handle.h:66
static ProxyType construct(bool in_is_migratable, IndexT in_range, bool in_dense_start_with_zero)
Definition sub_handle.impl.h:493
RequestHolder raccum(IndexT const &idx, Lock l, T *ptr, uint64_t len, int offset, MPI_Op op)
Definition sub_handle.impl.h:379
std::size_t getNumHandles() const
Definition sub_handle.impl.h:471
void destroy()
Definition sub_handle.impl.h:522
std::size_t getNumDeletedHandles() const
Definition sub_handle.impl.h:486
void stageLocalIndex(IndexT index, uint64_t count)
Definition sub_handle.impl.h:434
bool isUniform() const
Definition sub_handle.h:126
std::vector< uint64_t > sub_prefix_
Definition sub_handle.h:186
void access(IndexT idx, Lock l, Callable fn, uint64_t offset)
Definition sub_handle.impl.h:413
IndexInfo fetchInfo(IndexT const &idx)
Definition sub_handle.impl.h:228
void afterLB()
Definition sub_handle.impl.h:574
Handle< T, E > data_handle_
Definition sub_handle.h:187
Cache< IndexT > cache_
Definition sub_handle.h:189
bool uniform_size_
Definition sub_handle.h:192
uint64_t totalLocalCount() const
Definition sub_handle.impl.h:462
std::size_t getCollectionExpected() const
Definition sub_handle.impl.h:534
void get(IndexT const &idx, Lock l, T *ptr, uint64_t len, int offset)
Definition sub_handle.impl.h:327
void accum(IndexT const &idx, Lock l, T *ptr, uint64_t len, int offset, MPI_Op op)
Definition sub_handle.impl.h:391
std::unordered_map< IndexT, SubInfo > sub_handles_
Definition sub_handle.h:183
NodeType getHomeNode(IndexT const &idx)
Definition sub_handle.impl.h:155
T fetchOp(IndexT const &idx, Lock l, T ptr, int offset, MPI_Op op)
Definition sub_handle.impl.h:402
void initialize(ProxyType in_proxy, bool in_is_migratable, IndexT in_range, vt::HandlerType map_han, bool in_dense_start_with_zero)
Definition sub_handle.impl.h:54
void setCollectionExpected(std::size_t count)
Definition sub_handle.impl.h:539
IndexInfo resolveLocation(IndexT const &idx)
Definition sub_handle.impl.h:310
std::vector< IndexT > sub_layout_
Definition sub_handle.h:185
std::size_t deleted_count_
Definition sub_handle.h:200
void checkChanged(impl::ReduceLBMsg *msg)
Definition sub_handle.impl.h:592
Definition sub_handle.impl.h:565