PlayaMPITraits.hpp
Go to the documentation of this file.00001
00002
00003
00004 #ifndef PLAYA_MPITRAITS_H
00005 #define PLAYA_MPITRAITS_H
00006
00014 #include "PlayaMPIComm.hpp"
00015
00016 namespace Playa
00017 {
00018 using std::string;
00019
00025 template <class T> class MPITraits
00026 {
00027 public:
00029 static MPIDataType type();
00030 };
00031
00034 template <> class MPITraits<int>
00035 {
00036 public:
00038 static MPIDataType type() {return MPIDataType::intType();}
00039 };
00040
00043 template <> class MPITraits<float>
00044 {
00045 public:
00047 static MPIDataType type() {return MPIDataType::floatType();}
00048 };
00049
00052 template <> class MPITraits<double>
00053 {
00054 public:
00056 static MPIDataType type() {return MPIDataType::doubleType();}
00057 };
00058
00061 template <> class MPITraits<char>
00062 {
00063 public:
00065 static MPIDataType type() {return MPIDataType::charType();}
00066 };
00067
00068
00069 }
00070
00071 #endif