From 9f9776599555a1e3fff7d48984aba81f2efcf1e6 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 14 Feb 2021 22:26:29 -0500 Subject: [PATCH] Add some more MPI datatypes. These were all in MPI-2. --- include/deal.II/base/mpi.templates.h | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/include/deal.II/base/mpi.templates.h b/include/deal.II/base/mpi.templates.h index e429a076b4..0828261295 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -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 *) { -- 2.39.5