HighFive
2.10.1
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
6
namespace
HighFive
{
7
using
float16_t
= half_float::half;
8
9
template
<>
10
inline
AtomicType<float16_t>::AtomicType
() {
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
HighFive::AtomicType::AtomicType
AtomicType()
Definition
H5DataType_misc.hpp:235
HighFive
Definition
H5_definitions.hpp:22
HighFive::float16_t
half_float::half float16_t
Definition
half_float.hpp:7
highfive
half_float.hpp
Generated by
1.11.0