diff options
Diffstat (limited to 'Carpet/CarpetLib/src/mpi_string.hh')
-rw-r--r-- | Carpet/CarpetLib/src/mpi_string.hh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/mpi_string.hh b/Carpet/CarpetLib/src/mpi_string.hh new file mode 100644 index 000000000..6ed8d447d --- /dev/null +++ b/Carpet/CarpetLib/src/mpi_string.hh @@ -0,0 +1,55 @@ +#include <string> +#include <vector> + +#include <cctk.h> + +#include <mpi.h> + + + +namespace CarpetLib +{ + + using namespace std; + + + + // String communication + + vector <string> + allgather_string (MPI_Comm comm, + string const & data); + + vector <string> + alltoallv_string (MPI_Comm comm, + vector <string> const & data); + + string + broadcast_string (MPI_Comm comm, int root, + string const & data); + + + + // Arbitrary datatypes + + template <typename T> + vector <vector <T> > + allgatherv (MPI_Comm comm, + vector <T> const & data); + + template <typename T> + vector <T> + alltoall (MPI_Comm comm, + vector <T> const & data); + + template <typename T> + vector <vector <T> > + alltoallv (MPI_Comm comm, + vector <vector <T> > const & data); + + template <typename T> + vector <T> + alltoallv1 (MPI_Comm comm, + vector <vector <T> > const & data); + +} // namespace CarpetLib |