aimsalgo  5.1.2
Neuroimaging image processing
types.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2013 CEA
2  *
3  * This software and supporting documentation were developed by
4  * bioPICSEL
5  * CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6  * 18, route du Panorama
7  * 92265 Fontenay-aux-Roses
8  * France
9  */
10 
11 
12 #ifndef BRAINRAT_MPI_TYPES_H
13 #define BRAINRAT_MPI_TYPES_H
14 
15 #include <string>
16 #include <mpi.h>
17 using namespace MPI;
18 
19 /* Conversion of AIMS "T" to MPI Datatype (programmer seems to always have to do it himself with C++ templates). */
20  //typedefs from cartobase/type/limits.h from stdint.h .
21 
24 template<class T> class MpiDataTypeCode
25 {
26 public:
28 
29 public:
30  static inline Datatype mpiDataType();
31 };
32 
33 
34 template <>
36 {
37  return SIGNED_CHAR;
38 }
39 
40 template <>
42 {
43  return UNSIGNED_CHAR;
44 }
45 
46 template <>
48 {
49  return SHORT;
50 }
51 
52 template <>
54 {
55  return UNSIGNED_SHORT;
56 }
57 
58 template <>
60 {
61  return INT;
62 }
63 
64 template <>
66 {
67  return UNSIGNED;
68 }
69 
70 template <>
72 {
73  return FLOAT;
74 }
75 
76 template <>
78 {
79  return DOUBLE;
80 }
81 
82 #endif
This class is just a hint to convert an actual mpi data type to an identifier string used in input/ou...
Definition: types.h:25
MpiDataTypeCode()
Definition: types.h:27
static Datatype mpiDataType()