Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/highfive/half_float.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #pragma once
0002 #ifdef H5_USE_HALF_FLOAT
0003 
0004 #include <half.hpp>
0005 
0006 namespace HighFive {
0007 using float16_t = half_float::half;
0008 
0009 template <>
0010 inline AtomicType<float16_t>::AtomicType() {
0011     _hid = detail::h5t_copy(H5T_NATIVE_FLOAT);
0012     // Sign position, exponent position, exponent size, mantissa position, mantissa size
0013     detail::h5t_set_fields(_hid, 15, 10, 5, 0, 10);
0014     // Total datatype size (in bytes)
0015     detail::h5t_set_size(_hid, 2);
0016     // Floating point exponent bias
0017     detail::h5t_set_ebias(_hid, 15);
0018 }
0019 }  // namespace HighFive
0020 
0021 #endif