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
:
27
MpiDataTypeCode
() {};
28
29
public
:
30
static
inline
Datatype
mpiDataType
();
31
};
32
33
34
template
<>
35
Datatype
MpiDataTypeCode<int8_t>::mpiDataType
()
36
{
37
return
SIGNED_CHAR;
38
}
39
40
template
<>
41
Datatype
MpiDataTypeCode<uint8_t>::mpiDataType
()
42
{
43
return
UNSIGNED_CHAR;
44
}
45
46
template
<>
47
Datatype
MpiDataTypeCode<int16_t>::mpiDataType
()
48
{
49
return
SHORT;
50
}
51
52
template
<>
53
Datatype
MpiDataTypeCode<uint16_t>::mpiDataType
()
54
{
55
return
UNSIGNED_SHORT;
56
}
57
58
template
<>
59
Datatype
MpiDataTypeCode<int32_t>::mpiDataType
()
60
{
61
return
INT;
62
}
63
64
template
<>
65
Datatype
MpiDataTypeCode<uint32_t>::mpiDataType
()
66
{
67
return
UNSIGNED;
68
}
69
70
template
<>
71
Datatype
MpiDataTypeCode<float>::mpiDataType
()
72
{
73
return
FLOAT;
74
}
75
76
template
<>
77
Datatype
MpiDataTypeCode<double>::mpiDataType
()
78
{
79
return
DOUBLE;
80
}
81
82
#endif
MpiDataTypeCode
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::MpiDataTypeCode
MpiDataTypeCode()
Definition:
types.h:27
MpiDataTypeCode::mpiDataType
static Datatype mpiDataType()
aims
mpi
types.h
Generated by
1.9.1