Yet Another eXchange Tool 0.11.4
Loading...
Searching...
No Matches
xt_exchanger.h File Reference

exchanging of data based on information provided by redist's More...

#include <stdbool.h>
#include <mpi.h>
#include "xt/xt_config.h"
#include "xt/xt_core.h"
#include "xt/xt_request.h"
#include "xt_redist_internal.h"
#include "core/ppm_visibility.h"
Include dependency graph for xt_exchanger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xt_exchanger_vtable
 
struct  Xt_exchanger_
 

Typedefs

typedef struct Xt_exchanger_omp_share_ * Xt_exchanger_omp_share
 
typedef struct Xt_exchanger_Xt_exchanger
 
typedef Xt_exchanger(* Xt_exchanger_new) (int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset, Xt_config config)
 

Enumerations

enum  { team_share_align = sizeof (void *) }
 

Functions

PPM_DSO_INTERNAL void xt_exchanger_s_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data)
 
PPM_DSO_INTERNAL void xt_exchanger_a_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data, Xt_request *request)
 
PPM_DSO_INTERNAL Xt_exchanger xt_exchanger_copy (Xt_exchanger orig, MPI_Comm new_comm, int new_tag_offset)
 
PPM_DSO_INTERNAL void xt_exchanger_delete (Xt_exchanger)
 
PPM_DSO_INTERNAL MPI_Datatype xt_exchanger_get_MPI_Datatype (Xt_exchanger exchanger, int rank, enum xt_msg_direction direction, bool do_dup)
 
PPM_DSO_INTERNAL int xt_exchanger_get_msg_ranks (Xt_exchanger exchanger, enum xt_msg_direction direction, int *restrict *ranks)
 
PPM_DSO_INTERNAL const struct xt_exchanger_vtablext_exchanger_new_get_vtable (Xt_exchanger_new exchanger_new)
 
PPM_DSO_INTERNAL size_t xt_exchanger_team_get_share_size (Xt_exchanger exchanger)
 
PPM_DSO_INTERNAL size_t xt_exchanger_new_team_get_share_size (Xt_exchanger_new exchanger_new)
 
PPM_DSO_INTERNAL void xt_exchanger_team_share_default_init (Xt_exchanger exchanger, void *share)
 
PPM_DSO_INTERNAL void xt_exchanger_new_team_share_default_init (Xt_exchanger_new exchanger_new, void *share)
 
PPM_DSO_INTERNAL void xt_exchanger_team_share_destroy (Xt_exchanger exchanger, void *share)
 
PPM_DSO_INTERNAL void xt_exchanger_new_team_share_destroy (Xt_exchanger_new exchanger_new, void *share)
 
PPM_DSO_INTERNAL Xt_exchanger_omp_share xt_exchanger_create_omp_share (Xt_exchanger exchanger)
 

Detailed Description

exchanging of data based on information provided by redist's

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_exchanger.h.

Typedef Documentation

◆ Xt_exchanger

typedef struct Xt_exchanger_* Xt_exchanger

Definition at line 69 of file xt_exchanger.h.

◆ Xt_exchanger_new

typedef Xt_exchanger(* Xt_exchanger_new) (int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset, Xt_config config)
Examples
test_exchanger_parallel.c.

Definition at line 159 of file xt_exchanger.h.

◆ Xt_exchanger_omp_share

typedef struct Xt_exchanger_omp_share_* Xt_exchanger_omp_share

Definition at line 67 of file xt_exchanger.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
team_share_align 

Definition at line 180 of file xt_exchanger.h.

Function Documentation

◆ xt_exchanger_a_exchange()

PPM_DSO_INTERNAL void xt_exchanger_a_exchange ( Xt_exchanger exchanger,
const void * src_data,
void * dst_data,
Xt_request * request )

Executes an asynchronous data exchange.

Parameters
[in]exchangerexchanger object
[in]src_datasource data
[out]dst_datadestination data
[out]requestpointer that will reference request object created for duration of exchange

Definition at line 77 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_copy()

PPM_DSO_INTERNAL Xt_exchanger xt_exchanger_copy ( Xt_exchanger orig,
MPI_Comm new_comm,
int new_tag_offset )

Copies an exchange object.

Parameters
[in]origexchanger object to be copied
[in]new_commcommunicator to be used by the new exchanger
[in]new_tag_offsetnew tag_offset

Definition at line 62 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_create_omp_share()

PPM_DSO_INTERNAL Xt_exchanger_omp_share xt_exchanger_create_omp_share ( Xt_exchanger exchanger)

Given an exchanger, create an object holding shared data for multi-threaded invocation.

