forked from funkey/util
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhdf5_traits.h
67 lines (40 loc) · 881 Bytes
/
hdf5_traits.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef UTIL_HDF5_TRAITS_H__
#define UTIL_HDF5_TRAITS_H__
#include <config.h>
#ifdef HAVE_HDF5
#include <H5Cpp.h>
namespace hdf5 {
namespace detail {
template <typename T>
struct hdf5_traits {
// no default
};
template <>
struct hdf5_traits<int> {
typedef H5::IntType data_type;
static H5::PredType pred_type;
};
template <>
struct hdf5_traits<unsigned int> {
typedef H5::IntType data_type;
static H5::PredType pred_type;
};
template <>
struct hdf5_traits<double> {
typedef H5::FloatType data_type;
static H5::PredType pred_type;
};
template <>
struct hdf5_traits<char> {
typedef H5::IntType data_type;
static H5::PredType pred_type;
};
template <>
struct hdf5_traits<unsigned char> {
typedef H5::IntType data_type;
static H5::PredType pred_type;
};
} // namespace detail
} // namespace hdf5
#endif // HAVE_HDF5
#endif // UTIL_HDF5_TRAITS_H__