Yet Another eXchange Tool  0.9.0
Classes | Enumerations | Functions
xt_redist_internal.h File Reference

redistribution of data, non-public declarations More...

#include <stdlib.h>
#include <mpi.h>
#include "xt/xt_redist.h"
#include "xt/xt_request.h"
Include dependency graph for xt_redist_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xt_redist_vtable
 
struct  Xt_redist_
 

Enumerations

enum  xt_msg_direction { SEND , RECV }
 

Functions

void xt_redist_msgs_strided_copy (size_t n, const struct Xt_redist_msg *restrict src, size_t src_stride, struct Xt_redist_msg *restrict dst, size_t dst_stride, MPI_Comm comm)
 
void xt_redist_msgs_strided_destruct (size_t n, struct Xt_redist_msg *msgs, MPI_Comm comm, size_t ofs_stride)
 
static void xt_redist_msgs_free (size_t n, struct Xt_redist_msg *msgs, MPI_Comm comm)
 
void xt_redist_check_comms (Xt_redist *redists, int num_redists, MPI_Comm comm)
 
int xt_redist_get_msg_ranks (Xt_redist redist, enum xt_msg_direction direction, int *restrict *ranks)
 
MPI_Datatype xt_redist_get_MPI_Datatype (Xt_redist redist, int rank, enum xt_msg_direction direction)
 
MPI_Datatype xt_create_compound_datatype (size_t count, const MPI_Aint displacements[count], const MPI_Datatype datatypes[count], const int block_lengths[count], MPI_Comm comm)
 
unsigned xt_redist_agg_msg_count (size_t num_redists, enum xt_msg_direction direction, const Xt_redist redists[num_redists], size_t num_ranks[num_redists], int *restrict ranks[num_redists])
 

Detailed Description

redistribution of data, non-public declarations

contains declaration the redistribution data structure, which is derived from one or more xt_xmaps

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_redist_internal.h.

Enumeration Type Documentation

◆ xt_msg_direction

Enumerator
SEND 
RECV 

Definition at line 63 of file xt_redist_internal.h.

Function Documentation

◆ xt_create_compound_datatype()

MPI_Datatype xt_create_compound_datatype ( size_t  count,
const MPI_Aint  displacements[count],
const MPI_Datatype  datatypes[count],
const int  block_lengths[count],
MPI_Comm  comm 
)

Generates a new MPI derived datatype from a number of MPI derived datatypes.

Parameters
[in]countnumber of datatypes
[in]displacementsbyte displacement of each block
[in]datatypestype of elements in each block
[in]block_lengthsnumber of elements in each block
[in]commcommunicator
Returns
new MPI derived datatype

Definition at line 239 of file xt_redist.c.

Here is the caller graph for this function:

◆ xt_redist_agg_msg_count()

unsigned xt_redist_agg_msg_count ( size_t  num_redists,
enum xt_msg_direction  direction,
const Xt_redist  redists[num_redists],
size_t  num_ranks[num_redists],
int *restrict  ranks[num_redists] 
)

Determines number of processes that receive data from/send data to the local processes by any redists provided to this routine.

Parameters
[in]num_redistsnumber of redistribution objects
[in]directionspecifices whether the of outgoing or incoming message is to be determined
[in]redistsredistribution objects
[out]num_ranksnumber of incoming/outgoing messages per redist
[out]ranksranks of communicator partners for each redist
Returns
Number of processes that receive data from/send data to the local process.
Remarks
the user needs to ensure that rank arrays are big enough to hold all ranks

Definition at line 217 of file xt_redist.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_check_comms()

void xt_redist_check_comms ( Xt_redist redists,
int  num_redists,
MPI_Comm  comm 
)

Checks whether a number of redists are based on the same communicator. This is a requirement in case these redists are to be combined into a redist collection.

Parameters
[in]redistsredistribution objects to be checked
[in]num_redistsnumber of redistribution objects is redists
[in]commreference communicator
Remarks
In case this check fails, it will abort the program.

Definition at line 169 of file xt_redist.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_get_MPI_Datatype()

MPI_Datatype xt_redist_get_MPI_Datatype ( Xt_redist  redist,
int  rank,
enum xt_msg_direction  direction 
)

Gets a MPI derived datatype that encodes all data sent/received in a specified message.

Parameters
[in]redistredistribution object
[in]rankMPI rank of the communicator partner
[in]directionspecifices whether the datatype for an outgoing or incoming message is requested
Returns
Datatype for the specified message. The return value is MPI_DATATYPE_NULL, if no data for the specified message.

Definition at line 117 of file xt_redist.c.

Here is the caller graph for this function:

◆ xt_redist_get_msg_ranks()

int xt_redist_get_msg_ranks ( Xt_redist  redist,
enum xt_msg_direction  direction,
int *restrict *  ranks 
)

Gets the ranks of all processes that receive data from/send data to the local process in the exchanges defined by the redist.

Parameters
[in]redistredistribution object
[in]directionspecifices whether ranks for the outgoing or incoming messages are requested
[out]ranksranks for all outgoing/incoming messages
Returns
number of outgoing/incoming message
Remarks
the user needs to ensure that array ranks is big enough to hold all ranks

Definition at line 128 of file xt_redist.c.

Here is the caller graph for this function:

◆ xt_redist_msgs_free()

static void xt_redist_msgs_free ( size_t  n,
struct Xt_redist_msg msgs,
MPI_Comm  comm 
)
inlinestatic

Definition at line 95 of file xt_redist_internal.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_msgs_strided_copy()

void xt_redist_msgs_strided_copy ( size_t  n,
const struct Xt_redist_msg *restrict  src,
size_t  src_stride,
struct Xt_redist_msg *restrict  dst,
size_t  dst_stride,
MPI_Comm  comm 
)

Definition at line 136 of file xt_redist.c.

Here is the caller graph for this function:

◆ xt_redist_msgs_strided_destruct()

void xt_redist_msgs_strided_destruct ( size_t  n,
struct Xt_redist_msg msgs,
MPI_Comm  comm,
size_t  ofs_stride 
)

Definition at line 156 of file xt_redist.c.

Here is the caller graph for this function: