31#ifndef _MPI_WRAPPER_HPP_
32#define _MPI_WRAPPER_HPP_
91 size_t n =
vec.size();
92 std::vector<C>
recv(
n);
Define the type of a complex number.
std::complex< double > complex
Definition complex.hpp:38
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.
Definition mpi_wrapper.hpp:185
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.
Definition mpi_wrapper.hpp:89
C allreduce_sum(C val, const MPI_Comm &comm)
Calculate a summation over MPI communicator.
Definition mpi_wrapper.hpp:75
void bcast(C *buffer, int count, int root, const MPI_Comm &comm)
Wrapper of MPI_Bcast.
Definition mpi_wrapper.hpp:202
void sendrecv(const C *sendbuf, int sendcount, int dest, int sendtag, C *recvbuf, int recvcount, int source, int recvtag, const MPI_Comm &comm)
Wrapper of MPI_Sendrecv.
Definition mpi_wrapper.hpp:126
MPI_Datatype mpi_datatype
Template variable for MPI Datatype.
Definition mpi_wrapper.hpp:47
void allreduce(const C *sendbuf, C *recvbuf, int count, MPI_Op op, const MPI_Comm &comm)
Wrapper of MPI_Allreduce.
Definition mpi_wrapper.hpp:107
void alltoall(const C *sendbuf, int sendcount, C *recvbuf, int recvcount, const MPI_Comm &comm)
Wrapper of MPI_Alltoall.
Definition mpi_wrapper.hpp:163
Definition complex.hpp:34