Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions c++/src/H5PredType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ PredType *PredType::IEEE_F32LE_;
PredType *PredType::IEEE_F64BE_;
PredType *PredType::IEEE_F64LE_;

PredType *PredType::FLOAT_BFLOAT16BE_;
PredType *PredType::FLOAT_BFLOAT16LE_;

PredType *PredType::UNIX_D32BE_;
PredType *PredType::UNIX_D32LE_;
PredType *PredType::UNIX_D64BE_;
Expand Down Expand Up @@ -339,6 +342,9 @@ PredType::makePredTypes()
IEEE_F64BE_ = new PredType(H5T_IEEE_F64BE);
IEEE_F64LE_ = new PredType(H5T_IEEE_F64LE);

FLOAT_BFLOAT16BE_ = new PredType(H5T_FLOAT_BFLOAT16BE);
FLOAT_BFLOAT16LE_ = new PredType(H5T_FLOAT_BFLOAT16LE);

UNIX_D32BE_ = new PredType(H5T_UNIX_D32BE);
UNIX_D32LE_ = new PredType(H5T_UNIX_D32LE);
UNIX_D64BE_ = new PredType(H5T_UNIX_D64BE);
Expand Down Expand Up @@ -492,6 +498,9 @@ PredType::deleteConstants()
delete IEEE_F64BE_;
delete IEEE_F64LE_;

delete FLOAT_BFLOAT16BE_;
delete FLOAT_BFLOAT16LE_;

delete UNIX_D32BE_;
delete UNIX_D32LE_;
delete UNIX_D64BE_;
Expand Down Expand Up @@ -649,6 +658,9 @@ const PredType &PredType::IEEE_F32LE = *IEEE_F32LE_;
const PredType &PredType::IEEE_F64BE = *IEEE_F64BE_;
const PredType &PredType::IEEE_F64LE = *IEEE_F64LE_;

const PredType &PredType::FLOAT_BFLOAT16BE = *FLOAT_BFLOAT16BE_;
const PredType &PredType::FLOAT_BFLOAT16LE = *FLOAT_BFLOAT16LE_;

