aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/mpi_string.hh
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-09-03 16:19:15 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:42:31 +0000
commit11c4d98017cbb86d08e15fd1b549180184b58a26 (patch)
tree2546a154c6f7bc0bec87de7316125ae7d1453569 /Carpet/CarpetLib/src/mpi_string.hh
parentf520477b1c14e02f1495cfa8d3e09f4e21ab34d0 (diff)
Import Carpet
Ignore-this: 309b4dd613f4af2b84aa5d6743fdb6b3
Diffstat (limited to 'Carpet/CarpetLib/src/mpi_string.hh')
-rw-r--r--Carpet/CarpetLib/src/mpi_string.hh55
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