Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
xt_xmap.h File Reference

exchange map declarations More...

#include "xt/xt_core.h"
#include "xt/xt_config.h"
Include dependency graph for xt_xmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct Xt_xmap_iter_Xt_xmap_iter
 

Enumerations

enum  xt_reorder_type { XT_REORDER_NONE , XT_REORDER_SEND_UP , XT_REORDER_RECV_UP }
 

Functions

MPI_Comm xt_xmap_get_communicator (Xt_xmap xmap)
 
int xt_xmap_get_num_destinations (Xt_xmap xmap)
 
int xt_xmap_get_num_sources (Xt_xmap xmap)
 
void xt_xmap_get_destination_ranks (Xt_xmap xmap, int *ranks)
 
void xt_xmap_get_source_ranks (Xt_xmap xmap, int *ranks)
 
Xt_xmap_iter xt_xmap_get_out_iterator (Xt_xmap xmap)
 
Xt_xmap_iter xt_xmap_get_in_iterator (Xt_xmap xmap)
 
int xt_xmap_iterator_next (Xt_xmap_iter iter)
 
int xt_xmap_iterator_get_rank (Xt_xmap_iter iter)
 
int const * xt_xmap_iterator_get_transfer_pos (Xt_xmap_iter iter)
 
int xt_xmap_iterator_get_num_transfer_pos (Xt_xmap_iter iter)
 
const struct Xt_pos_extxt_xmap_iterator_get_transfer_pos_ext (Xt_xmap_iter iter)
 
int xt_xmap_iterator_get_num_transfer_pos_ext (Xt_xmap_iter iter)
 
void xt_xmap_iterator_delete (Xt_xmap_iter iter)
 
Xt_xmap xt_xmap_copy (Xt_xmap xmap)
 
void xt_xmap_delete (Xt_xmap xmap)
 
int xt_xmap_get_max_src_pos (Xt_xmap xmap)
 
int xt_xmap_get_max_dst_pos (Xt_xmap xmap)
 
Xt_xmap xt_xmap_reorder (Xt_xmap xmap, enum xt_reorder_type type)
 
Xt_xmap xt_xmap_reorder_custom (Xt_xmap xmap, enum xt_reorder_type type, Xt_config config)
 
Xt_xmap xt_xmap_update_positions (Xt_xmap xmap, const int *src_positions, const int *dst_positions)
 
Xt_xmap xt_xmap_spread (Xt_xmap xmap, int num_repetitions, const int src_displacements[num_repetitions], const int dst_displacements[num_repetitions])
 

Detailed Description

exchange map declarations

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

methods to be used with Xt_xmap

Definition in file xt_xmap.h.

Typedef Documentation

◆ Xt_xmap_iter

typedef struct Xt_xmap_iter_* Xt_xmap_iter

Definition at line 73 of file xt_xmap.h.

Enumeration Type Documentation

◆ xt_reorder_type

Enumerator
XT_REORDER_NONE 

no reordering

XT_REORDER_SEND_UP 

optimise data access on sender side

XT_REORDER_RECV_UP 

optimise data access on receiver side

Definition at line 240 of file xt_xmap.h.

Function Documentation

◆ xt_xmap_copy()

Xt_xmap xt_xmap_copy ( Xt_xmap  xmap)

copy constructor for an exchange map

Parameters
[in]xmapexchange map to be copied

Definition at line 81 of file xt_xmap.c.

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

◆ xt_xmap_delete()

void xt_xmap_delete ( Xt_xmap  xmap)

destructor for an exchange map

Parameters
[in]xmapexchange map to be destroyed

Definition at line 86 of file xt_xmap.c.

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

◆ xt_xmap_get_communicator()

MPI_Comm xt_xmap_get_communicator ( Xt_xmap  xmap)

gets the MPI communicator of the exchange map

Parameters
[in]xmapexchange map
Returns
MPI communicator of the exchange map

Definition at line 56 of file xt_xmap.c.

