Functional description¶
Index for list of elements¶
Integral index type Xt_idx
is used to describe both global indices as well as local array positions. A first implementation for a list of indices will be Xt_idxvec
, which simply stores an array of indices.
Exchange Map for communication¶
Xt_xmap
defines the mapping of subsets of global indices between ranks.
struct Xt_xmap {
struct {
// list of global indices to send or receive from partner rank
struct Xt_idxvec *intersect;
int rank;
} *dst_msg, *src_msg;
int ndst, nsrc;
MPI_Comm comm;
};
Combine the Xt_xmap
with global to local indices map to create an Xt_xplan
struct Xt_xplan {
struct {
// list of relative positions in memory to send or receive
struct Xt_idxvec *xlist;
int rank;
} *dst_msg, *src_msg;
int ndst, nsrc;
};
Description of actual data redistribution¶
Xt_redist
and derived classes describe the data sent to and/or received from each communication partner.
A first implementation is imagined to look this way:
struct Xt_redist {
struct Xt_redist_vtable *vtable;
}
The list of operations initially should include:
- execute data exchange from one distribution to another
- synchronously
- asynchronously
- destructor
The following constructors are expected:
- Combine
Xt_xmap
, two single MPI datatypes to array redistribution (for one or two arrays) description. - Combine two @Xt_redist@s to aggregate redistribution.
- Combine
Xt_xmap
, an additional offset list and two single MPI datatype to single instance redistribution (for unitrans compatibility).