aimsalgo 6.0.0
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>
17using 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
24template<class T> class MpiDataTypeCode
25{
26public:
28
29public:
30 static inline Datatype mpiDataType();
31};
32
33
34template <>
36{
37 return SIGNED_CHAR;
38}
39
40template <>
42{
43 return UNSIGNED_CHAR;
44}
45
46template <>
48{
49 return SHORT;
50}
51
52template <>
54{
55 return UNSIGNED_SHORT;
56}
57
58template <>
60{
61 return INT;
62}
63
64template <>
66{
67 return UNSIGNED;
68}
69
70template <>
72{
73 return FLOAT;
74}
75
76template <>
78{
79 return DOUBLE;
80}
81
82#endif
MpiDataTypeCode()
Definition types.h:27
static Datatype mpiDataType()