const PredType &PredType::UNIX_D32BE = *UNIX_D32BE_;
const PredType &PredType::UNIX_D32LE = *UNIX_D32LE_;
const PredType &PredType::UNIX_D64BE = *UNIX_D64BE_;
Expand Down
6 changes: 6 additions & 0 deletions c++/src/H5PredType.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ class H5CPP_DLL PredType : public AtomType {
static const PredType &IEEE_F64BE;
static const PredType &IEEE_F64LE;

static const PredType &FLOAT_BFLOAT16BE;
static const PredType &FLOAT_BFLOAT16LE;

static const PredType &UNIX_D32BE;
static const PredType &UNIX_D32LE;
static const PredType &UNIX_D64BE;
Expand Down Expand Up @@ -262,6 +265,9 @@ class H5CPP_DLL PredType : public AtomType {
static PredType *IEEE_F64BE_;
static PredType *IEEE_F64LE_;

static PredType *FLOAT_BFLOAT16BE_;
static PredType *FLOAT_BFLOAT16LE_;

static PredType *UNIX_D32BE_;
static PredType *UNIX_D32LE_;
static PredType *UNIX_D64BE_;
Expand Down
11 changes: 6 additions & 5 deletions doxygen/dox/DDLBNF200.dox
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ This section contains a brief explanation of the symbols used in the DDL.
H5T_NATIVE_LONG | H5T_NATIVE_ULONG |
H5T_NATIVE_LLONG | H5T_NATIVE_ULLONG

<float> ::= H5T_IEEE_F16BE | H5T_IEEE_F16LE |
H5T_IEEE_F32BE | H5T_IEEE_F32LE |
H5T_IEEE_F64BE | H5T_IEEE_F64LE |
H5T_NATIVE_FLOAT16 | H5T_NATIVE_FLOAT |
H5T_NATIVE_DOUBLE | H5T_NATIVE_LDOUBLE
<float> ::= H5T_IEEE_F16BE | H5T_IEEE_F16LE |
H5T_IEEE_F32BE | H5T_IEEE_F32LE |
H5T_IEEE_F64BE | H5T_IEEE_F64LE |
H5T_FLOAT_BFLOAT16BE | H5T_FLOAT_BFLOAT16LE |
H5T_NATIVE_FLOAT16 | H5T_NATIVE_FLOAT |
H5T_NATIVE_DOUBLE | H5T_NATIVE_LDOUBLE

<time> ::= H5T_TIME: not yet implemented

Expand Down
4 changes: 4 additions & 0 deletions doxygen/dox/PredefinedDatatypeTables.dox
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* </div>
*
* <div>
* \snippet{doc} tables/predefinedDatatypes.dox predefined_alt_float_datatypes_table
* </div>
*
* <div>
* \snippet{doc} tables/predefinedDatatypes.dox predefined_complex_datatypes_table
* </div>
*
Expand Down
19 changes: 19 additions & 0 deletions doxygen/examples/tables/predefinedDatatypes.dox
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@
//! [predefined_ieee_datatypes_table]
*
*
//! [predefined_alt_float_datatypes_table]
<table>
<caption>Predefined Alternative Floating Point Datatypes</caption>
<tr>
<th>Datatype</th>
<th>Description</th>
</tr>
<tr>
<td>#H5T_FLOAT_BFLOAT16BE</td>
<td>16-bit big-endian bfloat16 floating point</td>
</tr>
<tr>
<td>#H5T_FLOAT_BFLOAT16LE</td>
<td>16-bit little-endian bfloat16 floating point</td>
</tr>
</table>
//! [predefined_alt_float_datatypes_table]
*
*
//! [predefined_complex_datatypes_table]
<table>
<caption>Predefined Complex Number Datatypes</caption>
Expand Down
8 changes: 8 additions & 0 deletions fortran/src/H5_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
return ret_value;
if ((floatingtypes[3] = (hid_t_f)H5Tcopy(H5T_IEEE_F64LE)) < 0)
return ret_value;
if ((floatingtypes[4] = (hid_t_f)H5Tcopy(H5T_IEEE_F16BE)) < 0)
return ret_value;
if ((floatingtypes[5] = (hid_t_f)H5Tcopy(H5T_IEEE_F16LE)) < 0)
return ret_value;
if ((floatingtypes[6] = (hid_t_f)H5Tcopy(H5T_FLOAT_BFLOAT16BE)) < 0)
return ret_value;
if ((floatingtypes[7] = (hid_t_f)H5Tcopy(H5T_FLOAT_BFLOAT16LE)) < 0)
return ret_value;

if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0)
return ret_value;
Expand Down
12 changes: 8 additions & 4 deletions fortran/src/H5_ff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,14 @@ END FUNCTION h5init1_flags_c
H5T_NATIVE_B64 = predef_types(18)
H5T_NATIVE_FLOAT_128 = predef_types(19)

H5T_IEEE_F32BE = floating_types(1)
H5T_IEEE_F32LE = floating_types(2)
H5T_IEEE_F64BE = floating_types(3)
H5T_IEEE_F64LE = floating_types(4)
H5T_IEEE_F32BE = floating_types(1)
H5T_IEEE_F32LE = floating_types(2)
H5T_IEEE_F64BE = floating_types(3)
H5T_IEEE_F64LE = floating_types(4)
H5T_IEEE_F16BE = floating_types(5)
H5T_IEEE_F16LE = floating_types(6)
H5T_FLOAT_BFLOAT16BE = floating_types(7)
H5T_FLOAT_BFLOAT16LE = floating_types(8)

H5T_STD_I8BE = integer_types(1)
H5T_STD_I8LE = integer_types(2)
Expand Down
10 changes: 9 additions & 1 deletion fortran/src/H5f90global.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MODULE H5GLOBAL
! Do not forget to change these values when new predefined
! datatypes are added
INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 19
INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4
INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 8
INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 28

! These arrays need to be global because they are used in
Expand All @@ -87,6 +87,10 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5T_IEEE_F32LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_IEEE_F64BE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_IEEE_F64LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_IEEE_F16BE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_IEEE_F16LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_BFLOAT16BE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_BFLOAT16LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I8BE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I8LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I16BE
Expand Down Expand Up @@ -137,6 +141,10 @@ MODULE H5GLOBAL
INTEGER(HID_T) :: H5T_IEEE_F32LE !< H5T_IEEE_F32LE
INTEGER(HID_T) :: H5T_IEEE_F64BE !< H5T_IEEE_F64BE
INTEGER(HID_T) :: H5T_IEEE_F64LE !< H5T_IEEE_F64LE
INTEGER(HID_T) :: H5T_IEEE_F16BE !< H5T_IEEE_F16BE
INTEGER(HID_T) :: H5T_IEEE_F16LE !< H5T_IEEE_F16LE
INTEGER(HID_T) :: H5T_FLOAT_BFLOAT16BE !< H5T_FLOAT_BFLOAT16BE
INTEGER(HID_T) :: H5T_FLOAT_BFLOAT16LE !< H5T_FLOAT_BFLOAT16LE
INTEGER(HID_T) :: H5T_STD_I8BE !< H5T_STD_I8BE
INTEGER(HID_T) :: H5T_STD_I8LE !< H5T_STD_I8LE
INTEGER(HID_T) :: H5T_STD_I16BE !< H5T_STD_I16BE
Expand Down
6 changes: 6 additions & 0 deletions hl/src/H5LT.c
Original file line number Diff line number Diff line change
Expand Up @@ -2305,6 +2305,12 @@ H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, bo
else if (H5Tequal(dtype, H5T_IEEE_F64LE)) {
snprintf(dt_str, *slen, "H5T_IEEE_F64LE");
}
else if (H5Tequal(dtype, H5T_FLOAT_BFLOAT16BE)) {
snprintf(dt_str, *slen, "H5T_FLOAT_BFLOAT16BE");
}
else if (H5Tequal(dtype, H5T_FLOAT_BFLOAT16LE)) {
snprintf(dt_str, *slen, "H5T_FLOAT_BFLOAT16LE");
}
#ifdef H5_HAVE__FLOAT16
else if (H5Tequal(dtype, H5T_NATIVE_FLOAT16)) {
snprintf(dt_str, *slen, "H5T_NATIVE_FLOAT16");
Expand Down
Loading
Loading