Here is the caller graph for this function:

◆ xt_xmap_get_destination_ranks()

void xt_xmap_get_destination_ranks ( Xt_xmap  xmap,
int *  ranks 
)

gets the ranks of processes that will require data from the local process in an exchange operation

Parameters
[in]xmapexchange map
[out]ranksranks of processes that will require data from the local process in an exchange operation
Remarks
the user needs to provide an array for ranks that is sufficient in size to store all ranks

Definition at line 71 of file xt_xmap.c.

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

◆ xt_xmap_get_in_iterator()

Xt_xmap_iter xt_xmap_get_in_iterator ( Xt_xmap  xmap)

gets an iterator for all local incoming messages of an exchange operation

Parameters
[in]xmapexchange map
Returns
iterator for all local incoming messages
is NULL if there are no local incoming messages

Definition at line 91 of file xt_xmap.c.

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

◆ xt_xmap_get_max_dst_pos()

int xt_xmap_get_max_dst_pos ( Xt_xmap  xmap)

gives an upper limit to the range of positions in the dst part of the transfer_pos,

Parameters
[in]xmapexchange map
Returns
upper limit of range of positions in the destination list

Definition at line 139 of file xt_xmap.c.

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

◆ xt_xmap_get_max_src_pos()

int xt_xmap_get_max_src_pos ( Xt_xmap  xmap)

gives an upper limit to the range of positions in the src part of the transfer_pos,

Parameters
[in]xmapexchange map
Returns
upper limit of range of positions in the source list

Definition at line 135 of file xt_xmap.c.

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

◆ xt_xmap_get_num_destinations()

int xt_xmap_get_num_destinations ( Xt_xmap  xmap)

gets the number of processes that will require data from the local process in an exchange operation

Parameters
[in]xmapexchange map
Returns
number of processes that will require data from the local process in an exchange operation

Definition at line 61 of file xt_xmap.c.

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

◆ xt_xmap_get_num_sources()

int xt_xmap_get_num_sources ( Xt_xmap  xmap)

gets the number of processes from which the local process will require data in an exchange operation

Parameters
[in]xmapexchange map
Returns
number of prosses from which the local process will require data in an exchange operation

Definition at line 66 of file xt_xmap.c.

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

◆ xt_xmap_get_out_iterator()

Xt_xmap_iter xt_xmap_get_out_iterator ( Xt_xmap  xmap)

gets an iterator for all local outgoing messages of an exchange operation

Parameters
[in]xmapexchange map
Returns
iterator for all local outgoing messages
is NULL if there are no local outgoing messages

Definition at line 96 of file xt_xmap.c.

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

◆ xt_xmap_get_source_ranks()

void xt_xmap_get_source_ranks ( Xt_xmap  xmap,
int *  ranks 
)

gets the ranks of processes from which the local process will require data in an exchange operation

Parameters
[in]xmapexchange map
[out]ranksranks of processes from which the local process will required data in an exchange operation
Remarks
the user needs to provide an array for ranks that is sufficient in size to store all ranks

Definition at line 76 of file xt_xmap.c.

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

◆ xt_xmap_iterator_delete()

void xt_xmap_iterator_delete ( Xt_xmap_iter  iter)

destructor for an exchange map iterator

Parameters
[in]iterexchange map iterator

Definition at line 130 of file xt_xmap.c.

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

◆ xt_xmap_iterator_get_num_transfer_pos()

int xt_xmap_iterator_get_num_transfer_pos ( Xt_xmap_iter  iter)

get the number of positions returned by xt_xmap_iterator_get_transfer_pos of the current item of an exchange map iterator

Parameters
[in]iterexchange map iterator
Returns
number of positions returned by xt_xmap_iterator_get_transfer_pos for the current item

Definition at line 116 of file xt_xmap.c.

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

◆ xt_xmap_iterator_get_num_transfer_pos_ext()

int xt_xmap_iterator_get_num_transfer_pos_ext ( Xt_xmap_iter  iter)

