]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some more MPI datatypes. 11753/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 15 Feb 2021 03:26:29 +0000 (22:26 -0500)
committerDavid Wells <drwells@email.unc.edu>
Mon, 15 Feb 2021 03:26:29 +0000 (22:26 -0500)
These were all in MPI-2.

include/deal.II/base/mpi.templates.h

index e429a076b4ad1ab549a116b9bf184089e6d784f5..0828261295797ab036a994c59cd0067d28d0c19b 100644 (file)
@@ -43,6 +43,30 @@ namespace Utilities
       /**
        * Return the corresponding MPI data type id for the argument given.
        */
+      inline MPI_Datatype
+      mpi_type_id(const char *)
+      {
+        return MPI_CHAR;
+      }
+
+
+
+      inline MPI_Datatype
+      mpi_type_id(const signed char *)
+      {
+        return MPI_SIGNED_CHAR;
+      }
+
+
+
+      inline MPI_Datatype
+      mpi_type_id(const short *)
+      {
+        return MPI_SHORT;
+      }
+
+
+
       inline MPI_Datatype
       mpi_type_id(const int *)
       {
@@ -59,6 +83,22 @@ namespace Utilities
 
 
 
+      inline MPI_Datatype
+      mpi_type_id(const unsigned char *)
+      {
+        return MPI_UNSIGNED_CHAR;
+      }
+
+
+
+      inline MPI_Datatype
+      mpi_type_id(const unsigned short *)
+      {
+        return MPI_UNSIGNED_SHORT;
+      }
+
+
+
       inline MPI_Datatype
       mpi_type_id(const unsigned int *)
       {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.