From 90a1b2a0dceca96eadf09a00e7cda52d50e8bcf2 Mon Sep 17 00:00:00 2001
From: Berenger Bramas <bbramas@mpcdf.mpg.de>
Date: Thu, 4 May 2017 17:05:57 +0200
Subject: [PATCH] Add all native mpi data type to type selector

---
 bfps/cpp/particles/particles_utils.hpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/bfps/cpp/particles/particles_utils.hpp b/bfps/cpp/particles/particles_utils.hpp
index ffef9f68..d24df8e1 100644
--- a/bfps/cpp/particles/particles_utils.hpp
+++ b/bfps/cpp/particles/particles_utils.hpp
@@ -36,11 +36,18 @@ namespace particles_utils {
 class GetMpiType{
     const MPI_Datatype type;
 public:
+    explicit GetMpiType(const long long int&) : type(MPI_LONG_LONG_INT){}
+    explicit GetMpiType(const unsigned char&) : type(MPI_UNSIGNED_CHAR){}
+    explicit GetMpiType(const unsigned short&) : type(MPI_UNSIGNED_SHORT){}
+    explicit GetMpiType(const unsigned int&) : type(MPI_UNSIGNED){}
+    explicit GetMpiType(const unsigned long&) : type(MPI_UNSIGNED_LONG){}
+    explicit GetMpiType(const char&) : type(MPI_CHAR){}
+    explicit GetMpiType(const short&) : type(MPI_SHORT){}
     explicit GetMpiType(const int&) : type(MPI_INT){}
+    explicit GetMpiType(const long&) : type(MPI_LONG){}
+    explicit GetMpiType(const long double&) : type(MPI_LONG_DOUBLE){}
     explicit GetMpiType(const double&) : type(MPI_DOUBLE){}
     explicit GetMpiType(const float&) : type(MPI_FLOAT){}
-    explicit GetMpiType(const char&) : type(MPI_CHAR){}
-    explicit GetMpiType(const long&) : type(MPI_LONG){}
 
     /*do not make it explicit*/ operator MPI_Datatype() const { return type; }
 };
-- 
GitLab