Add predefined datatypes for FP6 formats (#6097)

Adds predefined datatypes for FP6 data in E2M3 and E3M2 formats

Does not add support for any native FP6 types; datatype conversions are performed in software
This commit is contained in:
jhendersonHDF
2025-12-19 12:56:54 -06:00
committed by GitHub
parent 0b0ed3ac50
commit 441d83a896
40 changed files with 2036 additions and 741 deletions
+8
View File
@@ -156,6 +156,8 @@ PredType *PredType::FLOAT_BFLOAT16BE_;
PredType *PredType::FLOAT_BFLOAT16LE_;
PredType *PredType::FLOAT_F8E4M3_;
PredType *PredType::FLOAT_F8E5M2_;
PredType *PredType::FLOAT_F6E2M3_;
PredType *PredType::FLOAT_F6E3M2_;
PredType *PredType::UNIX_D32BE_;
PredType *PredType::UNIX_D32LE_;
@@ -348,6 +350,8 @@ PredType::makePredTypes()
FLOAT_BFLOAT16LE_ = new PredType(H5T_FLOAT_BFLOAT16LE);
FLOAT_F8E4M3_ = new PredType(H5T_FLOAT_F8E4M3);
FLOAT_F8E5M2_ = new PredType(H5T_FLOAT_F8E5M2);
FLOAT_F6E2M3_ = new PredType(H5T_FLOAT_F6E2M3);
FLOAT_F6E3M2_ = new PredType(H5T_FLOAT_F6E3M2);
UNIX_D32BE_ = new PredType(H5T_UNIX_D32BE);
UNIX_D32LE_ = new PredType(H5T_UNIX_D32LE);
@@ -506,6 +510,8 @@ PredType::deleteConstants()
delete FLOAT_BFLOAT16LE_;
delete FLOAT_F8E4M3_;
delete FLOAT_F8E5M2_;
delete FLOAT_F6E2M3_;
delete FLOAT_F6E3M2_;
delete UNIX_D32BE_;
delete UNIX_D32LE_;
@@ -668,6 +674,8 @@ const PredType &PredType::FLOAT_BFLOAT16BE = *FLOAT_BFLOAT16BE_;
const PredType &PredType::FLOAT_BFLOAT16LE = *FLOAT_BFLOAT16LE_;
const PredType &PredType::FLOAT_F8E4M3 = *FLOAT_F8E4M3_;
const PredType &PredType::FLOAT_F8E5M2 = *FLOAT_F8E5M2_;
const PredType &PredType::FLOAT_F6E2M3 = *FLOAT_F6E2M3_;
const PredType &PredType::FLOAT_F6E3M2 = *FLOAT_F6E3M2_;
const PredType &PredType::UNIX_D32BE = *UNIX_D32BE_;
const PredType &PredType::UNIX_D32LE = *UNIX_D32LE_;
+4
View File
@@ -96,6 +96,8 @@ class H5CPP_DLL PredType : public AtomType {
static const PredType &FLOAT_BFLOAT16LE;
static const PredType &FLOAT_F8E4M3;
static const PredType &FLOAT_F8E5M2;
static const PredType &FLOAT_F6E2M3;
static const PredType &FLOAT_F6E3M2;
static const PredType &UNIX_D32BE;
static const PredType &UNIX_D32LE;
@@ -271,6 +273,8 @@ class H5CPP_DLL PredType : public AtomType {
static PredType *FLOAT_BFLOAT16LE_;
static PredType *FLOAT_F8E4M3_;
static PredType *FLOAT_F8E5M2_;
static PredType *FLOAT_F6E2M3_;
static PredType *FLOAT_F6E3M2_;
static PredType *UNIX_D32BE_;
static PredType *UNIX_D32LE_;
+1
View File
@@ -101,6 +101,7 @@ This section contains a brief explanation of the symbols used in the DDL.
H5T_IEEE_F64BE | H5T_IEEE_F64LE |
H5T_FLOAT_BFLOAT16BE | H5T_FLOAT_BFLOAT16LE |
H5T_FLOAT_F8E4M3 | H5T_FLOAT_F8E5M2 |
H5T_FLOAT_F6E2M3 | H5T_FLOAT_F6E3M2 |
H5T_NATIVE_FLOAT16 | H5T_NATIVE_FLOAT |
H5T_NATIVE_DOUBLE | H5T_NATIVE_LDOUBLE
@@ -58,6 +58,14 @@
<td>#H5T_FLOAT_F8E5M2</td>
<td>8-bit FP8 E5M2 (5 exponent bits, 2 mantissa bits) floating point</td>
</tr>
<tr>
<td>#H5T_FLOAT_F6E2M3</td>
<td>6-bit FP6 E2M3 (2 exponent bits, 3 mantissa bits) floating point</td>
</tr>
<tr>
<td>#H5T_FLOAT_F6E3M2</td>
<td>6-bit FP6 E3M2 (3 exponent bits, 2 mantissa bits) floating point</td>
</tr>
</table>
//! [predefined_alt_float_datatypes_table]
*
+4
View File
@@ -257,6 +257,10 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
return ret_value;
if ((floatingtypes[9] = (hid_t_f)H5Tcopy(H5T_FLOAT_F8E5M2)) < 0)
return ret_value;
if ((floatingtypes[10] = (hid_t_f)H5Tcopy(H5T_FLOAT_F6E2M3)) < 0)
return ret_value;
if ((floatingtypes[11] = (hid_t_f)H5Tcopy(H5T_FLOAT_F6E3M2)) < 0)
return ret_value;
if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0)
return ret_value;
+2
View File
@@ -297,6 +297,8 @@ CONTAINS
H5T_FLOAT_BFLOAT16LE = floating_types(8)
H5T_FLOAT_F8E4M3 = floating_types(9)
H5T_FLOAT_F8E5M2 = floating_types(10)
H5T_FLOAT_F6E2M3 = floating_types(11)
H5T_FLOAT_F6E3M2 = floating_types(12)
H5T_STD_I8BE = integer_types(1)
H5T_STD_I8LE = integer_types(2)
+5 -1
View File
@@ -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 = 10
INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 12
INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 28
! These arrays need to be global because they are used in
@@ -93,6 +93,8 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_BFLOAT16LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F8E4M3
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F8E5M2
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F6E2M3
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F6E3M2
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I8BE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I8LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I16BE
@@ -149,6 +151,8 @@ MODULE H5GLOBAL
INTEGER(HID_T) :: H5T_FLOAT_BFLOAT16LE !< H5T_FLOAT_BFLOAT16LE
INTEGER(HID_T) :: H5T_FLOAT_F8E4M3 !< H5T_FLOAT_F8E4M3
INTEGER(HID_T) :: H5T_FLOAT_F8E5M2 !< H5T_FLOAT_F8E5M2
INTEGER(HID_T) :: H5T_FLOAT_F6E2M3 !< H5T_FLOAT_F6E2M3
INTEGER(HID_T) :: H5T_FLOAT_F6E3M2 !< H5T_FLOAT_F6E3M2
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
+6
View File
@@ -2317,6 +2317,12 @@ H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, bo
else if (H5Tequal(dtype, H5T_FLOAT_F8E5M2)) {
snprintf(dt_str, *slen, "H5T_FLOAT_F8E5M2");
}
else if (H5Tequal(dtype, H5T_FLOAT_F6E2M3)) {
snprintf(dt_str, *slen, "H5T_FLOAT_F6E2M3");
}
else if (H5Tequal(dtype, H5T_FLOAT_F6E3M2)) {
snprintf(dt_str, *slen, "H5T_FLOAT_F6E3M2");
}
#ifdef H5_HAVE__FLOAT16
else if (H5Tequal(dtype, H5T_NATIVE_FLOAT16)) {
snprintf(dt_str, *slen, "H5T_NATIVE_FLOAT16");
+260 -247
View File
@@ -645,8 +645,8 @@ static void yynoreturn yy_fatal_error ( const char* msg );
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 81
#define YY_END_OF_BUFFER 82
#define YY_NUM_RULES 83
#define YY_END_OF_BUFFER 84
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -654,47 +654,48 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static const flex_int16_t yy_accept[361] =
static const flex_int16_t yy_accept[369] =
{ 0,
80, 80, 82, 81, 80, 81, 72, 78, 79, 81,
81, 81, 81, 76, 77, 74, 75, 80, 0, 72,
0, 0, 0, 0, 0, 73, 0, 0, 0, 0,
0, 54, 0, 0, 0, 0, 0, 55, 0, 0,
82, 82, 84, 83, 82, 83, 74, 80, 81, 83,
83, 83, 83, 78, 79, 76, 77, 82, 0, 74,
0, 0, 0, 0, 0, 75, 0, 0, 0, 0,
0, 56, 0, 0, 0, 0, 0, 57, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 53, 0, 0, 0,
0, 0, 0, 0, 0, 0, 55, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 71, 52, 0, 0, 0, 61, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
0, 0, 0, 73, 54, 0, 0, 0, 63, 67,
0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
70, 66, 0, 0, 0, 0, 0, 0, 0, 0,
72, 68, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
0, 0, 0, 51, 0, 0, 0, 68, 0, 0,
0, 0, 0, 0, 71, 0, 0, 0, 0, 0,
0, 0, 0, 53, 0, 0, 0, 70, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 64, 0, 0, 0, 0, 0, 0, 0,
0, 0, 66, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 2, 0, 0, 0, 0,
0, 0, 9, 10, 0, 0, 63, 0, 0, 60,
0, 0, 0, 0, 0, 1, 2, 0, 0, 0,
0, 0, 0, 9, 10, 0, 0, 65, 0, 0,
62, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 4, 5, 6, 7, 8,
11, 12, 13, 14, 15, 16, 0, 0, 0, 0,
61, 0, 0, 0, 0, 0, 64, 28, 29, 30,
31, 32, 33, 0, 0, 0, 22, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 3, 4, 5, 6, 7, 8, 11, 12,
13, 14, 15, 16, 0, 0, 0, 0, 59, 0,
0, 0, 62, 28, 29, 30, 31, 32, 33, 0,
0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17, 0, 0, 0, 0, 24, 0, 0, 0, 23,
0, 0, 0, 57, 0, 0, 0, 0, 36, 37,
0, 39, 0, 26, 18, 20, 19, 0, 25, 0,
0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
0, 24, 0, 0, 0, 23, 0, 0, 0, 59,
0, 0, 0, 0, 38, 39, 36, 37, 0, 41,
56, 58, 0, 0, 40, 0, 0, 0, 27, 21,
0, 0, 0, 38, 0, 41, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 34, 35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 42, 43, 44, 45, 46, 47, 0, 0, 0,
0, 0, 0, 0, 48, 0, 49, 0, 50, 0
0, 26, 18, 20, 19, 0, 25, 0, 58, 60,
0, 0, 42, 0, 0, 0, 27, 21, 0, 0,
0, 40, 0, 43, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 34, 35, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
45, 46, 47, 48, 49, 0, 0, 0, 0, 0,
0, 0, 50, 0, 51, 0, 52, 0
} ;
static const YY_CHAR yy_ec[256] =
@@ -738,95 +739,95 @@ static const YY_CHAR yy_meta[42] =
1
} ;
static const flex_int16_t yy_base[363] =
static const flex_int16_t yy_base[371] =
{ 0,
0, 0, 386, 387, 383, 0, 0, 387, 387, 12,
375, 356, 351, 387, 387, 387, 387, 379, 377, 0,
361, 343, 346, 348, 346, 387, 343, 346, 333, 332,
17, 387, 352, 34, 15, 355, 346, 387, 338, 31,
341, 28, 347, 350, 336, 331, 35, 339, 346, 342,
322, 328, 332, 337, 324, 321, 326, 322, 332, 318,
334, 45, 318, 328, 309, 324, 387, 325, 328, 314,
309, 334, 314, 323, 305, 317, 312, 305, 293, 33,
309, 305, 311, 387, 387, 293, 40, 288, 387, 387,
295, 296, 285, 290, 290, 43, 296, 43, 306, 387,
0, 0, 394, 395, 391, 0, 0, 395, 395, 12,
383, 364, 359, 395, 395, 395, 395, 387, 385, 0,
369, 351, 354, 356, 354, 395, 351, 354, 341, 340,
17, 395, 360, 34, 15, 363, 354, 395, 346, 31,
349, 28, 355, 358, 344, 339, 35, 347, 354, 350,
330, 336, 340, 345, 332, 329, 334, 330, 340, 326,
342, 45, 326, 336, 317, 332, 395, 333, 336, 322,
317, 342, 322, 331, 313, 325, 320, 313, 301, 33,
317, 313, 319, 395, 395, 301, 40, 296, 395, 395,
303, 304, 293, 298, 298, 43, 304, 43, 314, 395,
387, 387, 301, 286, 55, 278, 302, 296, 296, 295,
71, 78, 292, 279, 283, 294, 274, 282, 276, 274,
65, 279, 85, 264, 387, 292, 295, 292, 56, 289,
292, 289, 71, 387, 273, 281, 271, 254, 275, 275,
271, 270, 277, 248, 276, 279, 276, 80, 78, 83,
85, 265, 264, 90, 92, 94, 263, 262, 256, 262,
259, 254, 387, 253, 263, 250, 254, 241, 96, 99,
101, 249, 243, 245, 242, 103, 102, 105, 248, 247,
246, 245, 244, 243, 387, 387, 242, 241, 240, 239,
238, 237, 387, 387, 103, 236, 387, 235, 230, 387,
395, 395, 309, 294, 55, 286, 310, 304, 304, 303,
71, 78, 300, 287, 291, 302, 282, 290, 284, 282,
65, 287, 85, 272, 395, 300, 303, 300, 56, 297,
300, 297, 71, 395, 281, 289, 279, 262, 283, 283,
279, 278, 86, 257, 285, 288, 285, 82, 85, 87,
88, 274, 273, 92, 94, 98, 272, 271, 265, 271,
268, 263, 395, 262, 272, 259, 263, 262, 249, 101,
103, 104, 257, 251, 253, 250, 105, 104, 107, 256,
255, 254, 253, 252, 251, 395, 395, 250, 249, 248,
247, 246, 245, 395, 395, 105, 244, 395, 243, 238,
225, 123, 245, 231, 230, 229, 228, 227, 226, 229,
210, 215, 209, 213, 212, 212, 215, 209, 213, 208,
110, 211, 387, 387, 387, 387, 387, 387, 387, 387,
387, 387, 387, 387, 217, 212, 202, 210, 387, 213,
202, 201, 387, 387, 387, 387, 387, 387, 387, 195,
208, 208, 387, 189, 195, 199, 204, 188, 202, 184,
188, 188, 186, 194, 181, 195, 190, 176, 199, 199,
387, 181, 172, 187, 181, 387, 171, 168, 169, 387,
172, 176, 166, 387, 170, 176, 153, 186, 387, 387,
172, 86, 166, 387, 387, 387, 387, 168, 387, 156,
395, 233, 127, 130, 253, 239, 238, 237, 236, 235,
234, 237, 218, 223, 217, 221, 220, 220, 223, 217,
221, 216, 117, 219, 395, 395, 395, 395, 395, 395,
395, 395, 395, 395, 395, 395, 225, 220, 210, 218,
395, 221, 210, 209, 208, 207, 395, 395, 395, 395,
395, 395, 395, 201, 214, 214, 395, 195, 201, 205,
210, 194, 208, 190, 194, 194, 192, 200, 187, 201,
196, 182, 205, 205, 203, 203, 395, 185, 176, 191,
185, 395, 175, 172, 173, 395, 176, 180, 170, 395,
174, 180, 157, 190, 395, 395, 395, 395, 176, 130,
387, 387, 167, 175, 145, 173, 166, 163, 387, 387,
132, 123, 164, 387, 153, 139, 167, 170, 167, 156,
155, 146, 147, 154, 125, 126, 128, 387, 387, 145,
141, 141, 148, 147, 146, 145, 144, 143, 133, 136,
134, 387, 387, 387, 387, 387, 387, 134, 138, 128,
135, 116, 124, 111, 387, 126, 387, 70, 387, 387,
151, 74
170, 395, 395, 395, 395, 172, 395, 160, 395, 395,
171, 179, 149, 177, 170, 167, 395, 395, 137, 126,
168, 395, 157, 143, 171, 174, 171, 160, 159, 150,
151, 158, 130, 131, 133, 395, 395, 149, 144, 142,
149, 148, 147, 146, 145, 144, 134, 137, 135, 395,
395, 395, 395, 395, 395, 135, 139, 128, 134, 117,
127, 72, 395, 75, 395, 57, 395, 395, 169, 74
} ;
static const flex_int16_t yy_def[363] =
static const flex_int16_t yy_def[371] =
{ 0,
360, 1, 360, 360, 360, 361, 362, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 361, 362,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
368, 1, 368, 368, 368, 369, 370, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 369, 370,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 0,
360, 360
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 0, 368, 368
} ;
static const flex_int16_t yy_nxt[429] =
static const flex_int16_t yy_nxt[437] =
{ 0,
4, 5, 6, 7, 7, 7, 7, 7, 7, 7,
7, 8, 9, 4, 4, 10, 4, 4, 4, 4,
@@ -837,47 +838,48 @@ static const flex_int16_t yy_nxt[429] =
54, 79, 103, 46, 111, 104, 47, 114, 119, 55,
152, 98, 115, 80, 112, 126, 20, 127, 153, 142,
128, 129, 130, 143, 131, 157, 120, 132, 133, 145,
306, 146, 179, 158, 147, 172, 173, 181, 174, 183,
367, 146, 366, 158, 147, 167, 168, 173, 174, 180,
180, 175, 176, 359, 187, 182, 189, 184, 191, 177,
204, 178, 188, 206, 190, 208, 192, 217, 205, 214,
219, 207, 218, 209, 307, 215, 220, 221, 216, 235,
241, 242, 261, 236, 222, 262, 317, 320, 318, 333,
335, 319, 337, 358, 357, 321, 356, 334, 336, 355,
338, 19, 354, 19, 353, 352, 351, 350, 349, 348,
347, 346, 345, 344, 343, 342, 341, 340, 339, 332,
331, 330, 329, 328, 327, 326, 325, 324, 323, 322,
316, 315, 314, 313, 312, 311, 310, 309, 308, 305,
304, 303, 302, 301, 300, 299, 298, 297, 296, 295,
175, 182, 184, 176, 177, 365, 188, 181, 190, 183,
185, 178, 192, 179, 189, 206, 191, 208, 210, 219,
193, 216, 221, 207, 220, 209, 211, 217, 222, 223,
218, 237, 243, 244, 314, 238, 224, 245, 246, 265,
328, 325, 266, 326, 341, 343, 327, 345, 329, 364,
363, 362, 342, 344, 361, 346, 360, 359, 358, 357,
356, 355, 354, 353, 352, 351, 350, 349, 315, 19,
348, 19, 347, 340, 339, 338, 337, 336, 335, 334,
333, 332, 331, 330, 324, 323, 322, 321, 320, 319,
318, 317, 316, 313, 312, 311, 310, 309, 308, 307,
294, 293, 292, 291, 290, 289, 288, 287, 286, 285,
284, 283, 282, 281, 280, 279, 278, 277, 276, 275,
274, 273, 272, 271, 270, 269, 268, 267, 266, 265,
264, 263, 260, 259, 258, 257, 256, 255, 254, 253,
252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
240, 239, 238, 237, 234, 233, 232, 231, 230, 229,
228, 227, 226, 225, 224, 223, 213, 212, 211, 210,
306, 305, 304, 303, 302, 301, 300, 299, 298, 297,
296, 295, 294, 293, 292, 291, 290, 289, 288, 287,
286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
276, 275, 274, 273, 272, 271, 270, 269, 268, 267,
264, 263, 262, 261, 260, 259, 258, 257, 256, 255,
254, 253, 252, 251, 250, 249, 248, 247, 242, 241,
240, 239, 236, 235, 234, 233, 232, 231, 230, 229,
228, 227, 226, 225, 215, 214, 213, 212, 205, 204,
203, 202, 201, 200, 199, 198, 197, 196, 195, 194,
193, 186, 185, 171, 170, 169, 168, 167, 166, 165,
164, 163, 162, 161, 160, 159, 156, 155, 154, 151,
187, 186, 172, 171, 170, 169, 166, 165, 164, 163,
150, 149, 148, 144, 141, 140, 139, 138, 137, 136,
135, 134, 125, 124, 123, 122, 121, 118, 117, 116,
113, 110, 109, 108, 107, 106, 105, 102, 101, 100,
99, 96, 95, 94, 93, 92, 91, 90, 89, 88,
87, 86, 85, 84, 83, 82, 81, 78, 77, 76,
75, 74, 73, 72, 71, 70, 69, 68, 67, 66,
65, 62, 61, 60, 59, 56, 52, 51, 50, 38,
35, 34, 33, 32, 31, 30, 29, 28, 27, 26,
18, 25, 24, 23, 18, 360, 3, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
162, 161, 160, 159, 156, 155, 154, 151, 150, 149,
148, 144, 141, 140, 139, 138, 137, 136, 135, 134,
125, 124, 123, 122, 121, 118, 117, 116, 113, 110,
109, 108, 107, 106, 105, 102, 101, 100, 99, 96,
95, 94, 93, 92, 91, 90, 89, 88, 87, 86,
85, 84, 83, 82, 81, 78, 77, 76, 75, 74,
73, 72, 71, 70, 69, 68, 67, 66, 65, 62,
61, 60, 59, 56, 52, 51, 50, 38, 35, 34,
33, 32, 31, 30, 29, 28, 27, 26, 18, 25,
24, 23, 18, 368, 3, 368, 368, 368, 368, 368,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368
} ;
static const flex_int16_t yy_chk[429] =
static const flex_int16_t yy_chk[437] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -886,46 +888,47 @@ static const flex_int16_t yy_chk[429] =
1, 10, 10, 31, 35, 35, 31, 34, 47, 34,
42, 34, 34, 42, 80, 34, 40, 47, 34, 34,
40, 62, 87, 34, 96, 87, 34, 98, 105, 40,
129, 80, 98, 62, 96, 111, 362, 111, 129, 121,
129, 80, 98, 62, 96, 111, 370, 111, 129, 121,
111, 111, 112, 121, 112, 133, 105, 112, 112, 123,
292, 123, 149, 133, 123, 148, 148, 150, 148, 151,
366, 123, 364, 133, 123, 143, 143, 148, 148, 149,
149, 148, 148, 358, 154, 150, 155, 151, 156, 148,
169, 148, 154, 170, 155, 171, 156, 177, 169, 176,
178, 170, 177, 171, 292, 176, 178, 178, 176, 195,
202, 202, 221, 195, 178, 221, 311, 312, 311, 325,
326, 311, 327, 356, 354, 312, 353, 325, 326, 352,
327, 361, 351, 361, 350, 349, 348, 341, 340, 339,
338, 337, 336, 335, 334, 333, 332, 331, 330, 324,
323, 322, 321, 320, 319, 318, 317, 316, 315, 313,
308, 307, 306, 305, 304, 303, 300, 298, 293, 291,
288, 287, 286, 285, 283, 282, 281, 279, 278, 277,
148, 150, 151, 148, 148, 362, 154, 149, 155, 150,
151, 148, 156, 148, 154, 170, 155, 171, 172, 178,
156, 177, 179, 170, 178, 171, 172, 177, 179, 179,
177, 196, 203, 203, 300, 196, 179, 204, 204, 223,
320, 319, 223, 319, 333, 334, 319, 335, 320, 361,
360, 359, 333, 334, 358, 335, 357, 356, 349, 348,
347, 346, 345, 344, 343, 342, 341, 340, 300, 369,
339, 369, 338, 332, 331, 330, 329, 328, 327, 326,
325, 324, 323, 321, 316, 315, 314, 313, 312, 311,
308, 306, 301, 299, 294, 293, 292, 291, 289, 288,
275, 274, 273, 272, 270, 269, 268, 267, 266, 265,
264, 263, 262, 261, 260, 259, 258, 257, 256, 255,
254, 252, 251, 250, 242, 241, 240, 238, 237, 236,
235, 222, 220, 219, 218, 217, 216, 215, 214, 213,
212, 211, 210, 209, 208, 207, 206, 205, 204, 203,
201, 199, 198, 196, 192, 191, 190, 189, 188, 187,
184, 183, 182, 181, 180, 179, 175, 174, 173, 172,
168, 167, 166, 165, 164, 162, 161, 160, 159, 158,
157, 153, 152, 147, 146, 145, 144, 143, 142, 141,
140, 139, 138, 137, 136, 135, 132, 131, 130, 128,
287, 285, 284, 283, 281, 280, 279, 278, 276, 275,
274, 273, 272, 271, 270, 269, 268, 267, 266, 265,
264, 263, 262, 261, 260, 259, 258, 256, 255, 254,
246, 245, 244, 243, 242, 240, 239, 238, 237, 224,
222, 221, 220, 219, 218, 217, 216, 215, 214, 213,
212, 211, 210, 209, 208, 207, 206, 205, 202, 200,
199, 197, 193, 192, 191, 190, 189, 188, 185, 184,
183, 182, 181, 180, 176, 175, 174, 173, 169, 168,
167, 166, 165, 164, 162, 161, 160, 159, 158, 157,
153, 152, 147, 146, 145, 144, 142, 141, 140, 139,
127, 126, 124, 122, 120, 119, 118, 117, 116, 115,
114, 113, 110, 109, 108, 107, 106, 104, 103, 99,
97, 95, 94, 93, 92, 91, 88, 86, 83, 82,
81, 79, 78, 77, 76, 75, 74, 73, 72, 71,
70, 69, 68, 66, 65, 64, 63, 61, 60, 59,
58, 57, 56, 55, 54, 53, 52, 51, 50, 49,
48, 46, 45, 44, 43, 41, 39, 37, 36, 33,
30, 29, 28, 27, 25, 24, 23, 22, 21, 19,
18, 13, 12, 11, 5, 3, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
138, 137, 136, 135, 132, 131, 130, 128, 127, 126,
124, 122, 120, 119, 118, 117, 116, 115, 114, 113,
110, 109, 108, 107, 106, 104, 103, 99, 97, 95,
94, 93, 92, 91, 88, 86, 83, 82, 81, 79,
78, 77, 76, 75, 74, 73, 72, 71, 70, 69,
68, 66, 65, 64, 63, 61, 60, 59, 58, 57,
56, 55, 54, 53, 52, 51, 50, 49, 48, 46,
45, 44, 43, 41, 39, 37, 36, 33, 30, 29,
28, 27, 25, 24, 23, 22, 21, 19, 18, 13,
12, 11, 5, 3, 368, 368, 368, 368, 368, 368,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368
} ;
static yy_state_type yy_last_accepting_state;
@@ -984,8 +987,8 @@ static int my_yyinput(char *, int);
extern char *myinput;
extern size_t input_len;
#line 958 "hl/src//H5LTanalyze.c"
#line 959 "hl/src//H5LTanalyze.c"
#line 961 "hl/src//H5LTanalyze.c"
#line 962 "hl/src//H5LTanalyze.c"
#define INITIAL 0
@@ -1197,7 +1200,7 @@ YY_DECL
#line 53 "hl/src//H5LTanalyze.l"
#line 1171 "hl/src//H5LTanalyze.c"
#line 1174 "hl/src//H5LTanalyze.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -1224,13 +1227,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 361 )
if ( yy_current_state >= 369 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 387 );
while ( yy_base[yy_current_state] != 395 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1442,232 +1445,242 @@ YY_RULE_SETUP
case 38:
YY_RULE_SETUP
#line 95 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT16_TOKEN);}
{return hid(H5T_FLOAT_F6E2M3_TOKEN);}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 96 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
{return hid(H5T_FLOAT_F6E3M2_TOKEN);}
YY_BREAK
case 40:
YY_RULE_SETUP
#line 97 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
{return hid(H5T_NATIVE_FLOAT16_TOKEN);}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 98 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 100 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F16BE_TOKEN);}
#line 99 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 101 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F16LE_TOKEN);}
#line 100 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 102 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F32BE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F16BE_TOKEN);}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 103 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F32LE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F16LE_TOKEN);}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 104 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F64BE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F32BE_TOKEN);}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 105 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F64LE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F32LE_TOKEN);}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 106 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_COMPLEX_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F64BE_TOKEN);}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 107 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_COMPLEX_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F64LE_TOKEN);}
YY_BREAK
case 50:
YY_RULE_SETUP
#line 108 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN);}
{return hid(H5T_NATIVE_FLOAT_COMPLEX_TOKEN);}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 110 "hl/src//H5LTanalyze.l"
{return token(H5T_STRING_TOKEN);}
#line 109 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_COMPLEX_TOKEN);}
YY_BREAK
case 52:
YY_RULE_SETUP
#line 111 "hl/src//H5LTanalyze.l"
{return token(STRSIZE_TOKEN);}
#line 110 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN);}
YY_BREAK
case 53:
YY_RULE_SETUP
#line 112 "hl/src//H5LTanalyze.l"
{return token(STRPAD_TOKEN);}
{return token(H5T_STRING_TOKEN);}
YY_BREAK
case 54:
YY_RULE_SETUP
#line 113 "hl/src//H5LTanalyze.l"
{return token(CSET_TOKEN);}
{return token(STRSIZE_TOKEN);}
YY_BREAK
case 55:
YY_RULE_SETUP
#line 114 "hl/src//H5LTanalyze.l"
{return token(CTYPE_TOKEN);}
{return token(STRPAD_TOKEN);}
YY_BREAK
case 56:
YY_RULE_SETUP
#line 115 "hl/src//H5LTanalyze.l"
{return token(H5T_STR_NULLTERM_TOKEN);}
{return token(CSET_TOKEN);}
YY_BREAK
case 57:
YY_RULE_SETUP
#line 116 "hl/src//H5LTanalyze.l"
{return token(H5T_STR_NULLPAD_TOKEN);}
{return token(CTYPE_TOKEN);}
YY_BREAK
case 58:
YY_RULE_SETUP
#line 117 "hl/src//H5LTanalyze.l"
{return token(H5T_STR_SPACEPAD_TOKEN);}
{return token(H5T_STR_NULLTERM_TOKEN);}
YY_BREAK
case 59:
YY_RULE_SETUP
#line 118 "hl/src//H5LTanalyze.l"
{return token(H5T_CSET_ASCII_TOKEN);}
{return token(H5T_STR_NULLPAD_TOKEN);}
YY_BREAK
case 60:
YY_RULE_SETUP
#line 119 "hl/src//H5LTanalyze.l"
{return token(H5T_CSET_UTF8_TOKEN);}
{return token(H5T_STR_SPACEPAD_TOKEN);}
YY_BREAK
case 61:
YY_RULE_SETUP
#line 120 "hl/src//H5LTanalyze.l"
{return token(H5T_C_S1_TOKEN);}
{return token(H5T_CSET_ASCII_TOKEN);}
YY_BREAK
case 62:
YY_RULE_SETUP
#line 121 "hl/src//H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
{return token(H5T_CSET_UTF8_TOKEN);}
YY_BREAK
case 63:
YY_RULE_SETUP
#line 122 "hl/src//H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
{return token(H5T_C_S1_TOKEN);}
YY_BREAK
case 64:
YY_RULE_SETUP
#line 124 "hl/src//H5LTanalyze.l"
{return token(H5T_COMPOUND_TOKEN);}
#line 123 "hl/src//H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
YY_BREAK
case 65:
YY_RULE_SETUP
#line 125 "hl/src//H5LTanalyze.l"
{return token(H5T_ENUM_TOKEN);}
#line 124 "hl/src//H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
YY_BREAK
case 66:
YY_RULE_SETUP
#line 126 "hl/src//H5LTanalyze.l"
{return token(H5T_ARRAY_TOKEN);}
{return token(H5T_COMPOUND_TOKEN);}
YY_BREAK
case 67:
YY_RULE_SETUP
#line 127 "hl/src//H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
{return token(H5T_ENUM_TOKEN);}
YY_BREAK
case 68:
YY_RULE_SETUP
#line 128 "hl/src//H5LTanalyze.l"
{return token(H5T_COMPLEX_TOKEN);}
{return token(H5T_ARRAY_TOKEN);}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 130 "hl/src//H5LTanalyze.l"
{return token(H5T_OPAQUE_TOKEN);}
#line 129 "hl/src//H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
YY_BREAK
case 70:
YY_RULE_SETUP
#line 131 "hl/src//H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
#line 130 "hl/src//H5LTanalyze.l"
{return token(H5T_COMPLEX_TOKEN);}
YY_BREAK
case 71:
YY_RULE_SETUP
#line 132 "hl/src//H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
{return token(H5T_OPAQUE_TOKEN);}
YY_BREAK
case 72:
YY_RULE_SETUP
#line 133 "hl/src//H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 134 "hl/src//H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 136 "hl/src//H5LTanalyze.l"
{
H5LTyylval.ival = atoi(yytext);
return NUMBER;
}
YY_BREAK
case 73:
/* rule 73 can match eol */
case 75:
/* rule 75 can match eol */
YY_RULE_SETUP
#line 139 "hl/src//H5LTanalyze.l"
#line 141 "hl/src//H5LTanalyze.l"
{
H5LTyylval.sval = trim_quotes(yytext);
return STRING;
}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 144 "hl/src//H5LTanalyze.l"
{return token('{');}
YY_BREAK
case 75:
YY_RULE_SETUP
#line 145 "hl/src//H5LTanalyze.l"
{return token('}');}
YY_BREAK
case 76:
YY_RULE_SETUP
#line 146 "hl/src//H5LTanalyze.l"
{return token('[');}
{return token('{');}
YY_BREAK
case 77:
YY_RULE_SETUP
#line 147 "hl/src//H5LTanalyze.l"
{return token(']');}
{return token('}');}
YY_BREAK
case 78:
YY_RULE_SETUP
#line 148 "hl/src//H5LTanalyze.l"
{return token(':');}
{return token('[');}
YY_BREAK
case 79:
YY_RULE_SETUP
#line 149 "hl/src//H5LTanalyze.l"
{return token(';');}
{return token(']');}
YY_BREAK
case 80:
/* rule 80 can match eol */
YY_RULE_SETUP
#line 150 "hl/src//H5LTanalyze.l"
;
{return token(':');}
YY_BREAK
case 81:
YY_RULE_SETUP
#line 151 "hl/src//H5LTanalyze.l"
{return token(';');}
YY_BREAK
case 82:
/* rule 82 can match eol */
YY_RULE_SETUP
#line 152 "hl/src//H5LTanalyze.l"
;
YY_BREAK
case 83:
YY_RULE_SETUP
#line 154 "hl/src//H5LTanalyze.l"
ECHO;
YY_BREAK
#line 1641 "hl/src//H5LTanalyze.c"
#line 1654 "hl/src//H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1964,7 +1977,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 361 )
if ( yy_current_state >= 369 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -1992,11 +2005,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 361 )
if ( yy_current_state >= 369 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 360);
yy_is_jam = (yy_current_state == 368);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2672,7 +2685,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
#line 152 "hl/src//H5LTanalyze.l"
#line 154 "hl/src//H5LTanalyze.l"
/* Allocate a copy of `quoted` with the double quote character at
+2
View File
@@ -92,6 +92,8 @@ H5T_FLOAT_BFLOAT16BE {return hid(H5T_FLOAT_BFLOAT16BE_TOKEN);}
H5T_FLOAT_BFLOAT16LE {return hid(H5T_FLOAT_BFLOAT16LE_TOKEN);}
H5T_FLOAT_F8E4M3 {return hid(H5T_FLOAT_F8E4M3_TOKEN);}
H5T_FLOAT_F8E5M2 {return hid(H5T_FLOAT_F8E5M2_TOKEN);}
H5T_FLOAT_F6E2M3 {return hid(H5T_FLOAT_F6E2M3_TOKEN);}
H5T_FLOAT_F6E3M2 {return hid(H5T_FLOAT_F6E3M2_TOKEN);}
H5T_NATIVE_FLOAT16 {return hid(H5T_NATIVE_FLOAT16_TOKEN);}
H5T_NATIVE_FLOAT {return hid(H5T_NATIVE_FLOAT_TOKEN);}
H5T_NATIVE_DOUBLE {return hid(H5T_NATIVE_DOUBLE_TOKEN);}
+460 -445
View File
@@ -221,92 +221,94 @@ enum yysymbol_kind_t
YYSYMBOL_H5T_FLOAT_BFLOAT16LE_TOKEN = 37, /* H5T_FLOAT_BFLOAT16LE_TOKEN */
YYSYMBOL_H5T_FLOAT_F8E4M3_TOKEN = 38, /* H5T_FLOAT_F8E4M3_TOKEN */
YYSYMBOL_H5T_FLOAT_F8E5M2_TOKEN = 39, /* H5T_FLOAT_F8E5M2_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT16_TOKEN = 40, /* H5T_NATIVE_FLOAT16_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT_TOKEN = 41, /* H5T_NATIVE_FLOAT_TOKEN */
YYSYMBOL_H5T_NATIVE_DOUBLE_TOKEN = 42, /* H5T_NATIVE_DOUBLE_TOKEN */
YYSYMBOL_H5T_NATIVE_LDOUBLE_TOKEN = 43, /* H5T_NATIVE_LDOUBLE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F16BE_TOKEN = 44, /* H5T_COMPLEX_IEEE_F16BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F16LE_TOKEN = 45, /* H5T_COMPLEX_IEEE_F16LE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F32BE_TOKEN = 46, /* H5T_COMPLEX_IEEE_F32BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F32LE_TOKEN = 47, /* H5T_COMPLEX_IEEE_F32LE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F64BE_TOKEN = 48, /* H5T_COMPLEX_IEEE_F64BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F64LE_TOKEN = 49, /* H5T_COMPLEX_IEEE_F64LE_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT_COMPLEX_TOKEN = 50, /* H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
YYSYMBOL_H5T_NATIVE_DOUBLE_COMPLEX_TOKEN = 51, /* H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
YYSYMBOL_H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN = 52, /* H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
YYSYMBOL_H5T_STRING_TOKEN = 53, /* H5T_STRING_TOKEN */
YYSYMBOL_STRSIZE_TOKEN = 54, /* STRSIZE_TOKEN */
YYSYMBOL_STRPAD_TOKEN = 55, /* STRPAD_TOKEN */
YYSYMBOL_CSET_TOKEN = 56, /* CSET_TOKEN */
YYSYMBOL_CTYPE_TOKEN = 57, /* CTYPE_TOKEN */
YYSYMBOL_H5T_VARIABLE_TOKEN = 58, /* H5T_VARIABLE_TOKEN */
YYSYMBOL_H5T_STR_NULLTERM_TOKEN = 59, /* H5T_STR_NULLTERM_TOKEN */
YYSYMBOL_H5T_STR_NULLPAD_TOKEN = 60, /* H5T_STR_NULLPAD_TOKEN */
YYSYMBOL_H5T_STR_SPACEPAD_TOKEN = 61, /* H5T_STR_SPACEPAD_TOKEN */
YYSYMBOL_H5T_CSET_ASCII_TOKEN = 62, /* H5T_CSET_ASCII_TOKEN */
YYSYMBOL_H5T_CSET_UTF8_TOKEN = 63, /* H5T_CSET_UTF8_TOKEN */
YYSYMBOL_H5T_C_S1_TOKEN = 64, /* H5T_C_S1_TOKEN */
YYSYMBOL_H5T_FORTRAN_S1_TOKEN = 65, /* H5T_FORTRAN_S1_TOKEN */
YYSYMBOL_H5T_OPAQUE_TOKEN = 66, /* H5T_OPAQUE_TOKEN */
YYSYMBOL_OPQ_SIZE_TOKEN = 67, /* OPQ_SIZE_TOKEN */
YYSYMBOL_OPQ_TAG_TOKEN = 68, /* OPQ_TAG_TOKEN */
YYSYMBOL_H5T_COMPOUND_TOKEN = 69, /* H5T_COMPOUND_TOKEN */
YYSYMBOL_H5T_ENUM_TOKEN = 70, /* H5T_ENUM_TOKEN */
YYSYMBOL_H5T_ARRAY_TOKEN = 71, /* H5T_ARRAY_TOKEN */
YYSYMBOL_H5T_VLEN_TOKEN = 72, /* H5T_VLEN_TOKEN */
YYSYMBOL_H5T_COMPLEX_TOKEN = 73, /* H5T_COMPLEX_TOKEN */
YYSYMBOL_STRING = 74, /* STRING */
YYSYMBOL_NUMBER = 75, /* NUMBER */
YYSYMBOL_76_ = 76, /* '{' */
YYSYMBOL_77_ = 77, /* '}' */
YYSYMBOL_78_ = 78, /* '[' */
YYSYMBOL_79_ = 79, /* ']' */
YYSYMBOL_80_ = 80, /* ':' */
YYSYMBOL_81_ = 81, /* ';' */
YYSYMBOL_YYACCEPT = 82, /* $accept */
YYSYMBOL_start = 83, /* start */
YYSYMBOL_ddl_type = 84, /* ddl_type */
YYSYMBOL_atomic_type = 85, /* atomic_type */
YYSYMBOL_integer_type = 86, /* integer_type */
YYSYMBOL_fp_type = 87, /* fp_type */
YYSYMBOL_compound_type = 88, /* compound_type */
YYSYMBOL_89_1 = 89, /* $@1 */
YYSYMBOL_memb_list = 90, /* memb_list */
YYSYMBOL_memb_def = 91, /* memb_def */
YYSYMBOL_92_2 = 92, /* $@2 */
YYSYMBOL_field_name = 93, /* field_name */
YYSYMBOL_field_offset = 94, /* field_offset */
YYSYMBOL_offset = 95, /* offset */
YYSYMBOL_array_type = 96, /* array_type */
YYSYMBOL_97_3 = 97, /* $@3 */
YYSYMBOL_dim_list = 98, /* dim_list */
YYSYMBOL_dim = 99, /* dim */
YYSYMBOL_100_4 = 100, /* $@4 */
YYSYMBOL_101_5 = 101, /* $@5 */
YYSYMBOL_dimsize = 102, /* dimsize */
YYSYMBOL_vlen_type = 103, /* vlen_type */
YYSYMBOL_complex_type = 104, /* complex_type */
YYSYMBOL_opaque_type = 105, /* opaque_type */
YYSYMBOL_106_6 = 106, /* @6 */
YYSYMBOL_107_7 = 107, /* $@7 */
YYSYMBOL_opaque_size = 108, /* opaque_size */
YYSYMBOL_opaque_tag = 109, /* opaque_tag */
YYSYMBOL_string_type = 110, /* string_type */
YYSYMBOL_111_8 = 111, /* $@8 */
YYSYMBOL_112_9 = 112, /* $@9 */
YYSYMBOL_113_10 = 113, /* $@10 */
YYSYMBOL_114_11 = 114, /* @11 */
YYSYMBOL_strsize = 115, /* strsize */
YYSYMBOL_strpad = 116, /* strpad */
YYSYMBOL_cset = 117, /* cset */
YYSYMBOL_ctype = 118, /* ctype */
YYSYMBOL_enum_type = 119, /* enum_type */
YYSYMBOL_120_12 = 120, /* $@12 */
YYSYMBOL_enum_list = 121, /* enum_list */
YYSYMBOL_enum_def = 122, /* enum_def */
YYSYMBOL_123_13 = 123, /* $@13 */
YYSYMBOL_enum_symbol = 124, /* enum_symbol */
YYSYMBOL_enum_val = 125 /* enum_val */
YYSYMBOL_H5T_FLOAT_F6E2M3_TOKEN = 40, /* H5T_FLOAT_F6E2M3_TOKEN */
YYSYMBOL_H5T_FLOAT_F6E3M2_TOKEN = 41, /* H5T_FLOAT_F6E3M2_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT16_TOKEN = 42, /* H5T_NATIVE_FLOAT16_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT_TOKEN = 43, /* H5T_NATIVE_FLOAT_TOKEN */
YYSYMBOL_H5T_NATIVE_DOUBLE_TOKEN = 44, /* H5T_NATIVE_DOUBLE_TOKEN */
YYSYMBOL_H5T_NATIVE_LDOUBLE_TOKEN = 45, /* H5T_NATIVE_LDOUBLE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F16BE_TOKEN = 46, /* H5T_COMPLEX_IEEE_F16BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F16LE_TOKEN = 47, /* H5T_COMPLEX_IEEE_F16LE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F32BE_TOKEN = 48, /* H5T_COMPLEX_IEEE_F32BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F32LE_TOKEN = 49, /* H5T_COMPLEX_IEEE_F32LE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F64BE_TOKEN = 50, /* H5T_COMPLEX_IEEE_F64BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F64LE_TOKEN = 51, /* H5T_COMPLEX_IEEE_F64LE_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT_COMPLEX_TOKEN = 52, /* H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
YYSYMBOL_H5T_NATIVE_DOUBLE_COMPLEX_TOKEN = 53, /* H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
YYSYMBOL_H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN = 54, /* H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
YYSYMBOL_H5T_STRING_TOKEN = 55, /* H5T_STRING_TOKEN */
YYSYMBOL_STRSIZE_TOKEN = 56, /* STRSIZE_TOKEN */
YYSYMBOL_STRPAD_TOKEN = 57, /* STRPAD_TOKEN */
YYSYMBOL_CSET_TOKEN = 58, /* CSET_TOKEN */
YYSYMBOL_CTYPE_TOKEN = 59, /* CTYPE_TOKEN */
YYSYMBOL_H5T_VARIABLE_TOKEN = 60, /* H5T_VARIABLE_TOKEN */
YYSYMBOL_H5T_STR_NULLTERM_TOKEN = 61, /* H5T_STR_NULLTERM_TOKEN */
YYSYMBOL_H5T_STR_NULLPAD_TOKEN = 62, /* H5T_STR_NULLPAD_TOKEN */
YYSYMBOL_H5T_STR_SPACEPAD_TOKEN = 63, /* H5T_STR_SPACEPAD_TOKEN */
YYSYMBOL_H5T_CSET_ASCII_TOKEN = 64, /* H5T_CSET_ASCII_TOKEN */
YYSYMBOL_H5T_CSET_UTF8_TOKEN = 65, /* H5T_CSET_UTF8_TOKEN */
YYSYMBOL_H5T_C_S1_TOKEN = 66, /* H5T_C_S1_TOKEN */
YYSYMBOL_H5T_FORTRAN_S1_TOKEN = 67, /* H5T_FORTRAN_S1_TOKEN */
YYSYMBOL_H5T_OPAQUE_TOKEN = 68, /* H5T_OPAQUE_TOKEN */
YYSYMBOL_OPQ_SIZE_TOKEN = 69, /* OPQ_SIZE_TOKEN */
YYSYMBOL_OPQ_TAG_TOKEN = 70, /* OPQ_TAG_TOKEN */
YYSYMBOL_H5T_COMPOUND_TOKEN = 71, /* H5T_COMPOUND_TOKEN */
YYSYMBOL_H5T_ENUM_TOKEN = 72, /* H5T_ENUM_TOKEN */
YYSYMBOL_H5T_ARRAY_TOKEN = 73, /* H5T_ARRAY_TOKEN */
YYSYMBOL_H5T_VLEN_TOKEN = 74, /* H5T_VLEN_TOKEN */
YYSYMBOL_H5T_COMPLEX_TOKEN = 75, /* H5T_COMPLEX_TOKEN */
YYSYMBOL_STRING = 76, /* STRING */
YYSYMBOL_NUMBER = 77, /* NUMBER */
YYSYMBOL_78_ = 78, /* '{' */
YYSYMBOL_79_ = 79, /* '}' */
YYSYMBOL_80_ = 80, /* '[' */
YYSYMBOL_81_ = 81, /* ']' */
YYSYMBOL_82_ = 82, /* ':' */
YYSYMBOL_83_ = 83, /* ';' */
YYSYMBOL_YYACCEPT = 84, /* $accept */
YYSYMBOL_start = 85, /* start */
YYSYMBOL_ddl_type = 86, /* ddl_type */
YYSYMBOL_atomic_type = 87, /* atomic_type */
YYSYMBOL_integer_type = 88, /* integer_type */
YYSYMBOL_fp_type = 89, /* fp_type */
YYSYMBOL_compound_type = 90, /* compound_type */
YYSYMBOL_91_1 = 91, /* $@1 */
YYSYMBOL_memb_list = 92, /* memb_list */
YYSYMBOL_memb_def = 93, /* memb_def */
YYSYMBOL_94_2 = 94, /* $@2 */
YYSYMBOL_field_name = 95, /* field_name */
YYSYMBOL_field_offset = 96, /* field_offset */
YYSYMBOL_offset = 97, /* offset */
YYSYMBOL_array_type = 98, /* array_type */
YYSYMBOL_99_3 = 99, /* $@3 */
YYSYMBOL_dim_list = 100, /* dim_list */
YYSYMBOL_dim = 101, /* dim */
YYSYMBOL_102_4 = 102, /* $@4 */
YYSYMBOL_103_5 = 103, /* $@5 */
YYSYMBOL_dimsize = 104, /* dimsize */
YYSYMBOL_vlen_type = 105, /* vlen_type */
YYSYMBOL_complex_type = 106, /* complex_type */
YYSYMBOL_opaque_type = 107, /* opaque_type */
YYSYMBOL_108_6 = 108, /* @6 */
YYSYMBOL_109_7 = 109, /* $@7 */
YYSYMBOL_opaque_size = 110, /* opaque_size */
YYSYMBOL_opaque_tag = 111, /* opaque_tag */
YYSYMBOL_string_type = 112, /* string_type */
YYSYMBOL_113_8 = 113, /* $@8 */
YYSYMBOL_114_9 = 114, /* $@9 */
YYSYMBOL_115_10 = 115, /* $@10 */
YYSYMBOL_116_11 = 116, /* @11 */
YYSYMBOL_strsize = 117, /* strsize */
YYSYMBOL_strpad = 118, /* strpad */
YYSYMBOL_cset = 119, /* cset */
YYSYMBOL_ctype = 120, /* ctype */
YYSYMBOL_enum_type = 121, /* enum_type */
YYSYMBOL_122_12 = 122, /* $@12 */
YYSYMBOL_enum_list = 123, /* enum_list */
YYSYMBOL_enum_def = 124, /* enum_def */
YYSYMBOL_125_13 = 125, /* $@13 */
YYSYMBOL_enum_symbol = 126, /* enum_symbol */
YYSYMBOL_enum_val = 127 /* enum_val */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
@@ -632,21 +634,21 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 77
#define YYFINAL 79
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 251
#define YYLAST 257
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 82
#define YYNTOKENS 84
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 44
/* YYNRULES -- Number of rules. */
#define YYNRULES 110
#define YYNRULES 112
/* YYNSTATES -- Number of states. */
#define YYNSTATES 155
#define YYNSTATES 157
/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 330
#define YYMAXUTOK 332
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -665,14 +667,14 @@ static const yytype_int8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 80, 81,
2, 2, 2, 2, 2, 2, 2, 2, 82, 83,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 78, 2, 79, 2, 2, 2, 2, 2, 2,
2, 80, 2, 81, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 76, 2, 77, 2, 2, 2, 2,
2, 2, 2, 78, 2, 79, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -693,25 +695,25 @@ static const yytype_int8 yytranslate[] =
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75
75, 76, 77
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
0, 110, 110, 111, 113, 114, 115, 116, 117, 119,
120, 121, 122, 123, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
152, 155, 156, 157, 158, 159, 160, 161, 162, 163,
164, 165, 166, 167, 168, 172, 171, 180, 181, 183,
183, 220, 228, 229, 232, 234, 234, 243, 244, 246,
247, 246, 254, 257, 261, 262, 263, 264, 265, 266,
267, 268, 269, 270, 277, 282, 274, 289, 291, 296,
303, 312, 319, 293, 343, 344, 346, 347, 348, 350,
351, 353, 354, 358, 357, 362, 363, 365, 365, 415,
417
0, 111, 111, 112, 114, 115, 116, 117, 118, 120,
121, 122, 123, 124, 127, 128, 129, 130, 131, 132,
133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
153, 156, 157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 175, 174, 183,
184, 186, 186, 223, 231, 232, 235, 237, 237, 246,
247, 249, 250, 249, 257, 260, 264, 265, 266, 267,
268, 269, 270, 271, 272, 273, 280, 285, 277, 292,
294, 299, 306, 315, 322, 296, 346, 347, 349, 350,
351, 353, 354, 356, 357, 361, 360, 365, 366, 368,
368, 418, 420
};
#endif
@@ -743,6 +745,7 @@ static const char *const yytname[] =
"H5T_IEEE_F64BE_TOKEN", "H5T_IEEE_F64LE_TOKEN",
"H5T_FLOAT_BFLOAT16BE_TOKEN", "H5T_FLOAT_BFLOAT16LE_TOKEN",
"H5T_FLOAT_F8E4M3_TOKEN", "H5T_FLOAT_F8E5M2_TOKEN",
"H5T_FLOAT_F6E2M3_TOKEN", "H5T_FLOAT_F6E3M2_TOKEN",
"H5T_NATIVE_FLOAT16_TOKEN", "H5T_NATIVE_FLOAT_TOKEN",
"H5T_NATIVE_DOUBLE_TOKEN", "H5T_NATIVE_LDOUBLE_TOKEN",
"H5T_COMPLEX_IEEE_F16BE_TOKEN", "H5T_COMPLEX_IEEE_F16LE_TOKEN",
@@ -788,22 +791,22 @@ yysymbol_name (yysymbol_kind_t yysymbol)
STATE-NUM. */
static const yytype_int16 yypact[] =
{
148, -24, -24, -24, -24, -24, -24, -24, -24, -24,
152, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -21, -15, -24, -14, -24, -4, -2, 127, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
74, 62, 55, 219, 56, 148, 148, -24, 72, 58,
-24, 53, -24, 59, 60, -24, -24, 54, -24, 57,
73, -24, -3, -24, -24, -24, -24, -24, -24, -24,
-24, -24, 63, -24, 86, 80, 75, -23, 128, -24,
-1, 130, -24, 122, -24, -24, -24, -24, -24, -24,
-24, -24, -24, 124, -24, 125, 132, 129, 133, 134,
-24, -24, -24, -24, -24, -24, 131, -24, 153, 138,
-24, -10, -24, -24, -24, 135, -24, 154, 0, -24,
-24, 168, -24, 173, -24
-24, -24, -24, -21, -15, -24, -14, -24, -4, -2,
131, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, 76, 64, 57, 225, 58, 152, 152, -24,
74, 60, -24, 55, -24, 61, 62, -24, -24, 56,
-24, 59, 75, -24, -3, -24, -24, -24, -24, -24,
-24, -24, -24, -24, 65, -24, 88, 82, 77, -23,
132, -24, -1, 134, -24, 126, -24, -24, -24, -24,
-24, -24, -24, -24, -24, 128, -24, 129, 136, 133,
137, 138, -24, -24, -24, -24, -24, -24, 135, -24,
157, 142, -24, -10, -24, -24, -24, 139, -24, 158,
0, -24, -24, 172, -24, 177, -24
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -815,24 +818,24 @@ static const yytype_int8 yydefact[] =
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 78, 77, 80, 79, 82, 81, 74, 75,
76, 0, 0, 55, 0, 65, 0, 0, 0, 3,
4, 9, 10, 5, 6, 7, 8, 13, 11, 12,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
57, 0, 67, 0, 0, 94, 95, 0, 87, 0,
0, 103, 0, 73, 83, 89, 84, 56, 59, 58,
105, 69, 0, 68, 0, 0, 0, 0, 0, 66,
0, 0, 61, 62, 109, 104, 106, 107, 72, 70,
96, 97, 98, 0, 88, 0, 0, 0, 0, 0,
90, 85, 64, 63, 60, 110, 0, 71, 0, 0,
108, 0, 86, 99, 100, 0, 91, 0, 0, 101,
102, 0, 92, 0, 93
53, 54, 55, 56, 80, 79, 82, 81, 84, 83,
76, 77, 78, 0, 0, 57, 0, 67, 0, 0,
0, 3, 4, 9, 10, 5, 6, 7, 8, 13,
11, 12, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 59, 0, 69, 0, 0, 96, 97, 0,
89, 0, 0, 105, 0, 75, 85, 91, 86, 58,
61, 60, 107, 71, 0, 70, 0, 0, 0, 0,
0, 68, 0, 0, 63, 64, 111, 106, 108, 109,
74, 72, 98, 99, 100, 0, 90, 0, 0, 0,
0, 0, 92, 87, 66, 65, 62, 112, 0, 73,
0, 0, 110, 0, 88, 101, 102, 0, 93, 0,
0, 103, 104, 0, 94, 0, 95
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-24, -24, -19, -24, 178, -24, -24, -24, -24, -24,
-24, -24, -19, -24, 182, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
@@ -842,11 +845,11 @@ static const yytype_int16 yypgoto[] =
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_uint8 yydefgoto[] =
{
0, 58, 59, 60, 61, 62, 63, 72, 90, 99,
106, 113, 127, 133, 64, 74, 92, 103, 108, 129,
119, 65, 66, 67, 105, 139, 89, 125, 68, 104,
138, 147, 153, 87, 123, 145, 151, 69, 100, 107,
116, 128, 117, 136
0, 60, 61, 62, 63, 64, 65, 74, 92, 101,
108, 115, 129, 135, 66, 76, 94, 105, 110, 131,
121, 67, 68, 69, 107, 141, 91, 127, 70, 106,
140, 149, 155, 89, 125, 147, 153, 71, 102, 109,
118, 130, 119, 138
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -859,27 +862,27 @@ static const yytype_uint8 yytable[] =
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 114, 143, 144, 115, 70, 83, 84, 120, 121,
122, 71, 73, 52, 149, 150, 53, 54, 55, 56,
57, 98, 75, 102, 76, 101, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 77, 78, 79,
85, 80, 82, 88, 91, 95, 93, 94, 96, 52,
109, 110, 53, 54, 55, 56, 57, 86, 111, 112,
97, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 126, 118, 124, 130, 131, 132, 135, 141,
134, 148, 140, 137, 52, 142, 146, 53, 54, 55,
56, 57, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 152,
154, 81
51, 52, 53, 116, 145, 146, 117, 72, 85, 86,
122, 123, 124, 73, 75, 54, 151, 152, 55, 56,
57, 58, 59, 100, 77, 104, 78, 103, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 79, 80, 81, 87, 82, 84, 90, 93, 97,
95, 96, 98, 54, 111, 112, 55, 56, 57, 58,
59, 88, 113, 114, 99, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 128, 120,
126, 132, 133, 134, 137, 143, 136, 150, 142, 139,
54, 144, 148, 55, 56, 57, 58, 59, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 154, 156, 83
};
static const yytype_int8 yycheck[] =
@@ -889,27 +892,27 @@ static const yytype_int8 yycheck[] =
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 74, 62, 63, 77, 76, 75, 76, 59, 60,
61, 76, 76, 66, 64, 65, 69, 70, 71, 72,
73, 90, 76, 92, 76, 78, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 0, 54, 67,
58, 76, 76, 75, 81, 81, 77, 77, 81, 66,
77, 55, 69, 70, 71, 72, 73, 75, 68, 74,
77, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 80, 75, 74, 81, 81, 75, 75, 56,
81, 57, 81, 79, 66, 77, 81, 69, 70, 71,
72, 73, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 81,
77, 73
53, 54, 55, 76, 64, 65, 79, 78, 77, 78,
61, 62, 63, 78, 78, 68, 66, 67, 71, 72,
73, 74, 75, 92, 78, 94, 78, 80, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 0, 56, 69, 60, 78, 78, 77, 83, 83,
79, 79, 83, 68, 79, 57, 71, 72, 73, 74,
75, 77, 70, 76, 79, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 82, 77,
76, 83, 83, 77, 77, 58, 83, 59, 83, 81,
68, 79, 83, 71, 72, 73, 74, 75, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 83, 79, 75
};
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
@@ -921,34 +924,34 @@ static const yytype_int8 yystos[] =
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 66, 69, 70, 71, 72, 73, 83, 84,
85, 86, 87, 88, 96, 103, 104, 105, 110, 119,
76, 76, 89, 76, 97, 76, 76, 0, 54, 67,
76, 86, 76, 84, 84, 58, 75, 115, 75, 108,
90, 81, 98, 77, 77, 81, 81, 77, 84, 91,
120, 78, 84, 99, 111, 106, 92, 121, 100, 77,
55, 68, 74, 93, 74, 77, 122, 124, 75, 102,
59, 60, 61, 116, 74, 109, 80, 94, 123, 101,
81, 81, 75, 95, 81, 75, 125, 79, 112, 107,
81, 56, 77, 62, 63, 117, 81, 113, 57, 64,
65, 118, 81, 114, 77
52, 53, 54, 55, 68, 71, 72, 73, 74, 75,
85, 86, 87, 88, 89, 90, 98, 105, 106, 107,
112, 121, 78, 78, 91, 78, 99, 78, 78, 0,
56, 69, 78, 88, 78, 86, 86, 60, 77, 117,
77, 110, 92, 83, 100, 79, 79, 83, 83, 79,
86, 93, 122, 80, 86, 101, 113, 108, 94, 123,
102, 79, 57, 70, 76, 95, 76, 79, 124, 126,
77, 104, 61, 62, 63, 118, 76, 111, 82, 96,
125, 103, 83, 83, 77, 97, 83, 77, 127, 81,
114, 109, 83, 58, 79, 64, 65, 119, 83, 115,
59, 66, 67, 120, 83, 116, 79
};
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
static const yytype_int8 yyr1[] =
{
0, 82, 83, 83, 84, 84, 84, 84, 84, 85,
85, 85, 85, 85, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 89, 88, 90, 90, 92,
91, 93, 94, 94, 95, 97, 96, 98, 98, 100,
101, 99, 102, 103, 104, 104, 104, 104, 104, 104,
104, 104, 104, 104, 106, 107, 105, 108, 109, 111,
112, 113, 114, 110, 115, 115, 116, 116, 116, 117,
117, 118, 118, 120, 119, 121, 121, 123, 122, 124,
125
0, 84, 85, 85, 86, 86, 86, 86, 86, 87,
87, 87, 87, 87, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
88, 89, 89, 89, 89, 89, 89, 89, 89, 89,
89, 89, 89, 89, 89, 89, 89, 91, 90, 92,
92, 94, 93, 95, 96, 96, 97, 99, 98, 100,
100, 102, 103, 101, 104, 105, 106, 106, 106, 106,
106, 106, 106, 106, 106, 106, 108, 109, 107, 110,
111, 113, 114, 115, 116, 112, 117, 117, 118, 118,
118, 119, 119, 120, 120, 122, 121, 123, 123, 125,
124, 126, 127
};
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
@@ -959,13 +962,13 @@ static const yytype_int8 yyr2[] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 5, 0, 2, 0,
5, 1, 0, 2, 1, 0, 6, 0, 2, 0,
0, 5, 1, 4, 1, 1, 1, 1, 1, 1,
1, 1, 1, 4, 0, 0, 11, 1, 1, 0,
0, 0, 0, 19, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 7, 0, 2, 0, 4, 1,
1
1, 1, 1, 1, 1, 1, 1, 0, 5, 0,
2, 0, 5, 1, 0, 2, 1, 0, 6, 0,
2, 0, 0, 5, 1, 4, 1, 1, 1, 1,
1, 1, 1, 1, 1, 4, 0, 0, 11, 1,
1, 0, 0, 0, 0, 19, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 7, 0, 2, 0,
4, 1, 1
};
@@ -1429,287 +1432,299 @@ yyreduce:
switch (yyn)
{
case 2: /* start: %empty */
#line 110 "hl/src//H5LTparse.y"
#line 111 "hl/src//H5LTparse.y"
{ memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
#line 1406 "hl/src//H5LTparse.c"
#line 1409 "hl/src//H5LTparse.c"
break;
case 3: /* start: ddl_type */
#line 111 "hl/src//H5LTparse.y"
#line 112 "hl/src//H5LTparse.y"
{ return (yyval.hid);}
#line 1412 "hl/src//H5LTparse.c"
#line 1415 "hl/src//H5LTparse.c"
break;
case 14: /* integer_type: H5T_STD_I8BE_TOKEN */
#line 126 "hl/src//H5LTparse.y"
#line 127 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
#line 1418 "hl/src//H5LTparse.c"
#line 1421 "hl/src//H5LTparse.c"
break;
case 15: /* integer_type: H5T_STD_I8LE_TOKEN */
#line 127 "hl/src//H5LTparse.y"
#line 128 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
#line 1424 "hl/src//H5LTparse.c"
#line 1427 "hl/src//H5LTparse.c"
break;
case 16: /* integer_type: H5T_STD_I16BE_TOKEN */
#line 128 "hl/src//H5LTparse.y"
#line 129 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
#line 1430 "hl/src//H5LTparse.c"
#line 1433 "hl/src//H5LTparse.c"
break;
case 17: /* integer_type: H5T_STD_I16LE_TOKEN */
#line 129 "hl/src//H5LTparse.y"
#line 130 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
#line 1436 "hl/src//H5LTparse.c"
#line 1439 "hl/src//H5LTparse.c"
break;
case 18: /* integer_type: H5T_STD_I32BE_TOKEN */
#line 130 "hl/src//H5LTparse.y"
#line 131 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
#line 1442 "hl/src//H5LTparse.c"
#line 1445 "hl/src//H5LTparse.c"
break;
case 19: /* integer_type: H5T_STD_I32LE_TOKEN */
#line 131 "hl/src//H5LTparse.y"
#line 132 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
#line 1448 "hl/src//H5LTparse.c"
#line 1451 "hl/src//H5LTparse.c"
break;
case 20: /* integer_type: H5T_STD_I64BE_TOKEN */
#line 132 "hl/src//H5LTparse.y"
#line 133 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
#line 1454 "hl/src//H5LTparse.c"
#line 1457 "hl/src//H5LTparse.c"
break;
case 21: /* integer_type: H5T_STD_I64LE_TOKEN */
#line 133 "hl/src//H5LTparse.y"
#line 134 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
#line 1460 "hl/src//H5LTparse.c"
#line 1463 "hl/src//H5LTparse.c"
break;
case 22: /* integer_type: H5T_STD_U8BE_TOKEN */
#line 134 "hl/src//H5LTparse.y"
#line 135 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
#line 1466 "hl/src//H5LTparse.c"
#line 1469 "hl/src//H5LTparse.c"
break;
case 23: /* integer_type: H5T_STD_U8LE_TOKEN */
#line 135 "hl/src//H5LTparse.y"
#line 136 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
#line 1472 "hl/src//H5LTparse.c"
#line 1475 "hl/src//H5LTparse.c"
break;
case 24: /* integer_type: H5T_STD_U16BE_TOKEN */
#line 136 "hl/src//H5LTparse.y"
#line 137 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
#line 1478 "hl/src//H5LTparse.c"
#line 1481 "hl/src//H5LTparse.c"
break;
case 25: /* integer_type: H5T_STD_U16LE_TOKEN */
#line 137 "hl/src//H5LTparse.y"
#line 138 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
#line 1484 "hl/src//H5LTparse.c"
#line 1487 "hl/src//H5LTparse.c"
break;
case 26: /* integer_type: H5T_STD_U32BE_TOKEN */
#line 138 "hl/src//H5LTparse.y"
#line 139 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
#line 1490 "hl/src//H5LTparse.c"
#line 1493 "hl/src//H5LTparse.c"
break;
case 27: /* integer_type: H5T_STD_U32LE_TOKEN */
#line 139 "hl/src//H5LTparse.y"
#line 140 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
#line 1496 "hl/src//H5LTparse.c"
#line 1499 "hl/src//H5LTparse.c"
break;
case 28: /* integer_type: H5T_STD_U64BE_TOKEN */
#line 140 "hl/src//H5LTparse.y"
#line 141 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
#line 1502 "hl/src//H5LTparse.c"
#line 1505 "hl/src//H5LTparse.c"
break;
case 29: /* integer_type: H5T_STD_U64LE_TOKEN */
#line 141 "hl/src//H5LTparse.y"
#line 142 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
#line 1508 "hl/src//H5LTparse.c"
#line 1511 "hl/src//H5LTparse.c"
break;
case 30: /* integer_type: H5T_NATIVE_CHAR_TOKEN */
#line 142 "hl/src//H5LTparse.y"
#line 143 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
#line 1514 "hl/src//H5LTparse.c"
#line 1517 "hl/src//H5LTparse.c"
break;
case 31: /* integer_type: H5T_NATIVE_SCHAR_TOKEN */
#line 143 "hl/src//H5LTparse.y"
#line 144 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
#line 1520 "hl/src//H5LTparse.c"
#line 1523 "hl/src//H5LTparse.c"
break;
case 32: /* integer_type: H5T_NATIVE_UCHAR_TOKEN */
#line 144 "hl/src//H5LTparse.y"
#line 145 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
#line 1526 "hl/src//H5LTparse.c"
#line 1529 "hl/src//H5LTparse.c"
break;
case 33: /* integer_type: H5T_NATIVE_SHORT_TOKEN */
#line 145 "hl/src//H5LTparse.y"
#line 146 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
#line 1532 "hl/src//H5LTparse.c"
#line 1535 "hl/src//H5LTparse.c"
break;
case 34: /* integer_type: H5T_NATIVE_USHORT_TOKEN */
#line 146 "hl/src//H5LTparse.y"
#line 147 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
#line 1538 "hl/src//H5LTparse.c"
#line 1541 "hl/src//H5LTparse.c"
break;
case 35: /* integer_type: H5T_NATIVE_INT_TOKEN */
#line 147 "hl/src//H5LTparse.y"
#line 148 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
#line 1544 "hl/src//H5LTparse.c"
#line 1547 "hl/src//H5LTparse.c"
break;
case 36: /* integer_type: H5T_NATIVE_UINT_TOKEN */
#line 148 "hl/src//H5LTparse.y"
#line 149 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
#line 1550 "hl/src//H5LTparse.c"
#line 1553 "hl/src//H5LTparse.c"
break;
case 37: /* integer_type: H5T_NATIVE_LONG_TOKEN */
#line 149 "hl/src//H5LTparse.y"
#line 150 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
#line 1556 "hl/src//H5LTparse.c"
#line 1559 "hl/src//H5LTparse.c"
break;
case 38: /* integer_type: H5T_NATIVE_ULONG_TOKEN */
#line 150 "hl/src//H5LTparse.y"
#line 151 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
#line 1562 "hl/src//H5LTparse.c"
#line 1565 "hl/src//H5LTparse.c"
break;
case 39: /* integer_type: H5T_NATIVE_LLONG_TOKEN */
#line 151 "hl/src//H5LTparse.y"
#line 152 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
#line 1568 "hl/src//H5LTparse.c"
#line 1571 "hl/src//H5LTparse.c"
break;
case 40: /* integer_type: H5T_NATIVE_ULLONG_TOKEN */
#line 152 "hl/src//H5LTparse.y"
#line 153 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
#line 1574 "hl/src//H5LTparse.c"
#line 1577 "hl/src//H5LTparse.c"
break;
case 41: /* fp_type: H5T_IEEE_F16BE_TOKEN */
#line 155 "hl/src//H5LTparse.y"
#line 156 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F16BE); }
#line 1580 "hl/src//H5LTparse.c"
#line 1583 "hl/src//H5LTparse.c"
break;
case 42: /* fp_type: H5T_IEEE_F16LE_TOKEN */
#line 156 "hl/src//H5LTparse.y"
#line 157 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F16LE); }
#line 1586 "hl/src//H5LTparse.c"
#line 1589 "hl/src//H5LTparse.c"
break;
case 43: /* fp_type: H5T_IEEE_F32BE_TOKEN */
#line 157 "hl/src//H5LTparse.y"
#line 158 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
#line 1592 "hl/src//H5LTparse.c"
#line 1595 "hl/src//H5LTparse.c"
break;
case 44: /* fp_type: H5T_IEEE_F32LE_TOKEN */
#line 158 "hl/src//H5LTparse.y"
#line 159 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
#line 1598 "hl/src//H5LTparse.c"
#line 1601 "hl/src//H5LTparse.c"
break;
case 45: /* fp_type: H5T_IEEE_F64BE_TOKEN */
#line 159 "hl/src//H5LTparse.y"
#line 160 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
#line 1604 "hl/src//H5LTparse.c"
#line 1607 "hl/src//H5LTparse.c"
break;
case 46: /* fp_type: H5T_IEEE_F64LE_TOKEN */
#line 160 "hl/src//H5LTparse.y"
#line 161 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
#line 1610 "hl/src//H5LTparse.c"
#line 1613 "hl/src//H5LTparse.c"
break;
case 47: /* fp_type: H5T_FLOAT_BFLOAT16BE_TOKEN */
#line 161 "hl/src//H5LTparse.y"
#line 162 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_BFLOAT16BE); }
#line 1616 "hl/src//H5LTparse.c"
#line 1619 "hl/src//H5LTparse.c"
break;
case 48: /* fp_type: H5T_FLOAT_BFLOAT16LE_TOKEN */
#line 162 "hl/src//H5LTparse.y"
#line 163 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_BFLOAT16LE); }
#line 1622 "hl/src//H5LTparse.c"
#line 1625 "hl/src//H5LTparse.c"
break;
case 49: /* fp_type: H5T_FLOAT_F8E4M3_TOKEN */
#line 163 "hl/src//H5LTparse.y"
#line 164 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F8E4M3); }
#line 1628 "hl/src//H5LTparse.c"
#line 1631 "hl/src//H5LTparse.c"
break;
case 50: /* fp_type: H5T_FLOAT_F8E5M2_TOKEN */
#line 164 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F8E5M2); }
#line 1634 "hl/src//H5LTparse.c"
break;
case 51: /* fp_type: H5T_NATIVE_FLOAT16_TOKEN */
#line 165 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT16); }
#line 1640 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F8E5M2); }
#line 1637 "hl/src//H5LTparse.c"
break;
case 52: /* fp_type: H5T_NATIVE_FLOAT_TOKEN */
case 51: /* fp_type: H5T_FLOAT_F6E2M3_TOKEN */
#line 166 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
#line 1646 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F6E2M3); }
#line 1643 "hl/src//H5LTparse.c"
break;
case 53: /* fp_type: H5T_NATIVE_DOUBLE_TOKEN */
case 52: /* fp_type: H5T_FLOAT_F6E3M2_TOKEN */
#line 167 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
#line 1652 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F6E3M2); }
#line 1649 "hl/src//H5LTparse.c"
break;
case 54: /* fp_type: H5T_NATIVE_LDOUBLE_TOKEN */
case 53: /* fp_type: H5T_NATIVE_FLOAT16_TOKEN */
#line 168 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT16); }
#line 1655 "hl/src//H5LTparse.c"
break;
case 54: /* fp_type: H5T_NATIVE_FLOAT_TOKEN */
#line 169 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
#line 1661 "hl/src//H5LTparse.c"
break;
case 55: /* fp_type: H5T_NATIVE_DOUBLE_TOKEN */
#line 170 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
#line 1667 "hl/src//H5LTparse.c"
break;
case 56: /* fp_type: H5T_NATIVE_LDOUBLE_TOKEN */
#line 171 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
#line 1658 "hl/src//H5LTparse.c"
#line 1673 "hl/src//H5LTparse.c"
break;
case 55: /* $@1: %empty */
#line 172 "hl/src//H5LTparse.y"
case 57: /* $@1: %empty */
#line 175 "hl/src//H5LTparse.y"
{ csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
#line 1664 "hl/src//H5LTparse.c"
#line 1679 "hl/src//H5LTparse.c"
break;
case 56: /* compound_type: H5T_COMPOUND_TOKEN $@1 '{' memb_list '}' */
#line 174 "hl/src//H5LTparse.y"
case 58: /* compound_type: H5T_COMPOUND_TOKEN $@1 '{' memb_list '}' */
#line 177 "hl/src//H5LTparse.y"
{ (yyval.hid) = cmpd_stack[csindex].id;
cmpd_stack[csindex].id = 0;
cmpd_stack[csindex].first_memb = 1;
csindex--;
}
#line 1674 "hl/src//H5LTparse.c"
#line 1689 "hl/src//H5LTparse.c"
break;
case 59: /* $@2: %empty */
#line 183 "hl/src//H5LTparse.y"
case 61: /* $@2: %empty */
#line 186 "hl/src//H5LTparse.y"
{ cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
#line 1680 "hl/src//H5LTparse.c"
#line 1695 "hl/src//H5LTparse.c"
break;
case 60: /* memb_def: ddl_type $@2 field_name field_offset ';' */
#line 185 "hl/src//H5LTparse.y"
case 62: /* memb_def: ddl_type $@2 field_name field_offset ';' */
#line 188 "hl/src//H5LTparse.y"
{
size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
@@ -1744,168 +1759,168 @@ yyreduce:
new_size = H5Tget_size(dtype_id);
}
#line 1719 "hl/src//H5LTparse.c"
#line 1734 "hl/src//H5LTparse.c"
break;
case 61: /* field_name: STRING */
#line 221 "hl/src//H5LTparse.y"
case 63: /* field_name: STRING */
#line 224 "hl/src//H5LTparse.y"
{
(yyval.sval) = strdup(yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
#line 1729 "hl/src//H5LTparse.c"
#line 1744 "hl/src//H5LTparse.c"
break;
case 62: /* field_offset: %empty */
#line 228 "hl/src//H5LTparse.y"
case 64: /* field_offset: %empty */
#line 231 "hl/src//H5LTparse.y"
{ (yyval.ival) = 0; }
#line 1735 "hl/src//H5LTparse.c"
#line 1750 "hl/src//H5LTparse.c"
break;
case 63: /* field_offset: ':' offset */
#line 230 "hl/src//H5LTparse.y"
case 65: /* field_offset: ':' offset */
#line 233 "hl/src//H5LTparse.y"
{ (yyval.ival) = yylval.ival; }
#line 1741 "hl/src//H5LTparse.c"
#line 1756 "hl/src//H5LTparse.c"
break;
case 65: /* $@3: %empty */
#line 234 "hl/src//H5LTparse.y"
case 67: /* $@3: %empty */
#line 237 "hl/src//H5LTparse.y"
{ asindex++; /*pushd onto the stack*/ }
#line 1747 "hl/src//H5LTparse.c"
#line 1762 "hl/src//H5LTparse.c"
break;
case 66: /* array_type: H5T_ARRAY_TOKEN $@3 '{' dim_list ddl_type '}' */
#line 236 "hl/src//H5LTparse.y"
case 68: /* array_type: H5T_ARRAY_TOKEN $@3 '{' dim_list ddl_type '}' */
#line 239 "hl/src//H5LTparse.y"
{
(yyval.hid) = H5Tarray_create2((yyvsp[-1].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
arr_stack[asindex].ndims = 0;
asindex--;
H5Tclose((yyvsp[-1].hid));
}
#line 1758 "hl/src//H5LTparse.c"
#line 1773 "hl/src//H5LTparse.c"
break;
case 69: /* $@4: %empty */
#line 246 "hl/src//H5LTparse.y"
case 71: /* $@4: %empty */
#line 249 "hl/src//H5LTparse.y"
{ arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
#line 1764 "hl/src//H5LTparse.c"
#line 1779 "hl/src//H5LTparse.c"
break;
case 70: /* $@5: %empty */
#line 247 "hl/src//H5LTparse.y"
case 72: /* $@5: %empty */
#line 250 "hl/src//H5LTparse.y"
{ unsigned ndims = arr_stack[asindex].ndims;
arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival;
arr_stack[asindex].ndims++;
arr_stack[asindex].is_dim = 0;
}
#line 1774 "hl/src//H5LTparse.c"
#line 1789 "hl/src//H5LTparse.c"
break;
case 73: /* vlen_type: H5T_VLEN_TOKEN '{' ddl_type '}' */
#line 258 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1780 "hl/src//H5LTparse.c"
break;
case 74: /* complex_type: H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
case 75: /* vlen_type: H5T_VLEN_TOKEN '{' ddl_type '}' */
#line 261 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT_COMPLEX); }
#line 1786 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1795 "hl/src//H5LTparse.c"
break;
case 75: /* complex_type: H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
#line 262 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE_COMPLEX); }
#line 1792 "hl/src//H5LTparse.c"
break;
case 76: /* complex_type: H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
#line 263 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE_COMPLEX); }
#line 1798 "hl/src//H5LTparse.c"
break;
case 77: /* complex_type: H5T_COMPLEX_IEEE_F16LE_TOKEN */
case 76: /* complex_type: H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
#line 264 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16LE); }
#line 1804 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT_COMPLEX); }
#line 1801 "hl/src//H5LTparse.c"
break;
case 78: /* complex_type: H5T_COMPLEX_IEEE_F16BE_TOKEN */
case 77: /* complex_type: H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
#line 265 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16BE); }
#line 1810 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE_COMPLEX); }
#line 1807 "hl/src//H5LTparse.c"
break;
case 79: /* complex_type: H5T_COMPLEX_IEEE_F32LE_TOKEN */
case 78: /* complex_type: H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
#line 266 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32LE); }
#line 1816 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE_COMPLEX); }
#line 1813 "hl/src//H5LTparse.c"
break;
case 80: /* complex_type: H5T_COMPLEX_IEEE_F32BE_TOKEN */
case 79: /* complex_type: H5T_COMPLEX_IEEE_F16LE_TOKEN */
#line 267 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32BE); }
#line 1822 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16LE); }
#line 1819 "hl/src//H5LTparse.c"
break;
case 81: /* complex_type: H5T_COMPLEX_IEEE_F64LE_TOKEN */
case 80: /* complex_type: H5T_COMPLEX_IEEE_F16BE_TOKEN */
#line 268 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64LE); }
#line 1828 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16BE); }
#line 1825 "hl/src//H5LTparse.c"
break;
case 82: /* complex_type: H5T_COMPLEX_IEEE_F64BE_TOKEN */
case 81: /* complex_type: H5T_COMPLEX_IEEE_F32LE_TOKEN */
#line 269 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64BE); }
#line 1834 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32LE); }
#line 1831 "hl/src//H5LTparse.c"
break;
case 83: /* complex_type: H5T_COMPLEX_TOKEN '{' ddl_type '}' */
case 82: /* complex_type: H5T_COMPLEX_IEEE_F32BE_TOKEN */
#line 270 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32BE); }
#line 1837 "hl/src//H5LTparse.c"
break;
case 83: /* complex_type: H5T_COMPLEX_IEEE_F64LE_TOKEN */
#line 271 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcomplex_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1840 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64LE); }
#line 1843 "hl/src//H5LTparse.c"
break;
case 84: /* @6: %empty */
#line 277 "hl/src//H5LTparse.y"
case 84: /* complex_type: H5T_COMPLEX_IEEE_F64BE_TOKEN */
#line 272 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64BE); }
#line 1849 "hl/src//H5LTparse.c"
break;
case 85: /* complex_type: H5T_COMPLEX_TOKEN '{' ddl_type '}' */
#line 274 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcomplex_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1855 "hl/src//H5LTparse.c"
break;
case 86: /* @6: %empty */
#line 280 "hl/src//H5LTparse.y"
{
size_t size = (size_t)yylval.ival;
(yyval.hid) = H5Tcreate(H5T_OPAQUE, size);
}
#line 1849 "hl/src//H5LTparse.c"
#line 1864 "hl/src//H5LTparse.c"
break;
case 85: /* $@7: %empty */
#line 282 "hl/src//H5LTparse.y"
case 87: /* $@7: %empty */
#line 285 "hl/src//H5LTparse.y"
{
H5Tset_tag((yyvsp[-3].hid), yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
#line 1859 "hl/src//H5LTparse.c"
#line 1874 "hl/src//H5LTparse.c"
break;
case 86: /* opaque_type: H5T_OPAQUE_TOKEN '{' OPQ_SIZE_TOKEN opaque_size ';' @6 OPQ_TAG_TOKEN opaque_tag ';' $@7 '}' */
#line 287 "hl/src//H5LTparse.y"
case 88: /* opaque_type: H5T_OPAQUE_TOKEN '{' OPQ_SIZE_TOKEN opaque_size ';' @6 OPQ_TAG_TOKEN opaque_tag ';' $@7 '}' */
#line 290 "hl/src//H5LTparse.y"
{ (yyval.hid) = (yyvsp[-5].hid); }
#line 1865 "hl/src//H5LTparse.c"
#line 1880 "hl/src//H5LTparse.c"
break;
case 89: /* $@8: %empty */
#line 296 "hl/src//H5LTparse.y"
case 91: /* $@8: %empty */
#line 299 "hl/src//H5LTparse.y"
{
if((yyvsp[-1].ival) == H5T_VARIABLE_TOKEN)
is_variable = 1;
else
str_size = yylval.ival;
}
#line 1876 "hl/src//H5LTparse.c"
#line 1891 "hl/src//H5LTparse.c"
break;
case 90: /* $@9: %empty */
#line 303 "hl/src//H5LTparse.y"
case 92: /* $@9: %empty */
#line 306 "hl/src//H5LTparse.y"
{
if((yyvsp[-1].ival) == H5T_STR_NULLTERM_TOKEN)
str_pad = H5T_STR_NULLTERM;
@@ -1914,33 +1929,33 @@ yyreduce:
else if((yyvsp[-1].ival) == H5T_STR_SPACEPAD_TOKEN)
str_pad = H5T_STR_SPACEPAD;
}
#line 1889 "hl/src//H5LTparse.c"
#line 1904 "hl/src//H5LTparse.c"
break;
case 91: /* $@10: %empty */
#line 312 "hl/src//H5LTparse.y"
case 93: /* $@10: %empty */
#line 315 "hl/src//H5LTparse.y"
{
if((yyvsp[-1].ival) == H5T_CSET_ASCII_TOKEN)
str_cset = H5T_CSET_ASCII;
else if((yyvsp[-1].ival) == H5T_CSET_UTF8_TOKEN)
str_cset = H5T_CSET_UTF8;
}
#line 1900 "hl/src//H5LTparse.c"
#line 1915 "hl/src//H5LTparse.c"
break;
case 92: /* @11: %empty */
#line 319 "hl/src//H5LTparse.y"
case 94: /* @11: %empty */
#line 322 "hl/src//H5LTparse.y"
{
if((yyvsp[-1].hid) == H5T_C_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_C_S1);
else if((yyvsp[-1].hid) == H5T_FORTRAN_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_FORTRAN_S1);
}
#line 1911 "hl/src//H5LTparse.c"
#line 1926 "hl/src//H5LTparse.c"
break;
case 93: /* string_type: H5T_STRING_TOKEN '{' STRSIZE_TOKEN strsize ';' $@8 STRPAD_TOKEN strpad ';' $@9 CSET_TOKEN cset ';' $@10 CTYPE_TOKEN ctype ';' @11 '}' */
#line 326 "hl/src//H5LTparse.y"
case 95: /* string_type: H5T_STRING_TOKEN '{' STRSIZE_TOKEN strsize ';' $@8 STRPAD_TOKEN strpad ';' $@9 CSET_TOKEN cset ';' $@10 CTYPE_TOKEN ctype ';' @11 '}' */
#line 329 "hl/src//H5LTparse.y"
{
hid_t str_id = (yyvsp[-1].hid);
@@ -1957,82 +1972,82 @@ yyreduce:
(yyval.hid) = str_id;
}
#line 1932 "hl/src//H5LTparse.c"
#line 1947 "hl/src//H5LTparse.c"
break;
case 94: /* strsize: H5T_VARIABLE_TOKEN */
#line 343 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_VARIABLE_TOKEN;}
#line 1938 "hl/src//H5LTparse.c"
break;
case 96: /* strpad: H5T_STR_NULLTERM_TOKEN */
case 96: /* strsize: H5T_VARIABLE_TOKEN */
#line 346 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_VARIABLE_TOKEN;}
#line 1953 "hl/src//H5LTparse.c"
break;
case 98: /* strpad: H5T_STR_NULLTERM_TOKEN */
#line 349 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
#line 1944 "hl/src//H5LTparse.c"
#line 1959 "hl/src//H5LTparse.c"
break;
case 97: /* strpad: H5T_STR_NULLPAD_TOKEN */
#line 347 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
#line 1950 "hl/src//H5LTparse.c"
break;
case 98: /* strpad: H5T_STR_SPACEPAD_TOKEN */
#line 348 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
#line 1956 "hl/src//H5LTparse.c"
break;
case 99: /* cset: H5T_CSET_ASCII_TOKEN */
case 99: /* strpad: H5T_STR_NULLPAD_TOKEN */
#line 350 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
#line 1962 "hl/src//H5LTparse.c"
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
#line 1965 "hl/src//H5LTparse.c"
break;
case 100: /* cset: H5T_CSET_UTF8_TOKEN */
case 100: /* strpad: H5T_STR_SPACEPAD_TOKEN */
#line 351 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
#line 1968 "hl/src//H5LTparse.c"
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
#line 1971 "hl/src//H5LTparse.c"
break;
case 101: /* ctype: H5T_C_S1_TOKEN */
case 101: /* cset: H5T_CSET_ASCII_TOKEN */
#line 353 "hl/src//H5LTparse.y"
{(yyval.hid) = H5T_C_S1_TOKEN;}
#line 1974 "hl/src//H5LTparse.c"
{(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
#line 1977 "hl/src//H5LTparse.c"
break;
case 102: /* ctype: H5T_FORTRAN_S1_TOKEN */
case 102: /* cset: H5T_CSET_UTF8_TOKEN */
#line 354 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
#line 1983 "hl/src//H5LTparse.c"
break;
case 103: /* ctype: H5T_C_S1_TOKEN */
#line 356 "hl/src//H5LTparse.y"
{(yyval.hid) = H5T_C_S1_TOKEN;}
#line 1989 "hl/src//H5LTparse.c"
break;
case 104: /* ctype: H5T_FORTRAN_S1_TOKEN */
#line 357 "hl/src//H5LTparse.y"
{(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
#line 1980 "hl/src//H5LTparse.c"
#line 1995 "hl/src//H5LTparse.c"
break;
case 103: /* $@12: %empty */
#line 358 "hl/src//H5LTparse.y"
case 105: /* $@12: %empty */
#line 361 "hl/src//H5LTparse.y"
{ is_enum = 1; enum_id = H5Tenum_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1986 "hl/src//H5LTparse.c"
#line 2001 "hl/src//H5LTparse.c"
break;
case 104: /* enum_type: H5T_ENUM_TOKEN '{' integer_type ';' $@12 enum_list '}' */
#line 360 "hl/src//H5LTparse.y"
case 106: /* enum_type: H5T_ENUM_TOKEN '{' integer_type ';' $@12 enum_list '}' */
#line 363 "hl/src//H5LTparse.y"
{ is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
#line 1992 "hl/src//H5LTparse.c"
#line 2007 "hl/src//H5LTparse.c"
break;
case 107: /* $@13: %empty */
#line 365 "hl/src//H5LTparse.y"
case 109: /* $@13: %empty */
#line 368 "hl/src//H5LTparse.y"
{
is_enum_memb = 1; /*indicate member of enum*/
enum_memb_symbol = strdup(yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
#line 2003 "hl/src//H5LTparse.c"
#line 2018 "hl/src//H5LTparse.c"
break;
case 108: /* enum_def: enum_symbol $@13 enum_val ';' */
#line 372 "hl/src//H5LTparse.y"
case 110: /* enum_def: enum_symbol $@13 enum_val ';' */
#line 375 "hl/src//H5LTparse.y"
{
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
@@ -2075,11 +2090,11 @@ yyreduce:
H5Tclose(super);
H5Tclose(native);
}
#line 2050 "hl/src//H5LTparse.c"
#line 2065 "hl/src//H5LTparse.c"
break;
#line 2054 "hl/src//H5LTparse.c"
#line 2069 "hl/src//H5LTparse.c"
default: break;
}
+39 -37
View File
@@ -91,42 +91,44 @@ extern int H5LTyydebug;
H5T_FLOAT_BFLOAT16LE_TOKEN = 292, /* H5T_FLOAT_BFLOAT16LE_TOKEN */
H5T_FLOAT_F8E4M3_TOKEN = 293, /* H5T_FLOAT_F8E4M3_TOKEN */
H5T_FLOAT_F8E5M2_TOKEN = 294, /* H5T_FLOAT_F8E5M2_TOKEN */
H5T_NATIVE_FLOAT16_TOKEN = 295, /* H5T_NATIVE_FLOAT16_TOKEN */
H5T_NATIVE_FLOAT_TOKEN = 296, /* H5T_NATIVE_FLOAT_TOKEN */
H5T_NATIVE_DOUBLE_TOKEN = 297, /* H5T_NATIVE_DOUBLE_TOKEN */
H5T_NATIVE_LDOUBLE_TOKEN = 298, /* H5T_NATIVE_LDOUBLE_TOKEN */
H5T_COMPLEX_IEEE_F16BE_TOKEN = 299, /* H5T_COMPLEX_IEEE_F16BE_TOKEN */
H5T_COMPLEX_IEEE_F16LE_TOKEN = 300, /* H5T_COMPLEX_IEEE_F16LE_TOKEN */
H5T_COMPLEX_IEEE_F32BE_TOKEN = 301, /* H5T_COMPLEX_IEEE_F32BE_TOKEN */
H5T_COMPLEX_IEEE_F32LE_TOKEN = 302, /* H5T_COMPLEX_IEEE_F32LE_TOKEN */
H5T_COMPLEX_IEEE_F64BE_TOKEN = 303, /* H5T_COMPLEX_IEEE_F64BE_TOKEN */
H5T_COMPLEX_IEEE_F64LE_TOKEN = 304, /* H5T_COMPLEX_IEEE_F64LE_TOKEN */
H5T_NATIVE_FLOAT_COMPLEX_TOKEN = 305, /* H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
H5T_NATIVE_DOUBLE_COMPLEX_TOKEN = 306, /* H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN = 307, /* H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
H5T_STRING_TOKEN = 308, /* H5T_STRING_TOKEN */
STRSIZE_TOKEN = 309, /* STRSIZE_TOKEN */
STRPAD_TOKEN = 310, /* STRPAD_TOKEN */
CSET_TOKEN = 311, /* CSET_TOKEN */
CTYPE_TOKEN = 312, /* CTYPE_TOKEN */
H5T_VARIABLE_TOKEN = 313, /* H5T_VARIABLE_TOKEN */
H5T_STR_NULLTERM_TOKEN = 314, /* H5T_STR_NULLTERM_TOKEN */
H5T_STR_NULLPAD_TOKEN = 315, /* H5T_STR_NULLPAD_TOKEN */
H5T_STR_SPACEPAD_TOKEN = 316, /* H5T_STR_SPACEPAD_TOKEN */
H5T_CSET_ASCII_TOKEN = 317, /* H5T_CSET_ASCII_TOKEN */
H5T_CSET_UTF8_TOKEN = 318, /* H5T_CSET_UTF8_TOKEN */
H5T_C_S1_TOKEN = 319, /* H5T_C_S1_TOKEN */
H5T_FORTRAN_S1_TOKEN = 320, /* H5T_FORTRAN_S1_TOKEN */
H5T_OPAQUE_TOKEN = 321, /* H5T_OPAQUE_TOKEN */
OPQ_SIZE_TOKEN = 322, /* OPQ_SIZE_TOKEN */
OPQ_TAG_TOKEN = 323, /* OPQ_TAG_TOKEN */
H5T_COMPOUND_TOKEN = 324, /* H5T_COMPOUND_TOKEN */
H5T_ENUM_TOKEN = 325, /* H5T_ENUM_TOKEN */
H5T_ARRAY_TOKEN = 326, /* H5T_ARRAY_TOKEN */
H5T_VLEN_TOKEN = 327, /* H5T_VLEN_TOKEN */
H5T_COMPLEX_TOKEN = 328, /* H5T_COMPLEX_TOKEN */
STRING = 329, /* STRING */
NUMBER = 330 /* NUMBER */
H5T_FLOAT_F6E2M3_TOKEN = 295, /* H5T_FLOAT_F6E2M3_TOKEN */
H5T_FLOAT_F6E3M2_TOKEN = 296, /* H5T_FLOAT_F6E3M2_TOKEN */
H5T_NATIVE_FLOAT16_TOKEN = 297, /* H5T_NATIVE_FLOAT16_TOKEN */
H5T_NATIVE_FLOAT_TOKEN = 298, /* H5T_NATIVE_FLOAT_TOKEN */
H5T_NATIVE_DOUBLE_TOKEN = 299, /* H5T_NATIVE_DOUBLE_TOKEN */
H5T_NATIVE_LDOUBLE_TOKEN = 300, /* H5T_NATIVE_LDOUBLE_TOKEN */
H5T_COMPLEX_IEEE_F16BE_TOKEN = 301, /* H5T_COMPLEX_IEEE_F16BE_TOKEN */
H5T_COMPLEX_IEEE_F16LE_TOKEN = 302, /* H5T_COMPLEX_IEEE_F16LE_TOKEN */
H5T_COMPLEX_IEEE_F32BE_TOKEN = 303, /* H5T_COMPLEX_IEEE_F32BE_TOKEN */
H5T_COMPLEX_IEEE_F32LE_TOKEN = 304, /* H5T_COMPLEX_IEEE_F32LE_TOKEN */
H5T_COMPLEX_IEEE_F64BE_TOKEN = 305, /* H5T_COMPLEX_IEEE_F64BE_TOKEN */
H5T_COMPLEX_IEEE_F64LE_TOKEN = 306, /* H5T_COMPLEX_IEEE_F64LE_TOKEN */
H5T_NATIVE_FLOAT_COMPLEX_TOKEN = 307, /* H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
H5T_NATIVE_DOUBLE_COMPLEX_TOKEN = 308, /* H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN = 309, /* H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
H5T_STRING_TOKEN = 310, /* H5T_STRING_TOKEN */
STRSIZE_TOKEN = 311, /* STRSIZE_TOKEN */
STRPAD_TOKEN = 312, /* STRPAD_TOKEN */
CSET_TOKEN = 313, /* CSET_TOKEN */
CTYPE_TOKEN = 314, /* CTYPE_TOKEN */
H5T_VARIABLE_TOKEN = 315, /* H5T_VARIABLE_TOKEN */
H5T_STR_NULLTERM_TOKEN = 316, /* H5T_STR_NULLTERM_TOKEN */
H5T_STR_NULLPAD_TOKEN = 317, /* H5T_STR_NULLPAD_TOKEN */
H5T_STR_SPACEPAD_TOKEN = 318, /* H5T_STR_SPACEPAD_TOKEN */
H5T_CSET_ASCII_TOKEN = 319, /* H5T_CSET_ASCII_TOKEN */
H5T_CSET_UTF8_TOKEN = 320, /* H5T_CSET_UTF8_TOKEN */
H5T_C_S1_TOKEN = 321, /* H5T_C_S1_TOKEN */
H5T_FORTRAN_S1_TOKEN = 322, /* H5T_FORTRAN_S1_TOKEN */
H5T_OPAQUE_TOKEN = 323, /* H5T_OPAQUE_TOKEN */
OPQ_SIZE_TOKEN = 324, /* OPQ_SIZE_TOKEN */
OPQ_TAG_TOKEN = 325, /* OPQ_TAG_TOKEN */
H5T_COMPOUND_TOKEN = 326, /* H5T_COMPOUND_TOKEN */
H5T_ENUM_TOKEN = 327, /* H5T_ENUM_TOKEN */
H5T_ARRAY_TOKEN = 328, /* H5T_ARRAY_TOKEN */
H5T_VLEN_TOKEN = 329, /* H5T_VLEN_TOKEN */
H5T_COMPLEX_TOKEN = 330, /* H5T_COMPLEX_TOKEN */
STRING = 331, /* STRING */
NUMBER = 332 /* NUMBER */
};
typedef enum yytokentype yytoken_kind_t;
#endif
@@ -141,7 +143,7 @@ union YYSTYPE
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
#line 145 "hl/src//H5LTparse.h"
#line 147 "hl/src//H5LTparse.h"
};
typedef union YYSTYPE YYSTYPE;
+3
View File
@@ -83,6 +83,7 @@ static char* enum_memb_symbol; /*enum member symbol string*/
%token <hid> H5T_IEEE_F32BE_TOKEN H5T_IEEE_F32LE_TOKEN H5T_IEEE_F64BE_TOKEN H5T_IEEE_F64LE_TOKEN
%token <hid> H5T_FLOAT_BFLOAT16BE_TOKEN H5T_FLOAT_BFLOAT16LE_TOKEN
%token <hid> H5T_FLOAT_F8E4M3_TOKEN H5T_FLOAT_F8E5M2_TOKEN
%token <hid> H5T_FLOAT_F6E2M3_TOKEN H5T_FLOAT_F6E3M2_TOKEN
%token <hid> H5T_NATIVE_FLOAT16_TOKEN H5T_NATIVE_FLOAT_TOKEN H5T_NATIVE_DOUBLE_TOKEN H5T_NATIVE_LDOUBLE_TOKEN
%token <hid> H5T_COMPLEX_IEEE_F16BE_TOKEN H5T_COMPLEX_IEEE_F16LE_TOKEN
@@ -162,6 +163,8 @@ fp_type : H5T_IEEE_F16BE_TOKEN { $<hid>$ = H5Tcopy(H5T_IEEE_F16BE)
| H5T_FLOAT_BFLOAT16LE_TOKEN { $<hid>$ = H5Tcopy(H5T_FLOAT_BFLOAT16LE); }
| H5T_FLOAT_F8E4M3_TOKEN { $<hid>$ = H5Tcopy(H5T_FLOAT_F8E4M3); }
| H5T_FLOAT_F8E5M2_TOKEN { $<hid>$ = H5Tcopy(H5T_FLOAT_F8E5M2); }
| H5T_FLOAT_F6E2M3_TOKEN { $<hid>$ = H5Tcopy(H5T_FLOAT_F6E2M3); }
| H5T_FLOAT_F6E3M2_TOKEN { $<hid>$ = H5Tcopy(H5T_FLOAT_F6E3M2); }
| H5T_NATIVE_FLOAT16_TOKEN { $<hid>$ = H5Tcopy(H5T_NATIVE_FLOAT16); }
| H5T_NATIVE_FLOAT_TOKEN { $<hid>$ = H5Tcopy(H5T_NATIVE_FLOAT); }
| H5T_NATIVE_DOUBLE_TOKEN { $<hid>$ = H5Tcopy(H5T_NATIVE_DOUBLE); }
+14
View File
@@ -1221,6 +1221,20 @@ test_fps(void)
if (H5Tclose(dtype) < 0)
goto out;
if ((dtype = H5LTtext_to_dtype("H5T_FLOAT_F6E2M3\n", H5LT_DDL)) < 0)
goto out;
if (!H5Tequal(dtype, H5T_FLOAT_F6E2M3))
goto out;
if (H5Tclose(dtype) < 0)
goto out;
if ((dtype = H5LTtext_to_dtype("H5T_FLOAT_F6E3M2\n", H5LT_DDL)) < 0)
goto out;
if (!H5Tequal(dtype, H5T_FLOAT_F6E3M2))
goto out;
if (H5Tclose(dtype) < 0)
goto out;
PASSED();
return 0;
@@ -1129,6 +1129,10 @@ public class HDF5Constants {
/** */
public static final long H5T_FLOAT_F8E5M2 = H5T_FLOAT_F8E5M2();
/** */
public static final long H5T_FLOAT_F6E2M3 = H5T_FLOAT_F6E2M3();
/** */
public static final long H5T_FLOAT_F6E3M2 = H5T_FLOAT_F6E3M2();
/** */
public static final int H5T_INTEGER = H5T_INTEGER();
/** */
public static final long H5T_INTEL_B16 = H5T_INTEL_B16();
@@ -2648,6 +2652,10 @@ public class HDF5Constants {
private static native final long H5T_FLOAT_F8E5M2();
private static native final long H5T_FLOAT_F6E2M3();
private static native final long H5T_FLOAT_F6E3M2();
private static native final int H5T_INTEGER();
private static native final long H5T_INTEL_B16();
+10
View File
@@ -2756,6 +2756,16 @@ Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F8E5M2(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F8E5M2;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F6E2M3(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F6E2M3;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F6E3M2(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F6E3M2;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEGER(JNIEnv *env, jclass cls)
{
+16
View File
@@ -2171,6 +2171,10 @@ h5str_get_little_endian_type(hid_t tid)
p_type = H5Tcopy(H5T_FLOAT_F8E4M3);
else if (true == H5Tequal(tid, H5T_FLOAT_F8E5M2))
p_type = H5Tcopy(H5T_FLOAT_F8E5M2);
else if (true == H5Tequal(tid, H5T_FLOAT_F6E2M3))
p_type = H5Tcopy(H5T_FLOAT_F6E2M3);
else if (true == H5Tequal(tid, H5T_FLOAT_F6E3M2))
p_type = H5Tcopy(H5T_FLOAT_F6E3M2);
}
else if (size == 2) {
if (true == H5Tequal(tid, H5T_IEEE_F16LE) || true == H5Tequal(tid, H5T_IEEE_F16BE))
@@ -2294,6 +2298,18 @@ h5str_get_big_endian_type(hid_t tid)
else if (true == H5Tequal(tid, H5T_FLOAT_F8E5M2)) {
p_type = H5Tcopy(H5T_FLOAT_F8E5M2);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
else if (true == H5Tequal(tid, H5T_FLOAT_F6E2M3)) {
p_type = H5Tcopy(H5T_FLOAT_F6E2M3);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
else if (true == H5Tequal(tid, H5T_FLOAT_F6E3M2)) {
p_type = H5Tcopy(H5T_FLOAT_F6E3M2);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
+17
View File
@@ -56,6 +56,21 @@ We would like to thank the many HDF5 community members who contributed to HDF5 2
## Library
### Added predefined datatypes for FP6 data
Predefined datatypes have been added for FP6 data in E2M3 and E3M2 formats (https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf).
The following new macros have been added:
- H5T_FLOAT_F6E2M3
- H5T_FLOAT_F6E3M2
These macros map to IDs of HDF5 datatypes representing a 6-bit floating-point datatype with 1 sign bit and either 2 exponent bits and 3 mantissa bits (E2M3 format) or 3 exponent bits and 2 mantissa bits (E3M2 format).
Note that support for a native FP6 datatype has not been added yet. This means that any datatype conversions to/from the new FP6 datatypes will be emulated in software rather than potentially using specialized hardware instructions. Until support for a native FP6 type is added, an application can avoid datatype conversion performance issues if it is sure that the datatype used for in-memory data buffers matches one of the above floating-point formats. In this case, the application can specify one of the above macros for both the file datatype when creating a dataset or attribute and the memory datatype when performing I/O on the dataset or attribute.
Also note that HDF5 currently has incomplete support for datatype conversions involving non-IEEE floating-point format datatypes. Refer to the 'Known Problems' section for information about datatype conversions with these new datatypes.
## Parallel Library
## Fortran Library
@@ -124,6 +139,8 @@ Current test results are available [here](https://my.cdash.org/index.php?project
H5T_FLOAT_F8E4M3
H5T_FLOAT_F8E5M2
H5T_FLOAT_F6E2M3
H5T_FLOAT_F6E3M2
If possible, an application should perform I/O with these datatypes using an in-memory type that matches the specific floating-point format and perform explicit data conversion outside of HDF5, if necessary. Otherwise, read/written values should be verified to be correct.
+40
View File
@@ -195,6 +195,36 @@
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \
}
/* Define the code templates for standard FP6 E2M3 6-bit floats for the "GUTS" in the H5T_INIT_TYPE macro */
#define H5T_INIT_TYPE_FLOAT6E2M3_CORE \
{ \
H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_LE) /* Simply pick LE here */ \
dt->shared->u.atomic.prec = 6; \
dt->shared->u.atomic.u.f.sign = 5; \
dt->shared->u.atomic.u.f.epos = 3; \
dt->shared->u.atomic.u.f.esize = 2; \
dt->shared->u.atomic.u.f.ebias = 0x1; \
dt->shared->u.atomic.u.f.mpos = 0; \
dt->shared->u.atomic.u.f.msize = 3; \
dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \
}
/* Define the code templates for standard FP6 E3M2 6-bit floats for the "GUTS" in the H5T_INIT_TYPE macro */
#define H5T_INIT_TYPE_FLOAT6E3M2_CORE \
{ \
H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_LE) /* Simply pick LE here */ \
dt->shared->u.atomic.prec = 6; \
dt->shared->u.atomic.u.f.sign = 5; \
dt->shared->u.atomic.u.f.epos = 2; \
dt->shared->u.atomic.u.f.esize = 3; \
dt->shared->u.atomic.u.f.ebias = 0x3; \
dt->shared->u.atomic.u.f.mpos = 0; \
dt->shared->u.atomic.u.f.msize = 2; \
dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \
}
/* Define the code templates for standard floats for the "GUTS" in the H5T_INIT_TYPE macro */
#define H5T_INIT_TYPE_FLOAT_COMMON(ENDIANNESS) \
{ \
@@ -489,6 +519,8 @@ hid_t H5T_FLOAT_BFLOAT16BE_g = H5I_INVALID_HID;
hid_t H5T_FLOAT_BFLOAT16LE_g = H5I_INVALID_HID;
hid_t H5T_FLOAT_F8E4M3_g = H5I_INVALID_HID;
hid_t H5T_FLOAT_F8E5M2_g = H5I_INVALID_HID;
hid_t H5T_FLOAT_F6E2M3_g = H5I_INVALID_HID;
hid_t H5T_FLOAT_F6E3M2_g = H5I_INVALID_HID;
hid_t H5T_COMPLEX_IEEE_F16BE_g = H5I_INVALID_HID;
hid_t H5T_COMPLEX_IEEE_F16LE_g = H5I_INVALID_HID;
@@ -1161,6 +1193,12 @@ H5T__init_package(void)
/* 8-bit FP8 E5M2 float type */
H5T_INIT_TYPE(FLOAT8E5M2, H5T_FLOAT_F8E5M2_g, COPY, native_double, SET, 1)
/* 6-bit FP6 E2M3 float type */
H5T_INIT_TYPE(FLOAT6E2M3, H5T_FLOAT_F6E2M3_g, COPY, native_double, SET, 1)
/* 6-bit FP6 E3M2 float type */
H5T_INIT_TYPE(FLOAT6E3M2, H5T_FLOAT_F6E3M2_g, COPY, native_double, SET, 1)
/*------------------------------------------------------------
* VAX Types
*------------------------------------------------------------
@@ -2260,6 +2298,8 @@ H5T_top_term_package(void)
H5T_FLOAT_BFLOAT16LE_g = H5I_INVALID_HID;
H5T_FLOAT_F8E4M3_g = H5I_INVALID_HID;
H5T_FLOAT_F8E5M2_g = H5I_INVALID_HID;
H5T_FLOAT_F6E2M3_g = H5I_INVALID_HID;
H5T_FLOAT_F6E3M2_g = H5I_INVALID_HID;
H5T_COMPLEX_IEEE_F16BE_g = H5I_INVALID_HID;
H5T_COMPLEX_IEEE_F16LE_g = H5I_INVALID_HID;
+1
View File
@@ -4011,6 +4011,7 @@ filled according to the value of this property. The padding can be:
* H5T_IEEE_F64BE | H5T_IEEE_F64LE |
* H5T_FLOAT_BFLOAT16BE | H5T_FLOAT_BFLOAT16LE |
* H5T_FLOAT_F8E4M3 | H5T_FLOAT_F8E5M2 |
* H5T_FLOAT_F6E2M3 | H5T_FLOAT_F6E3M2 |
* H5T_NATIVE_FLOAT16 | H5T_NATIVE_FLOAT |
* H5T_NATIVE_DOUBLE | H5T_NATIVE_LDOUBLE
*
+16 -2
View File
@@ -740,13 +740,20 @@ H5T__get_native_float(const H5T_t *dtype, H5T_direction_t direction, size_t *str
*/
H5T_t *f8_e4m3_dt = NULL; /* Datatype for FP8 E4M3 */
H5T_t *f8_e5m2_dt = NULL; /* Datatype for FP8 E5M2 */
H5T_t *f6_e2m3_dt = NULL; /* Datatype for FP6 E2M3 */
H5T_t *f6_e3m2_dt = NULL; /* Datatype for FP6 E3M2 */
if (NULL == (f8_e4m3_dt = H5I_object(H5T_FLOAT_F8E4M3)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (NULL == (f8_e5m2_dt = H5I_object(H5T_FLOAT_F8E5M2)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (NULL == (f6_e2m3_dt = H5I_object(H5T_FLOAT_F6E2M3)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (NULL == (f6_e3m2_dt = H5I_object(H5T_FLOAT_F6E3M2)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (0 == H5T_cmp(dtype, f8_e4m3_dt, false) || 0 == H5T_cmp(dtype, f8_e5m2_dt, false)) {
if (0 == H5T_cmp(dtype, f8_e4m3_dt, false) || 0 == H5T_cmp(dtype, f8_e5m2_dt, false) ||
0 == H5T_cmp(dtype, f6_e2m3_dt, false) || 0 == H5T_cmp(dtype, f6_e3m2_dt, false)) {
match = H5T_NATIVE_FLOAT_MATCH_FLOAT16;
native_size = sizeof(H5__Float16);
}
@@ -858,13 +865,20 @@ H5T__get_native_float(const H5T_t *dtype, H5T_direction_t direction, size_t *str
*/
H5T_t *f8_e4m3_dt = NULL; /* Datatype for FP8 E4M3 */
H5T_t *f8_e5m2_dt = NULL; /* Datatype for FP8 E5M2 */
H5T_t *f6_e2m3_dt = NULL; /* Datatype for FP6 E2M3 */
H5T_t *f6_e3m2_dt = NULL; /* Datatype for FP6 E3M2 */
if (NULL == (f8_e4m3_dt = H5I_object(H5T_FLOAT_F8E4M3)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (NULL == (f8_e5m2_dt = H5I_object(H5T_FLOAT_F8E5M2)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (NULL == (f6_e2m3_dt = H5I_object(H5T_FLOAT_F6E2M3)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (NULL == (f6_e3m2_dt = H5I_object(H5T_FLOAT_F6E3M2)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
if (0 == H5T_cmp(dtype, f8_e4m3_dt, false) || 0 == H5T_cmp(dtype, f8_e5m2_dt, false)) {
if (0 == H5T_cmp(dtype, f8_e4m3_dt, false) || 0 == H5T_cmp(dtype, f8_e5m2_dt, false) ||
0 == H5T_cmp(dtype, f6_e2m3_dt, false) || 0 == H5T_cmp(dtype, f6_e3m2_dt, false)) {
match = H5T_NATIVE_FLOAT_MATCH_FLOAT16;
native_size = sizeof(H5__Float16);
}
+34
View File
@@ -325,10 +325,44 @@ H5_DLLVAR hid_t H5T_IEEE_F64LE_g;
* \endparblock
*/
#define H5T_FLOAT_F8E5M2 (H5OPEN H5T_FLOAT_F8E5M2_g)
/**
* \ingroup PDTALTFLOAT
* 6-bit FP6 E2M3 (2 exponent bits, 3 mantissa bits) floating-point numbers
*
* \parblock
* \attention Implicit datatype conversion should currently be avoided when using
* this datatype for I/O operations. Incomplete handling of non-IEEE
* floating-point formats in HDF5 can cause certain FP6 E2M3 values
* to be improperly converted to Infinities or NaN values. If possible,
* an application should perform I/O with this datatype using an
* in-memory type that matches the FP6 E2M3 format and perform explicit
* data conversion outside of HDF5, if necessary. Otherwise, read/written
* values should be verified to be correct.
* \endparblock
*/
#define H5T_FLOAT_F6E2M3 (H5OPEN H5T_FLOAT_F6E2M3_g)
/**
* \ingroup PDTALTFLOAT
* 6-bit FP6 E3M2 (3 exponent bits, 2 mantissa bits) floating-point numbers
*
* \parblock
* \attention Implicit datatype conversion should currently be avoided when using
* this datatype for I/O operations. Incomplete handling of non-IEEE
* floating-point formats in HDF5 can cause certain FP6 E3M2 values
* to be improperly converted to Infinities or NaN values. If possible,
* an application should perform I/O with this datatype using an
* in-memory type that matches the FP6 E3M2 format and perform explicit
* data conversion outside of HDF5, if necessary. Otherwise, read/written
* values should be verified to be correct.
* \endparblock
*/
#define H5T_FLOAT_F6E3M2 (H5OPEN H5T_FLOAT_F6E3M2_g)
H5_DLLVAR hid_t H5T_FLOAT_BFLOAT16BE_g;
H5_DLLVAR hid_t H5T_FLOAT_BFLOAT16LE_g;
H5_DLLVAR hid_t H5T_FLOAT_F8E4M3_g;
H5_DLLVAR hid_t H5T_FLOAT_F8E5M2_g;
H5_DLLVAR hid_t H5T_FLOAT_F6E2M3_g;
H5_DLLVAR hid_t H5T_FLOAT_F6E3M2_g;
/*
* Complex number types made up of IEEE floating point types
+4
View File
@@ -1695,6 +1695,10 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
H5RS_acat(rs, "H5T_FLOAT_F8E4M3");
else if (obj == H5T_FLOAT_F8E5M2_g)
H5RS_acat(rs, "H5T_FLOAT_F8E5M2");
else if (obj == H5T_FLOAT_F6E2M3_g)
H5RS_acat(rs, "H5T_FLOAT_F6E2M3");
else if (obj == H5T_FLOAT_F6E3M2_g)
H5RS_acat(rs, "H5T_FLOAT_F6E3M2");
else if (obj == H5T_COMPLEX_IEEE_F16BE_g)
H5RS_acat(rs, "H5T_COMPLEX_IEEE_F16BE");
else if (obj == H5T_COMPLEX_IEEE_F16LE_g)
+3 -2
View File
@@ -1218,8 +1218,9 @@ test_create_dataset_predefined_types(void H5_ATTR_UNUSED *params)
H5T_STD_U64LE, H5T_STD_U64BE, H5T_STD_I64LE, H5T_STD_I64BE,
H5T_IEEE_F16LE, H5T_IEEE_F16BE, H5T_IEEE_F32LE, H5T_IEEE_F32BE,
H5T_IEEE_F64LE, H5T_IEEE_F64BE, H5T_FLOAT_BFLOAT16LE, H5T_FLOAT_BFLOAT16BE,
H5T_FLOAT_F8E4M3, H5T_FLOAT_F8E5M2, H5T_COMPLEX_IEEE_F16BE, H5T_COMPLEX_IEEE_F16LE,
H5T_COMPLEX_IEEE_F32BE, H5T_COMPLEX_IEEE_F32LE, H5T_COMPLEX_IEEE_F64BE, H5T_COMPLEX_IEEE_F64LE};
H5T_FLOAT_F8E4M3, H5T_FLOAT_F8E5M2, H5T_FLOAT_F6E2M3, H5T_FLOAT_F6E3M2,
H5T_COMPLEX_IEEE_F16BE, H5T_COMPLEX_IEEE_F16LE, H5T_COMPLEX_IEEE_F32BE, H5T_COMPLEX_IEEE_F32LE,
H5T_COMPLEX_IEEE_F64BE, H5T_COMPLEX_IEEE_F64LE};
TESTING("dataset creation with predefined datatypes");
+7 -1
View File
@@ -44,7 +44,7 @@
/* The number of predefined floating point types in HDF5
*/
#define NUM_PREDEFINED_FLOAT_TYPES 10
#define NUM_PREDEFINED_FLOAT_TYPES 12
/* The number of predefined complex number types in HDF5
*/
@@ -333,6 +333,12 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_
case 9:
type_to_copy = H5T_FLOAT_F8E5M2;
break;
case 10:
type_to_copy = H5T_FLOAT_F6E2M3;
break;
case 11:
type_to_copy = H5T_FLOAT_F6E3M2;
break;
default:
printf(" invalid value for floating point type; should not happen\n");
+422 -1
View File
@@ -77,7 +77,7 @@
static const char *FILENAME[] = {"dtypes0", "dtypes1", "dtypes2", "dtypes3", "dtypes4",
"dtypes5", "dtypes6", "dtypes7", "dtypes8", "dtypes9",
"dtypes10", "dtypes11", "dtypes12", "dtypes13", "dtypes14",
"dtypes15", "dtypes16", "dtypes17", NULL};
"dtypes15", "dtypes16", "dtypes17", "dtypes18", NULL};
#define TESTFILE "bad_compound.h5"
@@ -7587,6 +7587,426 @@ error:
return 1;
}
/*-------------------------------------------------------------------------
* Function: test_fp6
*
* Purpose: Tests the FP6 datatypes.
*
* Return: Success: 0
* Failure: number of errors
*-------------------------------------------------------------------------
*/
static int
test_fp6(void)
{
H5T_class_t type_class;
H5T_order_t type_order;
H5T_norm_t type_norm;
H5T_pad_t lsb_pad;
H5T_pad_t msb_pad;
H5T_pad_t inpad;
hsize_t dims[1];
size_t type_size;
size_t type_prec;
size_t sign_pos;
size_t expo_pos;
size_t mant_pos;
size_t expo_size;
size_t mant_size;
size_t expo_bias;
hid_t fid = H5I_INVALID_HID;
hid_t space_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dcpl_id = H5I_INVALID_HID;
char filename[256] = {0};
int type_offset;
TESTING("FP6 datatypes");
/* Check characteristics of the predefined types */
if ((type_class = H5Tget_class(H5T_FLOAT_F6E2M3)) < 0) {
H5_FAILED();
printf("Couldn't get datatype class for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (H5T_FLOAT != type_class) {
H5_FAILED();
printf("Datatype class for H5T_FLOAT_F6E2M3 wasn't H5T_FLOAT\n");
goto error;
}
if ((type_class = H5Tget_class(H5T_FLOAT_F6E3M2)) < 0) {
H5_FAILED();
printf("Couldn't get datatype class for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (H5T_FLOAT != type_class) {
H5_FAILED();
printf("Datatype class for H5T_FLOAT_F6E3M2 wasn't H5T_FLOAT\n");
goto error;
}
if ((type_size = H5Tget_size(H5T_FLOAT_F6E2M3)) == 0) {
H5_FAILED();
printf("Couldn't get datatype size for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (type_size != 1) {
H5_FAILED();
printf("Datatype size for H5T_FLOAT_F6E2M3 was incorrect (expected 1, got %zu)\n", type_size);
goto error;
}
if ((type_size = H5Tget_size(H5T_FLOAT_F6E3M2)) == 0) {
H5_FAILED();
printf("Couldn't get datatype size for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (type_size != 1) {
H5_FAILED();
printf("Datatype size for H5T_FLOAT_F6E3M2 was incorrect (expected 1, got %zu)\n", type_size);
goto error;
}
if ((type_order = H5Tget_order(H5T_FLOAT_F6E2M3)) < 0) {
H5_FAILED();
printf("Couldn't get datatype order for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (type_order != H5T_ORDER_LE) {
H5_FAILED();
printf("Datatype order for H5T_FLOAT_F6E2M3 wasn't H5T_ORDER_LE\n");
goto error;
}
if ((type_order = H5Tget_order(H5T_FLOAT_F6E3M2)) < 0) {
H5_FAILED();
printf("Couldn't get datatype order for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (type_order != H5T_ORDER_LE) {
H5_FAILED();
printf("Datatype order for H5T_FLOAT_F6E3M2 wasn't H5T_ORDER_LE\n");
goto error;
}
if ((type_prec = H5Tget_precision(H5T_FLOAT_F6E2M3)) == 0) {
H5_FAILED();
printf("Couldn't get datatype precision for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (type_prec != 6) {
H5_FAILED();
printf("Datatype precision for H5T_FLOAT_F6E2M3 was incorrect (expected 6, got %zu)\n", type_prec);
goto error;
}
if ((type_prec = H5Tget_precision(H5T_FLOAT_F6E3M2)) == 0) {
H5_FAILED();
printf("Couldn't get datatype precision for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (type_prec != 6) {
H5_FAILED();
printf("Datatype precision for H5T_FLOAT_F6E3M2 was incorrect (expected 6, got %zu)\n", type_prec);
goto error;
}
if ((type_offset = H5Tget_offset(H5T_FLOAT_F6E2M3)) < 0) {
H5_FAILED();
printf("Couldn't get datatype offset for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (type_offset != 0) {
H5_FAILED();
printf("Datatype offset for H5T_FLOAT_F6E2M3 was incorrect (expected 0, got %d)\n", type_offset);
goto error;
}
if ((type_offset = H5Tget_offset(H5T_FLOAT_F6E3M2)) < 0) {
H5_FAILED();
printf("Couldn't get datatype offset for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (type_offset != 0) {
H5_FAILED();
printf("Datatype offset for H5T_FLOAT_F6E3M2 was incorrect (expected 0, got %d)\n", type_offset);
goto error;
}
if (H5Tget_pad(H5T_FLOAT_F6E2M3, &lsb_pad, &msb_pad) < 0) {
H5_FAILED();
printf("Couldn't get datatype padding type for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (lsb_pad != H5T_PAD_ZERO || msb_pad != H5T_PAD_ZERO) {
H5_FAILED();
printf("Datatype padding type for H5T_FLOAT_F6E2M3 was incorrect (expected H5T_PAD_ZERO, got lsb pad "
"type %d, msb pad type %d)\n",
lsb_pad, msb_pad);
goto error;
}
if (H5Tget_pad(H5T_FLOAT_F6E3M2, &lsb_pad, &msb_pad) < 0) {
H5_FAILED();
printf("Couldn't get datatype padding type for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (lsb_pad != H5T_PAD_ZERO || msb_pad != H5T_PAD_ZERO) {
H5_FAILED();
printf("Datatype padding type for H5T_FLOAT_F6E3M2 was incorrect (expected H5T_PAD_ZERO, got lsb pad "
"type %d, msb pad type %d)\n",
lsb_pad, msb_pad);
goto error;
}
if (H5Tget_fields(H5T_FLOAT_F6E2M3, &sign_pos, &expo_pos, &expo_size, &mant_pos, &mant_size) < 0) {
H5_FAILED();
printf("Couldn't get floating-point bit field information for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (sign_pos != 5 || expo_pos != 3 || mant_pos != 0 || expo_size != 2 || mant_size != 3) {
H5_FAILED();
printf("H5T_FLOAT_F6E2M3 didn't match FP6 E2M3 specification "
"(expected spos=5, epos=3, esize=2, mpos=0, msize=3, "
"got spos=%zu, epos=%zu, esize=%zu, mpos=%zu, msize=%zu)\n",
sign_pos, expo_pos, expo_size, mant_pos, mant_size);
goto error;
}
if (H5Tget_fields(H5T_FLOAT_F6E3M2, &sign_pos, &expo_pos, &expo_size, &mant_pos, &mant_size) < 0) {
H5_FAILED();
printf("Couldn't get floating-point bit field information for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (sign_pos != 5 || expo_pos != 2 || mant_pos != 0 || expo_size != 3 || mant_size != 2) {
H5_FAILED();
printf("H5T_FLOAT_F6E3M2 didn't match FP6 E3M2 specification "
"(expected spos=5, epos=2, esize=3, mpos=0, msize=2, "
"got spos=%zu, epos=%zu, esize=%zu, mpos=%zu, msize=%zu)\n",
sign_pos, expo_pos, expo_size, mant_pos, mant_size);
goto error;
}
if ((expo_bias = H5Tget_ebias(H5T_FLOAT_F6E2M3)) == 0) {
H5_FAILED();
printf("Couldn't get datatype exponent bias for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (expo_bias != 1) {
H5_FAILED();
printf("Datatype exponent bias for H5T_FLOAT_F6E2M3 was incorrect (expected 1, got %zu)\n",
expo_bias);
goto error;
}
if ((expo_bias = H5Tget_ebias(H5T_FLOAT_F6E3M2)) == 0) {
H5_FAILED();
printf("Couldn't get datatype exponent bias for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (expo_bias != 3) {
H5_FAILED();
printf("Datatype exponent bias for H5T_FLOAT_F6E3M2 was incorrect (expected 3, got %zu)\n",
expo_bias);
goto error;
}
if ((type_norm = H5Tget_norm(H5T_FLOAT_F6E2M3)) < 0) {
H5_FAILED();
printf("Couldn't get datatype mantissa normalization type for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (type_norm != H5T_NORM_IMPLIED) {
H5_FAILED();
printf("Datatype mantissa normalization type for H5T_FLOAT_F6E2M3 wasn't H5T_NORM_IMPLIED\n");
goto error;
}
if ((type_norm = H5Tget_norm(H5T_FLOAT_F6E3M2)) < 0) {
H5_FAILED();
printf("Couldn't get datatype mantissa normalization type for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (type_norm != H5T_NORM_IMPLIED) {
H5_FAILED();
printf("Datatype mantissa normalization type for H5T_FLOAT_F6E3M2 wasn't H5T_NORM_IMPLIED\n");
goto error;
}
if ((inpad = H5Tget_inpad(H5T_FLOAT_F6E2M3)) < 0) {
H5_FAILED();
printf("Couldn't get datatype unused bits padding type for H5T_FLOAT_F6E2M3\n");
goto error;
}
if (inpad != H5T_PAD_ZERO) {
H5_FAILED();
printf("Datatype unused bits padding type for H5T_FLOAT_F6E2M3 was incorrect (expected H5T_PAD_ZERO, "
"got pad type %d)\n",
inpad);
goto error;
}
if ((inpad = H5Tget_inpad(H5T_FLOAT_F6E3M2)) < 0) {
H5_FAILED();
printf("Couldn't get datatype unused bits padding type for H5T_FLOAT_F6E3M2\n");
goto error;
}
if (inpad != H5T_PAD_ZERO) {
H5_FAILED();
printf("Datatype unused bits padding type for H5T_FLOAT_F6E3M2 was incorrect (expected H5T_PAD_ZERO, "
"got pad type %d)\n",
inpad);
goto error;
}
/*
* Ensure that some random conversions on the FP6 datatypes
* are currently covered by general software routines rather
* than compiler conversions.
*/
if (H5Tcompiler_conv(H5T_FLOAT_F6E2M3, H5T_IEEE_F16LE) != false) {
H5_FAILED();
printf("Conversion path for H5T_FLOAT_F6E2M3 -> H5T_IEEE_F16LE was not a software conversion\n");
goto error;
}
if (H5Tcompiler_conv(H5T_FLOAT_F6E2M3, H5T_NATIVE_INT) != false) {
H5_FAILED();
printf("Conversion path for H5T_FLOAT_F6E2M3 -> H5T_NATIVE_INT was not a software conversion\n");
goto error;
}
if (H5Tcompiler_conv(H5T_FLOAT_F6E3M2, H5T_IEEE_F16LE) != false) {
H5_FAILED();
printf("Conversion path for H5T_FLOAT_F6E3M2 -> H5T_IEEE_F16LE was not a software conversion\n");
goto error;
}
if (H5Tcompiler_conv(H5T_FLOAT_F6E3M2, H5T_NATIVE_INT) != false) {
H5_FAILED();
printf("Conversion path for H5T_FLOAT_F6E3M2 -> H5T_NATIVE_INT was not a software conversion\n");
goto error;
}
/*
* Create datasets with the FP6 datatypes and check the dataset raw data storage size
*/
h5_fixname(FILENAME[18], H5P_DEFAULT, filename, sizeof filename);
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
printf("Can't create file!\n");
goto error;
}
dims[0] = 10000;
if ((space_id = H5Screate_simple(1, dims, NULL)) < 0) {
H5_FAILED();
AT();
printf("Can't create dataspace\n");
goto error;
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
AT();
printf("Can't create DCPL\n");
goto error;
}
if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) {
H5_FAILED();
AT();
printf("Can't set alloc time\n");
goto error;
}
if ((dset_id = H5Dcreate2(fid, "DatasetE2M3", H5T_FLOAT_F6E2M3, space_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
printf("Can't create dataset\n");
goto error;
}
if (H5Dget_storage_size(dset_id) != dims[0] /* 1 byte datatype */) {
H5_FAILED();
AT();
printf("Incorrect dataset raw data storage size allocated in file\n");
goto error;
}
if (H5Dclose(dset_id) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(fid, "DatasetE3M2", H5T_FLOAT_F6E3M2, space_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
printf("Can't create dataset\n");
goto error;
}
if (H5Dget_storage_size(dset_id) != dims[0] /* 1 byte datatype */) {
H5_FAILED();
AT();
printf("Incorrect dataset raw data storage size allocated in file\n");
goto error;
}
if (H5Pclose(dcpl_id) < 0)
TEST_ERROR;
if (H5Sclose(space_id) < 0)
TEST_ERROR;
if (H5Dclose(dset_id) < 0)
TEST_ERROR;
if (H5Fclose(fid) < 0)
TEST_ERROR;
if (H5Fdelete(filename, H5P_DEFAULT) < 0)
TEST_ERROR;
PASSED();
return 0;
error:
H5E_BEGIN_TRY
{
H5Pclose(dcpl_id);
H5Sclose(space_id);
H5Dclose(dset_id);
H5Fclose(fid);
H5Fdelete(filename, H5P_DEFAULT);
}
H5E_END_TRY
return 1;
}
/*-------------------------------------------------------------------------
* Function: test_complex_type
*
@@ -13788,6 +14208,7 @@ main(void)
nerrors += test__Float16();
nerrors += test_bfloat16();
nerrors += test_fp8();
nerrors += test_fp6();
nerrors += test_complex_type();
#ifdef H5_HAVE_COMPLEX_NUMBERS
nerrors += test_complex_type_conv_funcs();
+88 -3
View File
@@ -3218,13 +3218,13 @@ test_fp8(void)
{
hid_t native_type = H5I_INVALID_HID;
TESTING("fp8 datatypes");
TESTING("FP8 datatypes");
/*
* Just ensure that the fp8 types are currently promoted
* Just ensure that the FP8 types are currently promoted
* to either float16 or float, depending on whether float16
* support is enabled. Until native support is added for a
* fp8 type, conversion from fp8 to float16 should be fine.
* FP8 type, conversion from FP8 to float16 should be fine.
*/
if ((native_type = H5Tget_native_type(H5T_FLOAT_F8E4M3, H5T_DIR_ASCEND)) < 0)
TEST_ERROR;
@@ -3296,6 +3296,90 @@ error:
return -1;
}
static herr_t
test_fp6(void)
{
hid_t native_type = H5I_INVALID_HID;
TESTING("FP6 datatypes");
/*
* Just ensure that the FP6 types are currently promoted
* to either float16 or float, depending on whether float16
* support is enabled. Until native support is added for a
* FP6 type, conversion from FP6 to float16 should be fine.
*/
if ((native_type = H5Tget_native_type(H5T_FLOAT_F6E2M3, H5T_DIR_ASCEND)) < 0)
TEST_ERROR;
#ifdef H5_HAVE__FLOAT16
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT16))
TEST_ERROR;
#else
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT))
TEST_ERROR;
#endif
if (H5Tclose(native_type) < 0)
TEST_ERROR;
if ((native_type = H5Tget_native_type(H5T_FLOAT_F6E2M3, H5T_DIR_DESCEND)) < 0)
TEST_ERROR;
#ifdef H5_HAVE__FLOAT16
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT16))
TEST_ERROR;
#else
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT))
TEST_ERROR;
#endif
if (H5Tclose(native_type) < 0)
TEST_ERROR;
if ((native_type = H5Tget_native_type(H5T_FLOAT_F6E3M2, H5T_DIR_ASCEND)) < 0)
TEST_ERROR;
#ifdef H5_HAVE__FLOAT16
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT16))
TEST_ERROR;
#else
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT))
TEST_ERROR;
#endif
if (H5Tclose(native_type) < 0)
TEST_ERROR;
if ((native_type = H5Tget_native_type(H5T_FLOAT_F6E3M2, H5T_DIR_DESCEND)) < 0)
TEST_ERROR;
#ifdef H5_HAVE__FLOAT16
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT16))
TEST_ERROR;
#else
if (true != H5Tequal(native_type, H5T_NATIVE_FLOAT))
TEST_ERROR;
#endif
if (H5Tclose(native_type) < 0)
TEST_ERROR;
PASSED();
return 0;
error:
H5E_BEGIN_TRY
{
H5Tclose(native_type);
}
H5E_END_TRY
return -1;
}
#ifdef H5_HAVE_COMPLEX_NUMBERS
static herr_t
test_complex(hid_t file)
@@ -3476,6 +3560,7 @@ main(void)
nerrors += test_bfloat16() < 0 ? 1 : 0;
nerrors += test_fp8() < 0 ? 1 : 0;
nerrors += test_fp6() < 0 ? 1 : 0;
#ifdef H5_HAVE_COMPLEX_NUMBERS
nerrors += test_complex(file) < 0 ? 1 : 0;
+4
View File
@@ -140,6 +140,10 @@ print_type(hid_t type)
parallel_print("H5T_FLOAT_F8E4M3");
else if (H5Tequal(type, H5T_FLOAT_F8E5M2))
parallel_print("H5T_FLOAT_F8E5M2");
else if (H5Tequal(type, H5T_FLOAT_F6E2M3))
parallel_print("H5T_FLOAT_F6E2M3");
else if (H5Tequal(type, H5T_FLOAT_F6E3M2))
parallel_print("H5T_FLOAT_F6E3M2");
#ifdef H5_HAVE__FLOAT16
else if (H5Tequal(type, H5T_NATIVE_FLOAT16))
parallel_print("H5T_NATIVE_FLOAT16");
+4
View File
@@ -2216,6 +2216,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, "H5T_FLOAT_F8E4M3");
else if (H5Tequal(type, H5T_FLOAT_F8E5M2) == true)
h5tools_str_append(buffer, "H5T_FLOAT_F8E5M2");
else if (H5Tequal(type, H5T_FLOAT_F6E2M3) == true)
h5tools_str_append(buffer, "H5T_FLOAT_F6E2M3");
else if (H5Tequal(type, H5T_FLOAT_F6E3M2) == true)
h5tools_str_append(buffer, "H5T_FLOAT_F6E3M2");
else if (H5Tequal(type, H5T_VAX_F32) == true)
h5tools_str_append(buffer, "H5T_VAX_F32");
else if (H5Tequal(type, H5T_VAX_F64) == true)
+16
View File
@@ -60,6 +60,10 @@ h5tools_get_little_endian_type(hid_t tid)
p_type = H5Tcopy(H5T_FLOAT_F8E4M3);
else if (true == H5Tequal(tid, H5T_FLOAT_F8E5M2))
p_type = H5Tcopy(H5T_FLOAT_F8E5M2);
else if (true == H5Tequal(tid, H5T_FLOAT_F6E2M3))
p_type = H5Tcopy(H5T_FLOAT_F6E2M3);
else if (true == H5Tequal(tid, H5T_FLOAT_F6E3M2))
p_type = H5Tcopy(H5T_FLOAT_F6E3M2);
}
else if (size == 2) {
if (true == H5Tequal(tid, H5T_IEEE_F16LE) || true == H5Tequal(tid, H5T_IEEE_F16BE))
@@ -166,6 +170,18 @@ h5tools_get_big_endian_type(hid_t tid)
else if (true == H5Tequal(tid, H5T_FLOAT_F8E5M2)) {
p_type = H5Tcopy(H5T_FLOAT_F8E5M2);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
else if (true == H5Tequal(tid, H5T_FLOAT_F6E2M3)) {
p_type = H5Tcopy(H5T_FLOAT_F6E2M3);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
else if (true == H5Tequal(tid, H5T_FLOAT_F6E3M2)) {
p_type = H5Tcopy(H5T_FLOAT_F6E3M2);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
+93 -2
View File
@@ -3325,6 +3325,48 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
else if (!strcmp(buffer, "H5T_FLOAT_F6E2M3")) {
in->inputSize = 6;
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("FLOAT")) == -1) {
(void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
(void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
}
else if (!strcmp(buffer, "H5T_FLOAT_F6E3M2")) {
in->inputSize = 6;
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("FLOAT")) == -1) {
(void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
(void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
}
else if (!strcmp(buffer, "H5T_VAX_F32")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -4182,12 +4224,39 @@ createOutputDataType(struct Input *in)
case 8:
switch (in->outputSize) {
case 6:
/*
* NOTE: h5import does not currently have a way to specify
* which FP6 format to use for output. E3M2 is arbitrarily
* chosen here, but this can be problematic for data that
* is intended to be in another format, such as the E2M3
* format.
*/
switch (in->outputByteOrder) {
case -1:
case 0:
new_type = H5Tcopy(H5T_FLOAT_F6E3M2);
/* Though not very useful, set order to BE as expected */
H5Tset_order(new_type, H5T_ORDER_BE);
break;
case 1:
new_type = H5Tcopy(H5T_FLOAT_F6E3M2);
break;
default:
(void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 8:
/*
* NOTE: h5import does not currently have a way to specify
* which FP8 format to use for output. E4M3 is arbitrarily
* chosen here, but this can be problematic for data that
* is intended to be in the E5M2 format.
* is intended to be in another format, such as the E5M2
* format.
*/
switch (in->outputByteOrder) {
case -1:
@@ -4610,12 +4679,34 @@ createInputDataType(struct Input *in)
case 8:
switch (in->inputSize) {
case 6:
/*
* NOTE: h5import does not currently have a way to specify
* which FP6 format to use for output. E3M2 is arbitrarily
* chosen here, but this can be problematic for data that
* is intended to be in another format, such as the E2M3
* format.
*/
switch (in->outputByteOrder) {
case -1:
case 0:
case 1:
new_type = H5Tcopy(H5T_FLOAT_F6E3M2);
break;
default:
(void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 8:
/*
* NOTE: h5import does not currently have a way to specify
* which FP8 format to use for input. E4M3 is arbitrarily
* chosen here, but this can be problematic for data that
* is intended to be in the E5M2 format.
* is intended to be in another format, such as the E5M2
* format.
*/
switch (in->inputByteOrder) {
case -1:
+6
View File
@@ -611,6 +611,12 @@ print_specific_float_type(h5tools_str_t *buffer, hid_t type, int ind)
else if (H5Tequal(type, H5T_FLOAT_F8E5M2) == true) {
h5tools_str_append(buffer, "FP8 E5M2 8-bit float");
}
else if (H5Tequal(type, H5T_FLOAT_F6E2M3) == true) {
h5tools_str_append(buffer, "FP6 E2M3 6-bit float");
}
else if (H5Tequal(type, H5T_FLOAT_F6E3M2) == true) {
h5tools_str_append(buffer, "FP6 E3M2 6-bit float");
}
else {
return print_float_type(buffer, type, ind);
}
+13
View File
@@ -119,6 +119,7 @@ set (HDF5_REFERENCE_FILES
tfill.ddl
tfletcher32.ddl
tfloatsattrs.ddl
tfloat6.ddl
tfloat8.ddl
tfloat16.ddl
tfloat16_be.ddl
@@ -314,6 +315,7 @@ set (HDF5_REFERENCE_TEST_FILES
tfcontents2.h5
tfilters.h5
tfloatsattrs.h5
tfloat6.h5
tfloat8.h5
tfloat16.h5
tfloat16_be.h5
@@ -1327,6 +1329,17 @@ ADD_H5_TEST (tfloat8 RESULT_CODE 0 --enable-error-stack -A 0 -d /DS8BITSE4M3
-d /DS8BITSE5M2_ALLVALS --start="0,0" --stride="1,1" --count="15,1" --block="1,16"
-d /DS8BITSE5M2_ALLVALS_CONVERT TARGET_FILE tfloat8.h5)
# Add test for FP6 types - To avoid printing out of some values that are, or are currently
# interpreted as, NaN values, subsetting is used on specific datasets and printing out of
# attributes is currently disabled. The output format of NaN values is implementation-dependent
# and can vary across platforms, causing output file diffing failures. This should be
# adjusted once HDF5 can properly support non-IEEE floating-point formats.
ADD_H5_TEST (tfloat6 RESULT_CODE 0 --enable-error-stack -A 0 -d /DS6BITSE2M3
-d /DS6BITSE2M3_ALLVALS --start="0,0" --stride="1,1" --count="7,1" --block="1,8"
-d /DS6BITSE2M3_ALLVALS_CONVERT -d /DS6BITSE3M2
-d /DS6BITSE3M2_ALLVALS --start="0,0" --stride="1,1" --count="7,1" --block="1,8"
-d /DS6BITSE3M2_ALLVALS_CONVERT TARGET_FILE tfloat6.h5)
# Add tests for complex numbers. For portability, use a fixed floating-point
# precision and skip dumping of the "long double _Complex" dataset. The "long
# double _Complex" dataset may display differently across platforms, e.g.
+104
View File
@@ -0,0 +1,104 @@
HDF5 "tfloat6.h5" {
DATASET "/DS6BITSE2M3" {
DATATYPE H5T_FLOAT_F6E2M3
DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
DATA {
(0,0): inf, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, inf, inf, inf, inf, inf, inf,
(0,14): inf, inf,
(1,0): inf, 0.625, 1.125, 1.625, 2, 2.5, 3, 3.5, inf, inf, inf, inf, inf,
(1,13): inf, inf, inf,
(2,0): inf, 0.625, 1.125, 1.625, 2.25, 2.75, 3.25, 3.75, inf, inf, inf,
(2,11): inf, inf, inf, inf, inf,
(3,0): inf, 0.75, 1.25, 1.75, 2.25, 2.75, 3.25, 3.75, inf, inf, inf, inf,
(3,12): inf, inf, inf, inf,
(4,0): inf, 0.75, 1.25, 1.75, 2.25, 2.75, 3.25, 3.75, inf, inf, inf, inf,
(4,12): inf, inf, inf, inf,
(5,0): inf, 0.875, 1.375, 1.875, 2.25, 2.75, 3.25, 3.75, inf, inf, inf,
(5,11): inf, inf, inf, inf, inf,
(6,0): inf, 0.875, 1.375, 1.875, 2.5, 3, 3.5, 3.75, inf, inf, inf, inf,
(6,12): inf, inf, inf, inf,
(7,0): inf, 0.5, 1.5, 2, 2.5, 3, 3.5, 3.75, inf, inf, inf, inf, inf, inf,
(7,14): inf, inf
}
}
DATASET "/DS6BITSE2M3_ALLVALS" {
DATATYPE H5T_FLOAT_F6E2M3
DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
SUBSET {
START ( 0, 0 );
STRIDE ( 1, 1 );
COUNT ( 7, 1 );
BLOCK ( 1, 8 );
DATA {
(0,0): 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875,
(1,0): 1, 1.125, 1.25, 1.375, 1.5, 1.625, 1.75, 1.875,
(2,0): 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75,
(3,0): inf, nan, nan, nan, nan, nan, nan, nan,
(4,0): -0, -0.125, -0.25, -0.375, -0.5, -0.625, -0.75, -0.875,
(5,0): -1, -1.125, -1.25, -1.375, -1.5, -1.625, -1.75, -1.875,
(6,0): -2, -2.25, -2.5, -2.75, -3, -3.25, -3.5, -3.75
}
}
}
DATASET "/DS6BITSE2M3_ALLVALS_CONVERT" {
DATATYPE H5T_FLOAT_F6E2M3
DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
DATA {
(0,0): 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875,
(1,0): 1, 1.125, 1.25, 1.375, 1.5, 1.625, 1.75, 1.875,
(2,0): 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75,
(3,0): inf, inf, inf, inf, inf, inf, inf, inf,
(4,0): -0, -0.125, -0.25, -0.375, -0.5, -0.625, -0.75, -0.875,
(5,0): -1, -1.125, -1.25, -1.375, -1.5, -1.625, -1.75, -1.875,
(6,0): -2, -2.25, -2.5, -2.75, -3, -3.25, -3.5, -3.75,
(7,0): -inf, -inf, -inf, -inf, -inf, -inf, -inf, -inf
}
}
DATASET "/DS6BITSE3M2" {
DATATYPE H5T_FLOAT_F6E3M2
DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
DATA {
(0,0): inf, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 5, 6, 6, 7, 7, 8,
(1,0): 14, 0.625, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 5, 6, 6, 7, 7, 8,
(2,0): 14, 0.625, 1.25, 1.75, 2, 2.5, 3, 3.5, 4, 5, 5, 6, 6, 7, 7, 8,
(3,0): 14, 0.75, 1.25, 1.75, 2, 2.5, 3, 3.5, 4, 5, 5, 6, 6, 7, 7, 8,
(4,0): 12, 0.75, 1.25, 1.75, 2.5, 3, 3.5, 4, 4, 5, 5, 6, 6, 7, 7, 8,
(5,0): 12, 0.875, 1.25, 1.75, 2.5, 3, 3.5, 4, 4, 5, 5, 6, 6, 7, 7, 8,
(6,0): 10, 0.875, 1.5, 2, 2.5, 3, 3.5, 4, 4, 5, 5, 6, 6, 7, 7, 8,
(7,0): 10, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4, 5, 5, 6, 6, 7, 7, 8
}
}
DATASET "/DS6BITSE3M2_ALLVALS" {
DATATYPE H5T_FLOAT_F6E3M2
DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
SUBSET {
START ( 0, 0 );
STRIDE ( 1, 1 );
COUNT ( 7, 1 );
BLOCK ( 1, 8 );
DATA {
(0,0): 0, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375,
(1,0): 0.5, 0.625, 0.75, 0.875, 1, 1.25, 1.5, 1.75,
(2,0): 2, 2.5, 3, 3.5, 4, 5, 6, 7,
(3,0): 8, 10, 12, 14, inf, nan, nan, nan,
(4,0): -0, -0.0625, -0.125, -0.1875, -0.25, -0.3125, -0.375, -0.4375,
(5,0): -0.5, -0.625, -0.75, -0.875, -1, -1.25, -1.5, -1.75,
(6,0): -2, -2.5, -3, -3.5, -4, -5, -6, -7
}
}
}
DATASET "/DS6BITSE3M2_ALLVALS_CONVERT" {
DATATYPE H5T_FLOAT_F6E3M2
DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
DATA {
(0,0): 0, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375,
(1,0): 0.5, 0.625, 0.75, 0.875, 1, 1.25, 1.5, 1.75,
(2,0): 2, 2.5, 3, 3.5, 4, 5, 6, 7,
(3,0): 8, 10, 12, 14, inf, inf, inf, inf,
(4,0): -0, -0.0625, -0.125, -0.1875, -0.25, -0.3125, -0.375, -0.4375,
(5,0): -0.5, -0.625, -0.75, -0.875, -1, -1.25, -1.5, -1.75,
(6,0): -2, -2.5, -3, -3.5, -4, -5, -6, -7,
(7,0): -8, -10, -12, -14, -inf, -inf, -inf, -inf
}
}
}
+264
View File
@@ -133,6 +133,7 @@
#define FILE108 "trefer_reg_1d.h5"
#define FILE109 "tvms.h5"
#define FILE110 "tfloat8.h5"
#define FILE111 "tfloat6.h5"
#define ONION_TEST_FIXNAME_SIZE 1024
#define ONION_TEST_PAGE_SIZE (uint32_t)32
@@ -463,6 +464,16 @@ typedef struct s1_t {
#define F110_DATASET5 "DS8BITSE4M3_ALLVALS_CONVERT"
#define F110_DATASET6 "DS8BITSE5M2_ALLVALS_CONVERT"
/* "FILE111" macros */
#define F111_XDIM 8
#define F111_YDIM 16
#define F111_DATASET "DS6BITSE2M3"
#define F111_DATASET2 "DS6BITSE3M2"
#define F111_DATASET3 "DS6BITSE2M3_ALLVALS"
#define F111_DATASET4 "DS6BITSE3M2_ALLVALS"
#define F111_DATASET5 "DS6BITSE2M3_ALLVALS_CONVERT"
#define F111_DATASET6 "DS6BITSE3M2_ALLVALS_CONVERT"
/* Since there are only 256 FP8 values, it's simple enough to
* list them all here for reference when checking to make sure
* the datatypes are represented correctly.
@@ -541,6 +552,27 @@ static float fp8_e5m2_vals[256] = {
0.0f, 0.0f /* 3 NaN values, ignore with 0.0f */
};
/* Since there are only 64 FP6 values, it's simple enough to
* list them all here for reference when checking to make sure
* the datatypes are represented correctly.
*/
static float fp6_e2m3_vals[64] = {
0.0f, 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.75f, 0.875f, 1.0f, 1.125f, 1.25f,
1.375f, 1.5f, 1.625f, 1.75f, 1.875f, 2.0f, 2.25f, 2.5f, 2.75f, 3.0f, 3.25f,
3.5f, 3.75f, 4.0f, 4.5f, 5.0f, 5.5f, 6.0f, 6.5f, 7.0f, 7.5f, -0.0f,
-0.125f, -0.25f, -0.375f, -0.5f, -0.625f, -0.75f, -0.875f, -1.0f, -1.125f, -1.25f, -1.375f,
-1.5f, -1.625f, -1.75f, -1.875f, -2.0f, -2.25f, -2.5f, -2.75f, -3.0f, -3.25f, -3.5f,
-3.75f, -4.0f, -4.5f, -5.0f, -5.5f, -6.0f, -6.5f, -7.0f, -7.5f};
static float fp6_e3m2_vals[64] = {
0.0f, 0.0625f, 0.125f, 0.1875f, 0.25f, 0.3125f, 0.375f, 0.4375f, 0.5f, 0.625f, 0.75f,
0.875f, 1.0f, 1.25f, 1.5f, 1.75f, 2.0f, 2.5f, 3.0f, 3.5f, 4.0f, 5.0f,
6.0f, 7.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 20.0f, 24.0f, 28.0f, -0.0f,
-0.0625f, -0.125f, -0.1875f, -0.25f, -0.3125f, -0.375f, -0.4375f, -0.5f, -0.625f, -0.75f, -0.875f,
-1.0f, -1.25f, -1.5f, -1.75f, -2.0f, -2.5f, -3.0f, -3.5f, -4.0f, -5.0f, -6.0f,
-7.0f, -8.0f, -10.0f, -12.0f, -14.0f, -16.0f, -20.0f, -24.0f, -28.0f,
};
void
gent_group(void)
{
@@ -14735,3 +14767,235 @@ error:
}
H5E_END_TRY;
}
void
gent_float6(void)
{
hsize_t dims[2], adims[1];
hid_t fid = H5I_INVALID_HID;
hid_t attr = H5I_INVALID_HID;
hid_t dataset = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
hid_t aspace = H5I_INVALID_HID;
/*
* Just use float as the in-memory type for the standard
* datasets for now, until wide support for a native FP6
* type is available. Note that this will cause several of
* the values to be rounded by the library's datatype
* conversion process due to the mantissa size of float
* being larger than that of the FP6 types. But this is not
* particularly interesting test data anyway and is mostly
* just meant to check that something is not very obviously
* wrong with the data after float values which can't be
* represented in FP6 are converted into values that can
* be. The more interesting parts of the file generated
* here are whether or not the datatype displays correctly
* and whether the datasets which contain all the possible
* FP6 values display correctly. Other tests ensure that the
* FP6 types are in the correct format.
*/
struct {
float arr[F111_XDIM][F111_YDIM];
} *dset6;
float *aset6 = NULL;
float val;
uint8_t all_vals_buf[64];
dset6 = malloc(sizeof(*dset6));
aset6 = calloc(F111_XDIM * F111_YDIM, sizeof(float));
fid = H5Fcreate(FILE111, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
dims[0] = F111_XDIM;
dims[1] = F111_YDIM;
space = H5Screate_simple(2, dims, NULL);
adims[0] = F111_XDIM * F111_YDIM;
aspace = H5Screate_simple(1, adims, NULL);
val = (float)F111_YDIM;
for (size_t i = 0; i < dims[0]; i++) {
dset6->arr[i][0] = val;
aset6[i * dims[1]] = dset6->arr[i][0];
for (size_t j = 1; j < dims[1]; j++) {
dset6->arr[i][j] = (float)(j * dims[0] + i) / (float)F111_YDIM;
aset6[i * dims[1] + j] = dset6->arr[i][j];
}
val -= (float)1;
}
/* Populate all_vals_buf with every FP6 number. Note
* that uint8_t is used for the buffer here since we
* don't currently have support for an FP6 type to
* use and there are currently conversion issues when
* converting larger types to the FP6 types. Writing
* a uint8_t buffer allows bypassing the datatype
* conversion process.
*/
all_vals_buf[0] = 0;
for (size_t i = 1; i < 64; i++)
all_vals_buf[i] = all_vals_buf[i - 1] + 1;
/* Dataset of 6-bit FP6 E2M3 */
dataset = H5Dcreate2(fid, F111_DATASET, H5T_FLOAT_F6E2M3, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset6);
/* Attribute of 6-bit FP6 E2M3 */
attr = H5Acreate2(dataset, F111_DATASET, H5T_FLOAT_F6E2M3, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_FLOAT, aset6);
H5Aclose(attr);
H5Dclose(dataset);
/* Dataset of 6-bit FP6 E3M2 */
dataset = H5Dcreate2(fid, F111_DATASET2, H5T_FLOAT_F6E3M2, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset6);
/* Attribute of 6-bit FP6 E3M2 */
attr = H5Acreate2(dataset, F111_DATASET2, H5T_FLOAT_F6E3M2, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_FLOAT, aset6);
H5Aclose(attr);
H5Dclose(dataset);
H5Sclose(aspace);
H5Sclose(space);
dims[0] = 8;
dims[1] = 8;
space = H5Screate_simple(2, dims, NULL);
adims[0] = 64;
aspace = H5Screate_simple(1, adims, NULL);
/* Dataset of 6-bit FP6 E2M3 with all values written without datatype conversion.
* This dataset will have the correct data in the file, but will currently display
* incorrectly. The library converts the data into a native type, either float16 or
* float, on read, but the E2M3 format doesn't follow the IEEE standard. This causes
* the library to interpret certain values as infinities or NaNs when the format has
* no infinities or NaNs.
*/
dataset = H5Dcreate2(fid, F111_DATASET3, H5T_FLOAT_F6E2M3, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_FLOAT_F6E2M3, H5S_ALL, H5S_ALL, H5P_DEFAULT, all_vals_buf);
/* Attribute of 6-bit FP6 E2M3 with all values written without datatype conversion.
* This attribute will have the correct data in the file, but will currently display
* incorrectly. The library converts the data into a native type, either float16 or
* float, on read, but the E2M3 format doesn't follow the IEEE standard. This causes
* the library to interpret certain values as infinities or NaNs when the format has
* no infinities or NaNs.
*/
attr = H5Acreate2(dataset, F111_DATASET3, H5T_FLOAT_F6E2M3, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_FLOAT_F6E2M3, all_vals_buf);
H5Aclose(attr);
H5Dclose(dataset);
/* Dataset of 6-bit FP6 E3M2 with all values written without datatype conversion.
* This dataset will have the correct data in the file, but will currently display
* incorrectly. The library converts the data into a native type, either float16 or
* float, on read, but the E3M2 format doesn't follow the IEEE standard. This causes
* the library to interpret certain values as infinities or NaNs when the format has
* no infinities or NaNs.
*/
dataset = H5Dcreate2(fid, F111_DATASET4, H5T_FLOAT_F6E3M2, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_FLOAT_F6E3M2, H5S_ALL, H5S_ALL, H5P_DEFAULT, all_vals_buf);
/* Attribute of 6-bit FP6 E3M2 with all values written without datatype conversion.
* This attribute will have the correct data in the file, but will currently display
* incorrectly. The library converts the data into a native type, either float16 or
* float, on read, but the E3M2 format doesn't follow the IEEE standard. This causes
* the library to interpret certain values as infinities or NaNs when the format has
* no infinities or NaNs.
*/
attr = H5Acreate2(dataset, F111_DATASET4, H5T_FLOAT_F6E3M2, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_FLOAT_F6E3M2, all_vals_buf);
H5Aclose(attr);
H5Dclose(dataset);
/* Dataset of 6-bit FP6 E2M3 with all values written with datatype conversion from
* float. This dataset will currently have incorrect data in the file. Some of the
* smaller values appear to be incorrectly rounded by the library, while some of the
* larger values get converted to infinities by the datatype conversion process due
* to the fact that the E2M3 format doesn't follow the IEEE standard. While bit
* patterns that have all exponent bits set are normal values in the E2M3 format,
* these are interpreted by the library as infinities according to the IEEE standard
* and are converted into infinities in the file.
*/
dataset = H5Dcreate2(fid, F111_DATASET5, H5T_FLOAT_F6E2M3, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fp6_e2m3_vals);
/* Attribute of 6-bit FP6 E2M3 with all values written with datatype conversion from
* float. This attribute will currently have incorrect data in the file. Some of the
* smaller values appear to be incorrectly rounded by the library, while some of the
* larger values get converted to infinities by the datatype conversion process due
* to the fact that the E2M3 format doesn't follow the IEEE standard. While bit
* patterns that have all exponent bits set are normal values in the E2M3 format,
* these are interpreted by the library as infinities according to the IEEE standard
* and are converted into infinities in the file.
*/
attr = H5Acreate2(dataset, F111_DATASET5, H5T_FLOAT_F6E2M3, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_FLOAT, fp6_e2m3_vals);
H5Aclose(attr);
H5Dclose(dataset);
/* Dataset of 6-bit FP6 E3M2 with all values written with datatype conversion from
* float. This dataset will currently have incorrect data in the file. Some of the
* smaller values appear to be incorrectly rounded by the library, while some of the
* larger values get converted to infinities by the datatype conversion process due
* to the fact that the E3M2 format doesn't follow the IEEE standard. While bit
* patterns that have all exponent bits set are normal values in the E3M2 format,
* these are interpreted by the library as infinities according to the IEEE standard
* and are converted into infinities in the file.
*/
dataset = H5Dcreate2(fid, F111_DATASET6, H5T_FLOAT_F6E3M2, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fp6_e3m2_vals);
/* Attribute of 6-bit FP6 E3M2 with all values written with datatype conversion from
* float. This attribute will currently have incorrect data in the file. Some of the
* smaller values appear to be incorrectly rounded by the library, while some of the
* larger values get converted to infinities by the datatype conversion process due
* to the fact that the E3M2 format doesn't follow the IEEE standard. While bit
* patterns that have all exponent bits set are normal values in the E3M2 format,
* these are interpreted by the library as infinities according to the IEEE standard
* and are converted into infinities in the file.
*/
attr = H5Acreate2(dataset, F111_DATASET6, H5T_FLOAT_F6E3M2, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_FLOAT, fp6_e3m2_vals);
H5Aclose(attr);
H5Dclose(dataset);
error:
free(aset6);
free(dset6);
H5E_BEGIN_TRY
{
H5Aclose(attr);
H5Sclose(aspace);
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
}
H5E_END_TRY;
}
+1
View File
@@ -129,6 +129,7 @@ void gent_bfloat16(void);
void gent_bfloat16_be(void);
void gent_float8(void);
void gent_float6(void);
void gent_trefer_attr(void);
void gent_tattr4_be(void);
+1
View File
@@ -268,6 +268,7 @@ gen_h5dump_files(void)
gent_bfloat16_be();
gent_float8();
gent_float6();
gent_trefer_attr();
gent_tattr4_be();
+5
View File
@@ -41,6 +41,7 @@ set (LIST_HDF5_TEST_FILES
textlink.h5
textlinksrc.h5
textlinktar.h5
tfloat6.h5
tfloat8.h5
tfloat16.h5
tfloat16_be.h5
@@ -101,6 +102,7 @@ set (LIST_OTHER_TEST_FILES
textlinksrc-7-old.ls
textlinksrc-nodangle-1.ls
textlinksrc-nodangle-2.ls
tfloat6.ls
tfloat8.ls
tfloat16.ls
tfloat16_nosupport.ls
@@ -510,6 +512,9 @@ ADD_H5_TEST (tbfloat16_be RESULT_CODE 0 -w80 -v tbfloat16_be.h5)
# test for FP8 types
ADD_H5_TEST (tfloat8 RESULT_CODE 0 -w80 -v tfloat8.h5)
# test for FP6 types
ADD_H5_TEST (tfloat6 RESULT_CODE 0 -w80 -v tfloat6.h5)
# tests for complex numbers
if (${${HDF_PREFIX}_HAVE_COMPLEX_NUMBERS})
# If support is available for complex numbers, the second test
+43
View File
@@ -0,0 +1,43 @@
Opened "tfloat6.h5" with sec2 driver.
DS6BITSE2M3 Dataset {8/8, 16/16}
Attribute: DS6BITSE2M3 {128}
Type: FP6 E2M3 6-bit float
Location: 1:800
Links: 1
Storage: 128 logical bytes, 128 allocated bytes, 100.00% utilization
Type: FP6 E2M3 6-bit float
DS6BITSE2M3_ALLVALS Dataset {8/8, 8/8}
Attribute: DS6BITSE2M3_ALLVALS {64}
Type: FP6 E2M3 6-bit float
Location: 1:4096
Links: 1
Storage: 64 logical bytes, 64 allocated bytes, 100.00% utilization
Type: FP6 E2M3 6-bit float
DS6BITSE2M3_ALLVALS_CONVERT Dataset {8/8, 8/8}
Attribute: DS6BITSE2M3_ALLVALS_CONVERT {64}
Type: FP6 E2M3 6-bit float
Location: 1:4720
Links: 1
Storage: 64 logical bytes, 64 allocated bytes, 100.00% utilization
Type: FP6 E2M3 6-bit float
DS6BITSE3M2 Dataset {8/8, 16/16}
Attribute: DS6BITSE3M2 {128}
Type: FP6 E3M2 6-bit float
Location: 1:1608
Links: 1
Storage: 128 logical bytes, 128 allocated bytes, 100.00% utilization
Type: FP6 E3M2 6-bit float
DS6BITSE3M2_ALLVALS Dataset {8/8, 8/8}
Attribute: DS6BITSE3M2_ALLVALS {64}
Type: FP6 E3M2 6-bit float
Location: 1:4408
Links: 1
Storage: 64 logical bytes, 64 allocated bytes, 100.00% utilization
Type: FP6 E3M2 6-bit float
DS6BITSE3M2_ALLVALS_CONVERT Dataset {8/8, 8/8}
Attribute: DS6BITSE3M2_ALLVALS_CONVERT {64}
Type: FP6 E3M2 6-bit float
Location: 1:5328
Links: 1
Storage: 64 logical bytes, 64 allocated bytes, 100.00% utilization
Type: FP6 E3M2 6-bit float
Binary file not shown.