PSCF v1.1
MpiTraits.cpp
1/*
2* Util Package - C++ Utilities for Scientific Computation
3*
4* Copyright 2010 - 2017, The Regents of the University of Minnesota
5* Distributed under the terms of the GNU General Public License.
6*/
7
8#include "MpiTraits.h"
9
10namespace Util
11{
12
13 const MPI::Datatype MpiTraitsNoType::type = MPI::CHAR;
14 const bool MpiTraitsNoType::hasType = false;
15
16 const MPI::Datatype MpiTraits<char>::type = MPI::CHAR;
17 const bool MpiTraits<char>::hasType = true;
18
19 const MPI::Datatype MpiTraits<unsigned char>::type = MPI::UNSIGNED_CHAR;
20 const bool MpiTraits<unsigned char>::hasType = true;
21
22 const MPI::Datatype MpiTraits<short>::type = MPI::SHORT_INT;
23 const bool MpiTraits<short>::hasType = true;
24
25 const MPI::Datatype MpiTraits<int>::type = MPI::INT;
26 const bool MpiTraits<int>::hasType = true;
27
28 const MPI::Datatype MpiTraits<long>::type = MPI::LONG;
29 const bool MpiTraits<long>::hasType = true;
30
31 const MPI::Datatype MpiTraits<unsigned short>::type = MPI::UNSIGNED_SHORT;
32 const bool MpiTraits<unsigned short>::hasType = true;
33
34 const MPI::Datatype MpiTraits<unsigned int>::type = MPI::UNSIGNED;
35 const bool MpiTraits<unsigned int>::hasType = true;
36
37 const MPI::Datatype MpiTraits<unsigned long >::type = MPI::UNSIGNED_LONG;
38 const bool MpiTraits<unsigned long>::hasType = true;
39
40 const MPI::Datatype MpiTraits<float>::type = MPI::FLOAT;
41 const bool MpiTraits<float>::hasType = true;
42
43 const MPI::Datatype MpiTraits<double>::type = MPI::DOUBLE;
44 const bool MpiTraits<double>::hasType = true;
45
46 const MPI::Datatype MpiTraits<long double>::type = MPI::LONG_DOUBLE;
47 const bool MpiTraits<long double>::hasType = true;
48
49 const MPI::Datatype MpiTraits<bool>::type = MPI::BYTE;
50 const bool MpiTraits<bool>::hasType = false;
51
52 #if 0
53 const MPI::Datatype MpiTraits<std::complex<float> >::type = MPI::COMPLEX;
54 const bool MpiTraits<std::complex<float> >::hasType = true;
55
56 const MPI::Datatype MpiTraits<std::complex<double> >::type = MPI::DOUBLE_COMPLEX;
57 const bool MpiTraits<std::complex<double> >::hasType = true;
58
59 const MPI::Datatype MpiTraits<std::complex<long double> >::type = MPI::LONG_DOUBLE_COMPLEX;
60 const bool MpiTraits<std::complex<long double> >::hasType = true;
61 #endif
62
63 #if 0
64 const MPI::Datatype MpiTraits<wchar_t>::type = MPI::WCHAR;
65 const bool MpiTraits<wchar_t>::hasType = true;
66 #endif
67}
static const bool hasType
Is the MPI type initialized?
Definition: MpiTraits.h:28
static const MPI::Datatype type
MPI Datatype (dummy - unused)
Definition: MpiTraits.h:27
static const bool hasType
Is the MPI type initialized?
Definition: MpiTraits.h:28
static const MPI::Datatype type
MPI Datatype (dummy - unused)
Definition: MpiTraits.h:27
Utility classes for scientific computation.
Definition: accumulators.mod:1