mptensor v0.4.0
Parallel Library for Tensor Network Methods
Loading...
Searching...
No Matches
mpi_wrapper.hpp File Reference

Wrapper functions of MPI communications. More...

#include <mpi.h>
#include <vector>
Include dependency graph for mpi_wrapper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mptensor
 
namespace  mptensor::mpi_wrapper
 Wrappers of MPI library.
 

Functions

template<typename C >
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype ()
 Template function for MPI Datatype.
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< char > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< signed char > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< unsigned char > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< short > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< unsigned short > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< int > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< unsigned int > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< long int > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< unsigned long int > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< long long int > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< unsigned long long int > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< double > ()
 
template<>
MPI_Datatype mptensor::mpi_wrapper::mpi_datatype< complex > ()
 
template<typename C >
C mptensor::mpi_wrapper::allreduce_sum (C val, const MPI_Comm &comm)
 Calculate a summation over MPI communicator.
 
template<typename C >
std::vector< Cmptensor::mpi_wrapper::allreduce_vec (const std::vector< C > &vec, const MPI_Comm &comm)
 Calculate a summation of each element of vector over MPI communicator.
 
template<typename C >
void mptensor::mpi_wrapper::allreduce (const C *sendbuf, C *recvbuf, int count, MPI_Op op, const MPI_Comm &comm)
 Wrapper of MPI_Allreduce.
 
template<typename C >
void mptensor::mpi_wrapper::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.
 
template<typename C >
void mptensor::mpi_wrapper::sendrecv (const std::vector< C > &send_vec, int dest, int sendtag, std::vector< C > &recv_vec, int source, int recvtag, const MPI_Comm &comm)
 Wrapper of MPI_Sendrecv for std::vector.
 
template<typename C >
void mptensor::mpi_wrapper::alltoall (const C *sendbuf, int sendcount, C *recvbuf, int recvcount, const MPI_Comm &comm)
 Wrapper of MPI_Alltoall.
 
template<typename C >
void mptensor::mpi_wrapper::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.
 
template<typename C >
void mptensor::mpi_wrapper::bcast (C *buffer, int count, int root, const MPI_Comm &comm)
 Wrapper of MPI_Bcast.
 

Detailed Description

Wrapper functions of MPI communications.

Author
Satoshi Morita morit.nosp@m.a@is.nosp@m.sp.u-.nosp@m.toky.nosp@m.o.ac..nosp@m.jp
Date
Jun 2 2015

This header file assumes the MPI environment.