get the number of position extents returned by xt_xmap_iterator_get_transfer_pos_ext of the current item of an exchange map iterator

Parameters
[in]iterexchange map iterator
Returns
number of positions returned by xt_xmap_iterator_get_transfer_pos_ext for the current item

Definition at line 126 of file xt_xmap.c.

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

◆ xt_xmap_iterator_get_rank()

int xt_xmap_iterator_get_rank ( Xt_xmap_iter  iter)

gets the rank of the current item of an exchange map iterator

Parameters
[in]iterexchange map iterator
Returns
rank of the current item

Definition at line 106 of file xt_xmap.c.

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

◆ xt_xmap_iterator_get_transfer_pos()

int const * xt_xmap_iterator_get_transfer_pos ( Xt_xmap_iter  iter)

get the positions of all element of the current item of an exchange map iterator

Parameters
[in]iterexchange map iterator
Returns
exchange list of the current item

Definition at line 111 of file xt_xmap.c.

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

◆ xt_xmap_iterator_get_transfer_pos_ext()

const struct Xt_pos_ext * xt_xmap_iterator_get_transfer_pos_ext ( Xt_xmap_iter  iter)

get the position ranges of all element of the current item of an exchange map iterator as position extents

Parameters
[in]iterexchange map iterator
Returns
exchange list of the current item

Definition at line 122 of file xt_xmap.c.

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

◆ xt_xmap_iterator_next()

int xt_xmap_iterator_next ( Xt_xmap_iter  iter)

sets an exchange map iterator to the next item

Parameters
[in,out]iterexchange map iterator
Returns
returns 0 if there was no further item

Definition at line 101 of file xt_xmap.c.

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

◆ xt_xmap_reorder()

Xt_xmap xt_xmap_reorder ( Xt_xmap  xmap,
enum xt_reorder_type  type 
)

reorder positions

Parameters
[in]xmapexchange map
[in]typereorder pattern to be used
Returns
copy of input xmap with reordered positions
Remarks
This routine is collective for all processes associated with the exchange map.

Definition at line 143 of file xt_xmap.c.

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

◆ xt_xmap_reorder_custom()

Xt_xmap xt_xmap_reorder_custom ( Xt_xmap  xmap,
enum xt_reorder_type  type,
Xt_config  config 
)

reorder positions

Parameters
[in]xmapexchange map
[in]typereorder pattern to be used
[in]configconfiguration object for custom settings
Returns
copy of input xmap with reordered positions
Remarks
This routine is collective for all processes associated with the exchange map.

Definition at line 148 of file xt_xmap.c.

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

◆ xt_xmap_spread()

Xt_xmap xt_xmap_spread ( Xt_xmap  xmap,
int  num_repetitions,
const int  src_displacements[num_repetitions],
const int  dst_displacements[num_repetitions] 
)

inflate the pattern stored in the exchange map by repeating it at provided offsets

Parameters
[in]xmapexchange map
[in]num_repetitionsnumber of repetitions of the given data map
[in]src_displacementsdisplacements for source repetitions
[in]dst_displacementsdisplacements for destination repetitions
Returns
copy of input xmap, which is spread into multiple repetitions with given displacements
Remarks
This routine is collective for all processes associated with the exchange map.

Definition at line 159 of file xt_xmap.c.

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

◆ xt_xmap_update_positions()

Xt_xmap xt_xmap_update_positions ( Xt_xmap  xmap,
const int *  src_positions,
const int *  dst_positions 
)

updates positions of indices

Parameters
[in]xmapexchange map
[in]src_positionsupdated positions for all source indices
[in]dst_positionsupdated positions for all destination indices
Returns
copy of input xmap with updated positions
Remarks
an index that was at position x is now at position positions[x]
positions array needs to have a size of at least xt_xmap_get_max_dst_pos (xmap) + 1
If NULL is passed instead of a positions array, the respective source and/or destination positions are not updated

Definition at line 154 of file xt_xmap.c.

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