HighFive 2.10.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
half_float.hpp
Go to the documentation of this file.
1#pragma once
2#ifdef H5_USE_HALF_FLOAT
3
4#include <half.hpp>
5
6namespace HighFive {
7using float16_t = half_float::half;
8
9template <>
11 _hid = detail::h5t_copy(H5T_NATIVE_FLOAT);
12 // Sign position, exponent position, exponent size, mantissa position, mantissa size
13 detail::h5t_set_fields(_hid, 15, 10, 5, 0, 10);
14 // Total datatype size (in bytes)
15 detail::h5t_set_size(_hid, 2);
16 // Floating point exponent bias
17 detail::h5t_set_ebias(_hid, 15);
18}
19} // namespace HighFive
20
21#endif
AtomicType()
Definition H5DataType_misc.hpp:235
Definition H5_definitions.hpp:22
half_float::half float16_t
Definition half_float.hpp:7