31#ifndef _MPI_WRAPPER_HPP_
32#define _MPI_WRAPPER_HPP_
43namespace mpi_wrapper {
126 size_t n =
vec.size();
127 std::vector<C>
recv(
n);
std::complex< double > complex
Definition complex.hpp:38
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:161
MPI_Datatype mpi_datatype< unsigned long long int >()
Definition mpi_wrapper.hpp:90
void allreduce(const C *sendbuf, C *recvbuf, int count, MPI_Op op, const MPI_Comm &comm)
Wrapper of MPI_Allreduce.
Definition mpi_wrapper.hpp:142
MPI_Datatype mpi_datatype< int >()
Definition mpi_wrapper.hpp:70
MPI_Datatype mpi_datatype< unsigned char >()
Definition mpi_wrapper.hpp:58
MPI_Datatype mpi_datatype< unsigned short >()
Definition mpi_wrapper.hpp:66
MPI_Datatype mpi_datatype< long long int >()
Definition mpi_wrapper.hpp:86
MPI_Datatype mpi_datatype< double >()
Definition mpi_wrapper.hpp:94
MPI_Datatype mpi_datatype< signed char >()
Definition mpi_wrapper.hpp:54
MPI_Datatype mpi_datatype< short >()
Definition mpi_wrapper.hpp:62
MPI_Datatype mpi_datatype< unsigned int >()
Definition mpi_wrapper.hpp:74
void bcast(C *buffer, int count, int root, const MPI_Comm &comm)
Wrapper of MPI_Bcast.
Definition mpi_wrapper.hpp:237
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:220
void alltoall(const C *sendbuf, int sendcount, C *recvbuf, int recvcount, const MPI_Comm &comm)
Wrapper of MPI_Alltoall.
Definition mpi_wrapper.hpp:198
MPI_Datatype mpi_datatype< char >()
Definition mpi_wrapper.hpp:50
MPI_Datatype mpi_datatype< long int >()
Definition mpi_wrapper.hpp:78
MPI_Datatype mpi_datatype< complex >()
Definition mpi_wrapper.hpp:98
C allreduce_sum(C val, const MPI_Comm &comm)
Calculate a summation over MPI communicator.
Definition mpi_wrapper.hpp:110
MPI_Datatype mpi_datatype< unsigned long int >()
Definition mpi_wrapper.hpp:82
MPI_Datatype mpi_datatype()
Template function for MPI Datatype.
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:124
Definition complex.hpp:34