Parameters
[in]exchangerexchanger to prepare the shared data for.

Definition at line 99 of file xt_exchanger.c.

◆ xt_exchanger_delete()

PPM_DSO_INTERNAL void xt_exchanger_delete ( Xt_exchanger exchanger)

Destructor for an exchanger.

Definition at line 67 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_get_MPI_Datatype()

PPM_DSO_INTERNAL MPI_Datatype xt_exchanger_get_MPI_Datatype ( Xt_exchanger exchanger,
int rank,
enum xt_msg_direction direction,
bool do_dup )

gets a copy of the MPI_Datatype used for a specificed message

Parameters
[in]exchangerexchanger object
[in]rankMPI rank
[in]directionspecific whether the datatype of an incoming or outgoing message is requested
[in]do_dupmpi datatype copy will be dup if true
Returns
MPI_Datatype for the specificed message
Remarks
returns MPI_DATATYPE_NULL if there is no message matching the specificed configuration

Definition at line 93 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_get_msg_ranks()

PPM_DSO_INTERNAL int xt_exchanger_get_msg_ranks ( Xt_exchanger exchanger,
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 specificed message.

Parameters
[in]exchangerexchanger 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 85 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_new_get_vtable()

PPM_DSO_INTERNAL const struct xt_exchanger_vtable * xt_exchanger_new_get_vtable ( Xt_exchanger_new exchanger_new)

Given an exchanger constructor, query the vtable pointer

Parameters
[in]exchanger_newfunction to create new exchanger to query vtable pointer for
Returns
vtable pointer

Definition at line 64 of file xt_exchanger_vtable.c.

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

◆ xt_exchanger_new_team_get_share_size()

PPM_DSO_INTERNAL size_t xt_exchanger_new_team_get_share_size ( Xt_exchanger_new exchanger_new)

Given an exchanger constructor, query the size of shared data for a team.

Parameters
[in]exchanger_newfunction to create new exchanger to query team shared data size for.
Returns
size of shared data

Definition at line 61 of file xt_exchanger_team.c.

Here is the call graph for this function:

◆ xt_exchanger_new_team_share_default_init()

PPM_DSO_INTERNAL void xt_exchanger_new_team_share_default_init ( Xt_exchanger_new exchanger_new,
void * share )

Given an exchanger constructor, initialize shared data for a team to default values.

Parameters
[in]exchanger_newexchanger constructor to default initialize team shared data for.
[out]shareobject to initialize

Definition at line 76 of file xt_exchanger_team.c.

Here is the call graph for this function:

◆ xt_exchanger_new_team_share_destroy()

PPM_DSO_INTERNAL void xt_exchanger_new_team_share_destroy ( Xt_exchanger_new exchanger_new,
void * share )

Given an exchanger constructor, destroy shared data for a team and reset to default values.

This call is collective for all MPI ranks in the communicator the exchanger team was constructed for.

Parameters
[in]exchanger_newexchanger constructor to destroy team shared data for.
[out]shareshared state object to destroy

Definition at line 94 of file xt_exchanger_team.c.

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

◆ xt_exchanger_s_exchange()

PPM_DSO_INTERNAL void xt_exchanger_s_exchange ( Xt_exchanger exchanger,
const void * src_data,
void * dst_data )

Executes a synchronous data exchange.

Parameters
[in]exchangerexchanger object
[in]src_datasource data
[out]dst_datadestination data

Definition at line 72 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_team_get_share_size()

PPM_DSO_INTERNAL size_t xt_exchanger_team_get_share_size ( Xt_exchanger exchanger)

Given an exchanger, query the size of shared data for a team.

Parameters
[in]exchangerexchanger object to query team shared data size for.
Returns
size of shared data

Definition at line 55 of file xt_exchanger_team.c.

◆ xt_exchanger_team_share_default_init()

PPM_DSO_INTERNAL void xt_exchanger_team_share_default_init ( Xt_exchanger exchanger,
void * share )

Given an exchanger, initialize shared data for a team to default values.

Parameters
[in]exchangerexchanger object to default initialize team shared data for.
[out]shareobject to initialize

Definition at line 67 of file xt_exchanger_team.c.

◆ xt_exchanger_team_share_destroy()

PPM_DSO_INTERNAL void xt_exchanger_team_share_destroy ( Xt_exchanger exchanger,
void * share )

Given an exchanger, destroy shared data for a team and reset to default values. This call is collective for all MPI ranks in the communicator the exchanger was constructed for.

Parameters
[in]exchangerexchanger object to destroy team shared data for.
[out]shareobject to destroy

Definition at line 86 of file xt_exchanger_team.c.