29 #ifndef _MPI_WRAPPER_HPP_
30 #define _MPI_WRAPPER_HPP_
40 namespace mpi_wrapper {
60 std::vector<C>
allreduce_vec(
const std::vector<C> &vec,
const MPI_Comm &comm);
75 std::vector<C> &recv_vec,
int source,
int recvtag,
76 const MPI_Comm &comm, MPI_Status &status);
92 void alltoallv(
const C *sendbuf,
const int *sendcounts,
const int *sdispls,
93 C *recvbuf,
const int *recvcounts,
const int *rdispls,
94 const MPI_Comm &comm);
103 template <
typename C>
104 void bcast(C *buffer,
int count,
int root,
const MPI_Comm &comm);
std::vector< C > allreduce_vec(const std::vector< C > &vec, const MPI_Comm &comm)
Calculate a summation of each element of vector over MPI communicator.
void bcast(C *buffer, int count, int root, const MPI_Comm &comm)
Wrapper of MPI_Bcast.
void alltoallv(const C *sendbuf, const int *sendcounts, const int *sdispls, C *recvbuf, const int *recvcounts, const int *rdispls, const MPI_Comm &comm)
Wrapper of MPI_Alltoallv.
void send_recv_vector(const std::vector< C > &send_vec, int dest, int sendtag, std::vector< C > &recv_vec, int source, int recvtag, const MPI_Comm &comm, MPI_Status &status)
Wrapper of MPI_Sendrecv.
C allreduce_sum(C val, const MPI_Comm &comm)
Calculate a summation over MPI communicator.
Definition: complex.hpp:34