5#ifndef YAC_MPI_INTERNAL_H
6#define YAC_MPI_INTERNAL_H
14#if SIZE_MAX == UINT8_MAX
15#define YAC_MPI_SIZE_T MPI_UINT8_T
16#define YAC_MPI_SIZE_T_TYPE uint8_t
17#elif SIZE_MAX == UINT16_MAX
18#define YAC_MPI_SIZE_T MPI_UINT16_T
19#define YAC_MPI_SIZE_T_TYPE uint16_t
20#elif SIZE_MAX == UINT32_MAX
21#define YAC_MPI_SIZE_T MPI_UINT32_T
22#define YAC_MPI_SIZE_T_TYPE uint32_t
23#elif SIZE_MAX == UINT64_MAX
24#define YAC_MPI_SIZE_T MPI_UINT64_T
25#define YAC_MPI_SIZE_T_TYPE uint64_t
27#error "YAC: unable to determine MPI data type for size_t"
40#define YAC_ALLTOALLV_P2P_DEC(N, T) \
41void yac_alltoallv_ ## N ## _p2p( \
42 T const * send_buffer, size_t const * sendcounts, size_t const * sdispls, \
43 T * recv_buffer, size_t const * recvcounts, size_t const * rdispls, \
53#undef YAC_ALLTOALLV_P2P_DEC
56 void const * send_buffer,
size_t const * sendcounts,
size_t const * sdispls,
57 void * recv_buffer,
size_t const * recvcounts,
size_t const * rdispls,
58 size_t dt_size, MPI_Datatype dt, MPI_Comm comm);
61 void const * send_buffer,
int const * sendcounts,
int const * sdispls,
62 void * recv_buffer,
int const * recvcounts,
int const * rdispls,
63 size_t dt_size, MPI_Datatype dt,
struct yac_group_comm group_comm);
69 const uint64_t * sendbuf, uint64_t * recvbuf,
int count,
73 void * buffer,
int count, MPI_Datatype datatype,
int root,
90 MPI_Datatype dt,
size_t new_size, MPI_Comm
comm);
93 int count,
size_t const * sendcounts,
size_t * recvcounts,
94 size_t * sdispls,
size_t * rdispls, MPI_Comm
comm);
97 int count,
size_t ** sendcounts,
size_t ** recvcounts,
98 size_t ** sdispls,
size_t ** rdispls, MPI_Comm
comm);
100 size_t * sendcounts,
size_t * recvcounts,
101 size_t * sdispls,
size_t * rdispls);
void yac_alltoallv_p2p_group(void const *send_buffer, int const *sendcounts, int const *sdispls, void *recv_buffer, int const *recvcounts, int const *rdispls, size_t dt_size, MPI_Datatype dt, struct yac_group_comm group_comm)
int yac_group_comm_get_global_rank(struct yac_group_comm group_comm)
void yac_generate_alltoallv_args(int count, size_t const *sendcounts, size_t *recvcounts, size_t *sdispls, size_t *rdispls, MPI_Comm comm)
void yac_free_comm_buffers(size_t *sendcounts, size_t *recvcounts, size_t *sdispls, size_t *rdispls)
int yac_group_comm_get_rank(struct yac_group_comm group_comm)
void yac_group_comm_split(struct yac_group_comm group_comm, int split_rank, struct yac_group_comm *local_group_comm, struct yac_group_comm *remote_group_comm)
MPI_Datatype yac_get_bounding_circle_mpi_datatype(MPI_Comm comm)
int yac_group_comm_get_global_size(struct yac_group_comm group_comm)
struct yac_group_comm yac_group_comm_new(MPI_Comm comm)
void yac_allreduce_sum_dble(double *buffer, int count, struct yac_group_comm group_comm)
void yac_get_comm_buffers(int count, size_t **sendcounts, size_t **recvcounts, size_t **sdispls, size_t **rdispls, MPI_Comm comm)
#define YAC_ALLTOALLV_P2P_DEC(N, T)
int yac_group_comm_get_size(struct yac_group_comm group_comm)
MPI_Datatype yac_create_resized(MPI_Datatype dt, size_t new_size, MPI_Comm comm)
void yac_alltoallv_p2p(void const *send_buffer, size_t const *sendcounts, size_t const *sdispls, void *recv_buffer, size_t const *recvcounts, size_t const *rdispls, size_t dt_size, MPI_Datatype dt, MPI_Comm comm)
void yac_bcast_group(void *buffer, int count, MPI_Datatype datatype, int root, struct yac_group_comm group_comm)
void yac_allgather_uint64(const uint64_t *sendbuf, uint64_t *recvbuf, int count, struct yac_group_comm group_comm)
void yac_group_comm_delete(struct yac_group_comm group_comm)