#include <assert.h>
#include <mpi.h>
#include <stdbool.h>
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt/xt_mpi.h"
#include "xt_config_internal.h"
#include "xt_mpi_internal.h"
#include "xt_redist_internal.h"
#include "xt_exchanger.h"
#include "xt_exchanger_simple_base.h"
#include "xt_quicksort_base.h"
Go to the source code of this file.
|
#define | XT_SORTFUNC_DECL static |
|
#define | SORT_TYPE struct Xt_redist_msg |
|
#define | SORT_TYPE_SUFFIX redist_msg |
|
#define | SORT_TYPE_CMP_LT(u, v, i, j) |
|
#define | SORT_TYPE_CMP_LE(u, v, i, j) |
|
#define | SORT_TYPE_CMP_EQ(u, v, i, j) (((u).rank) == ((v).rank)) |
|
#define | XT_SORT_EXTRA_ARGS_DECL , int comm_rank, int comm_size |
|
#define | XT_SORT_EXTRA_ARGS_PASS , comm_rank, comm_size |
|
#define | XT_SORT_VECSWAP_EXTRA_ARGS_DECL |
|
#define | XT_SORT_VECSWAP_EXTRA_ARGS_PASS |
|
|
static Xt_exchanger | xt_exchanger_simple_base_copy (Xt_exchanger exchanger, MPI_Comm newComm, int new_tag_offset) |
|
static void | xt_exchanger_simple_base_delete (Xt_exchanger exchanger) |
|
static void | xt_exchanger_simple_base_s_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data) |
|
static void | xt_exchanger_simple_base_a_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data, Xt_request *request) |
|
static int | xt_exchanger_simple_base_get_msg_ranks (Xt_exchanger exchanger, enum xt_msg_direction direction, int *restrict *ranks) |
|
static MPI_Datatype | xt_exchanger_simple_base_get_MPI_Datatype (Xt_exchanger exchanger, int rank, enum xt_msg_direction direction, bool do_dup) |
|
static Xt_exchanger_omp_share | xt_exchanger_simple_base_create_omp_share (Xt_exchanger exchanger) |
|
static Xt_exchanger_simple_base | xt_exchanger_simple_base_alloc (size_t nmsg) |
|
static int | adjusted_rank (int r, int comm_rank, int comm_size) |
|
Xt_exchanger | xt_exchanger_simple_base_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_simple_s_exchange_func s_func, xt_simple_a_exchange_func a_func, xt_simple_create_omp_share_func create_omp_share_func, Xt_config config) |
|
◆ SORT_TYPE
◆ SORT_TYPE_CMP_EQ
#define SORT_TYPE_CMP_EQ |
( |
| u, |
|
|
| v, |
|
|
| i, |
|
|
| j ) (((u).rank) == ((v).rank)) |
◆ SORT_TYPE_CMP_LE
#define SORT_TYPE_CMP_LE |
( |
| u, |
|
|
| v, |
|
|
| i, |
|
|
| j ) |
◆ SORT_TYPE_CMP_LT
#define SORT_TYPE_CMP_LT |
( |
| u, |
|
|
| v, |
|
|
| i, |
|
|
| j ) |
◆ SORT_TYPE_SUFFIX
#define SORT_TYPE_SUFFIX redist_msg |
◆ XT_SORT_EXTRA_ARGS_DECL
#define XT_SORT_EXTRA_ARGS_DECL , int comm_rank, int comm_size |
◆ XT_SORT_EXTRA_ARGS_PASS
#define XT_SORT_EXTRA_ARGS_PASS , comm_rank, comm_size |
◆ XT_SORT_VECSWAP_EXTRA_ARGS_DECL
#define XT_SORT_VECSWAP_EXTRA_ARGS_DECL |
◆ XT_SORT_VECSWAP_EXTRA_ARGS_PASS
#define XT_SORT_VECSWAP_EXTRA_ARGS_PASS |
◆ XT_SORTFUNC_DECL
#define XT_SORTFUNC_DECL static |
◆ Xt_exchanger_simple_base
◆ adjusted_rank()
static int adjusted_rank |
( |
int | r, |
|
|
int | comm_rank, |
|
|
int | comm_size ) |
|
inlinestatic |
◆ xt_exchanger_simple_base_a_exchange()
static void xt_exchanger_simple_base_a_exchange |
( |
Xt_exchanger | exchanger, |
|
|
const void * | src_data, |
|
|
void * | dst_data, |
|
|
Xt_request * | request ) |
|
static |
◆ xt_exchanger_simple_base_alloc()
◆ xt_exchanger_simple_base_copy()
◆ xt_exchanger_simple_base_create_omp_share()
◆ xt_exchanger_simple_base_delete()
static void xt_exchanger_simple_base_delete |
( |
Xt_exchanger | exchanger | ) |
|
|
static |
◆ xt_exchanger_simple_base_get_MPI_Datatype()
static MPI_Datatype xt_exchanger_simple_base_get_MPI_Datatype |
( |
Xt_exchanger | exchanger, |
|
|
int | rank, |
|
|
enum xt_msg_direction | direction, |
|
|
bool | do_dup ) |
|
static |
◆ xt_exchanger_simple_base_get_msg_ranks()
◆ xt_exchanger_simple_base_new()
constructor for an exchanger using asynchronous send and recv
- Parameters
-
[in] | nsend | number of send messages |
[in] | nrecv | number of receive messages |
[in] | send_msgs | array with send messages |
[in] | recv_msgs | array with receive messages |
[in] | comm | MPI communicator that is to be used for the communication |
[in] | tag_offset | tag |
[in] | s_func | function pointer used for synchronous exchanges |
[in] | a_func | function pointer used for asynchronous exchanges |
[in] | create_omp_share_func | function pointer used to create shared state for multi-threaded calls |
[in] | config | optional customization parameters |
note: tag_offset + xt_mpi_tag_exchange_msg must not be used on comm by any other part of the program during the lifetime of the created exchanger object
Definition at line 151 of file xt_exchanger_simple_base.c.
◆ xt_exchanger_simple_base_s_exchange()
static void xt_exchanger_simple_base_s_exchange |
( |
Xt_exchanger | exchanger, |
|
|
const void * | src_data, |
|
|
void * | dst_data ) |
|
static |
◆ filename
const char filename[] = "xt_exchanger_simple_base.c" |
|
static |
◆ xt_exchanger_simple_base_vtable
Initial value:= {
}
static void xt_exchanger_simple_base_a_exchange(Xt_exchanger exchanger, const void *src_data, void *dst_data, Xt_request *request)
static int xt_exchanger_simple_base_get_msg_ranks(Xt_exchanger exchanger, enum xt_msg_direction direction, int *restrict *ranks)
static void xt_exchanger_simple_base_delete(Xt_exchanger exchanger)
static Xt_exchanger xt_exchanger_simple_base_copy(Xt_exchanger exchanger, MPI_Comm newComm, int new_tag_offset)
static void xt_exchanger_simple_base_s_exchange(Xt_exchanger exchanger, const void *src_data, void *dst_data)
static Xt_exchanger_omp_share xt_exchanger_simple_base_create_omp_share(Xt_exchanger exchanger)
static MPI_Datatype xt_exchanger_simple_base_get_MPI_Datatype(Xt_exchanger exchanger, int rank, enum xt_msg_direction direction, bool do_dup)
Definition at line 90 of file xt_exchanger_simple_base.c.