17 #include <type_traits>
22 #include <boost/multi_array.hpp>
23 #include <boost/numeric/ublas/matrix.hpp>
29 #if ___cplusplus >= 201103L
30 #define H5_USE_CXX11 1
32 #define H5_USE_CXX11 0
43 static constexpr
size_t value = 0;
56 template <
typename T, std::
size_t N>
62 template<
typename T, std::
size_t N>
68 template <
typename T, std::
size_t Dims>
69 struct array_dims<boost::multi_array<T, Dims> > {
70 static constexpr
size_t value = Dims;
74 struct array_dims<boost::numeric::ublas::matrix<T> > {
75 static constexpr
size_t value = 2;
88 dims.push_back(vec.size());
94 std::vector<size_t> dims;
100 template <
typename T>
105 template <
typename T>
110 template <
typename T, std::
size_t N>
116 template <
typename T, std::
size_t Dims>
121 template <
typename T>
122 struct type_of_array<boost::numeric::ublas::matrix<T> > {
127 template <
typename T>
132 template <
typename T, std::
size_t N>
143 template <
typename T>
155 template <
typename T>
157 static const bool value =
true;
160 template <
typename T, std::
size_t N>
168 template<
typename Size>
170 static_assert(std::is_same<Size, std::size_t>::value ==
false,
" hsize_t != size_t mandatory here");
171 std::vector<size_t> res(vec.size());
172 std::copy(vec.begin(), vec.end(), res.begin());
190 #endif // H5UTILS_HPP