Add predefined datatype for FP4 format (#6122)

Adds predefined datatype for FP4 data in E2M1 format

Does not add support for any native FP4 types; datatype conversions are performed in software
This commit is contained in:
jhendersonHDF
2025-12-31 11:44:08 -06:00
committed by GitHub
parent 1ba82a0a75
commit d1efeba7be
40 changed files with 1564 additions and 777 deletions
+4
View File
@@ -158,6 +158,7 @@ PredType *PredType::FLOAT_F8E4M3_;
PredType *PredType::FLOAT_F8E5M2_;
PredType *PredType::FLOAT_F6E2M3_;
PredType *PredType::FLOAT_F6E3M2_;
PredType *PredType::FLOAT_F4E2M1_;
PredType *PredType::UNIX_D32BE_;
PredType *PredType::UNIX_D32LE_;
@@ -352,6 +353,7 @@ PredType::makePredTypes()
FLOAT_F8E5M2_ = new PredType(H5T_FLOAT_F8E5M2);
FLOAT_F6E2M3_ = new PredType(H5T_FLOAT_F6E2M3);
FLOAT_F6E3M2_ = new PredType(H5T_FLOAT_F6E3M2);
FLOAT_F4E2M1_ = new PredType(H5T_FLOAT_F4E2M1);
UNIX_D32BE_ = new PredType(H5T_UNIX_D32BE);
UNIX_D32LE_ = new PredType(H5T_UNIX_D32LE);
@@ -512,6 +514,7 @@ PredType::deleteConstants()
delete FLOAT_F8E5M2_;
delete FLOAT_F6E2M3_;
delete FLOAT_F6E3M2_;
delete FLOAT_F4E2M1_;
delete UNIX_D32BE_;
delete UNIX_D32LE_;
@@ -676,6 +679,7 @@ 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::FLOAT_F4E2M1 = *FLOAT_F4E2M1_;
const PredType &PredType::UNIX_D32BE = *UNIX_D32BE_;
const PredType &PredType::UNIX_D32LE = *UNIX_D32LE_;
+2
View File
@@ -98,6 +98,7 @@ class H5CPP_DLL PredType : public AtomType {
static const PredType &FLOAT_F8E5M2;
static const PredType &FLOAT_F6E2M3;
static const PredType &FLOAT_F6E3M2;
static const PredType &FLOAT_F4E2M1;
static const PredType &UNIX_D32BE;
static const PredType &UNIX_D32LE;
@@ -275,6 +276,7 @@ class H5CPP_DLL PredType : public AtomType {
static PredType *FLOAT_F8E5M2_;
static PredType *FLOAT_F6E2M3_;
static PredType *FLOAT_F6E3M2_;
static PredType *FLOAT_F4E2M1_;
static PredType *UNIX_D32BE_;
static PredType *UNIX_D32LE_;
+3 -2
View File
@@ -102,8 +102,9 @@ This section contains a brief explanation of the symbols used in the DDL.
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
H5T_FLOAT_F4E2M1 | H5T_NATIVE_FLOAT16 |
H5T_NATIVE_FLOAT | H5T_NATIVE_DOUBLE |
H5T_NATIVE_LDOUBLE
<time> ::= H5T_TIME: not yet implemented
@@ -66,6 +66,10 @@
<td>#H5T_FLOAT_F6E3M2</td>
<td>6-bit FP6 E3M2 (3 exponent bits, 2 mantissa bits) floating point</td>
</tr>
<tr>
<td>#H5T_FLOAT_F4E2M1</td>
<td>4-bit FP4 E2M1 (2 exponent bits, 1 mantissa bit) floating point</td>
</tr>
</table>
//! [predefined_alt_float_datatypes_table]
*
+2
View File
@@ -261,6 +261,8 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
return ret_value;
if ((floatingtypes[11] = (hid_t_f)H5Tcopy(H5T_FLOAT_F6E3M2)) < 0)
return ret_value;
if ((floatingtypes[12] = (hid_t_f)H5Tcopy(H5T_FLOAT_F4E2M1)) < 0)
return ret_value;
if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0)
return ret_value;
+1
View File
@@ -299,6 +299,7 @@ CONTAINS
H5T_FLOAT_F8E5M2 = floating_types(10)
H5T_FLOAT_F6E2M3 = floating_types(11)
H5T_FLOAT_F6E3M2 = floating_types(12)
H5T_FLOAT_F4E2M1 = floating_types(13)
H5T_STD_I8BE = integer_types(1)
H5T_STD_I8LE = integer_types(2)
+3 -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 = 12
INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 13
INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 28
! These arrays need to be global because they are used in
@@ -95,6 +95,7 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F8E5M2
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F6E2M3
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F6E3M2
!DEC$ATTRIBUTES DLLEXPORT :: H5T_FLOAT_F4E2M1
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I8BE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I8LE
!DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_I16BE
@@ -153,6 +154,7 @@ MODULE H5GLOBAL
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_FLOAT_F4E2M1 !< H5T_FLOAT_F4E2M1
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
+3
View File
@@ -2323,6 +2323,9 @@ H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, bo
else if (H5Tequal(dtype, H5T_FLOAT_F6E3M2)) {
snprintf(dt_str, *slen, "H5T_FLOAT_F6E3M2");
}
else if (H5Tequal(dtype, H5T_FLOAT_F4E2M1)) {
snprintf(dt_str, *slen, "H5T_FLOAT_F4E2M1");
}
#ifdef H5_HAVE__FLOAT16
else if (H5Tequal(dtype, H5T_NATIVE_FLOAT16)) {
snprintf(dt_str, *slen, "H5T_NATIVE_FLOAT16");
+255 -245
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 83
#define YY_END_OF_BUFFER 84
#define YY_NUM_RULES 84
#define YY_END_OF_BUFFER 85
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -654,48 +654,49 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static const flex_int16_t yy_accept[369] =
static const flex_int16_t yy_accept[374] =
{ 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,
83, 83, 85, 84, 83, 84, 75, 81, 82, 84,
84, 84, 84, 79, 80, 77, 78, 83, 0, 75,
0, 0, 0, 0, 0, 76, 0, 0, 0, 0,
0, 57, 0, 0, 0, 0, 0, 58, 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, 55, 0, 0, 0,
0, 0, 0, 0, 0, 0, 56, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 73, 54, 0, 0, 0, 63, 67,
0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
0, 0, 0, 74, 55, 0, 0, 0, 64, 68,
0, 0, 0, 0, 0, 0, 0, 0, 0, 70,
72, 68, 0, 0, 0, 0, 0, 0, 0, 0,
73, 69, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 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, 72, 0, 0, 0, 0, 0,
0, 0, 0, 54, 0, 0, 0, 71, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 66, 0, 0, 0, 0, 0, 0, 0,
0, 0, 67, 0, 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, 65, 0, 0,
0, 0, 0, 0, 0, 0, 1, 2, 0, 0,
0, 0, 0, 0, 9, 10, 0, 0, 66, 0,
62, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 63, 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, 3, 4, 5, 6,
7, 8, 11, 12, 13, 14, 15, 16, 0, 0,
0, 0, 62, 0, 0, 0, 0, 0, 0, 65,
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, 17, 0, 0, 0,
0, 24, 0, 0, 0, 23, 0, 0, 0, 59,
0, 0, 0, 0, 38, 39, 36, 37, 0, 41,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17, 0, 0, 0, 0, 24, 0, 0, 0, 23,
0, 0, 0, 60, 0, 0, 0, 0, 40, 38,
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
39, 36, 37, 0, 42, 0, 26, 18, 20, 19,
0, 25, 0, 59, 61, 0, 0, 43, 0, 0,
0, 27, 21, 0, 0, 0, 41, 0, 44, 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, 45, 46, 47, 48, 49, 50,
0, 0, 0, 0, 0, 0, 0, 51, 0, 52,
0, 53, 0
} ;
static const YY_CHAR yy_ec[256] =
@@ -739,95 +740,97 @@ static const YY_CHAR yy_meta[42] =
1
} ;
static const flex_int16_t yy_base[371] =
static const flex_int16_t yy_base[376] =
{ 0,
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,
0, 0, 399, 400, 396, 0, 0, 400, 400, 12,
388, 369, 364, 400, 400, 400, 400, 392, 390, 0,
374, 356, 359, 361, 359, 400, 356, 359, 346, 345,
17, 400, 365, 34, 15, 368, 359, 400, 351, 31,
354, 28, 360, 363, 349, 344, 35, 352, 359, 355,
335, 341, 345, 350, 337, 334, 339, 335, 345, 331,
347, 45, 331, 341, 322, 337, 400, 338, 341, 327,
322, 347, 327, 336, 318, 330, 325, 318, 306, 33,
322, 318, 324, 400, 400, 306, 40, 301, 400, 400,
308, 309, 298, 303, 303, 43, 309, 43, 319, 400,
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,
400, 400, 314, 299, 55, 291, 315, 309, 309, 308,
71, 78, 305, 292, 296, 307, 287, 295, 289, 287,
65, 292, 85, 277, 400, 305, 308, 305, 56, 302,
305, 302, 71, 400, 286, 294, 284, 267, 288, 288,
284, 283, 88, 262, 290, 293, 290, 84, 82, 87,
89, 279, 278, 94, 96, 98, 277, 276, 270, 276,
273, 268, 400, 267, 277, 264, 268, 267, 266, 253,
100, 103, 105, 261, 255, 257, 254, 107, 106, 109,
260, 259, 258, 257, 256, 255, 400, 400, 254, 253,
252, 251, 250, 249, 400, 400, 107, 248, 400, 247,
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,
242, 400, 237, 256, 129, 132, 256, 242, 241, 240,
239, 238, 237, 240, 221, 226, 220, 224, 223, 223,
226, 220, 224, 219, 119, 222, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 228, 223,
213, 221, 400, 224, 213, 212, 211, 210, 209, 400,
400, 400, 400, 400, 400, 400, 203, 216, 216, 400,
197, 203, 207, 212, 196, 210, 192, 196, 196, 194,
202, 189, 203, 198, 184, 209, 206, 206, 204, 204,
400, 186, 177, 192, 186, 400, 176, 173, 174, 400,
177, 181, 171, 400, 175, 181, 158, 191, 400, 400,
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
400, 400, 400, 177, 124, 171, 400, 400, 400, 400,
173, 400, 161, 400, 400, 172, 180, 150, 178, 171,
168, 400, 400, 139, 128, 169, 400, 158, 144, 172,
175, 172, 161, 160, 151, 152, 159, 132, 133, 135,
400, 400, 150, 146, 146, 153, 152, 151, 150, 149,
147, 135, 138, 136, 400, 400, 400, 400, 400, 400,
136, 139, 127, 135, 118, 114, 74, 400, 75, 400,
57, 400, 400, 163, 74
} ;
static const flex_int16_t yy_def[371] =
static const flex_int16_t yy_def[376] =
{ 0,
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,
373, 1, 373, 373, 373, 374, 375, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 374, 375,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 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
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 0, 373, 373
} ;
static const flex_int16_t yy_nxt[437] =
static const flex_int16_t yy_nxt[442] =
{ 0,
4, 5, 6, 7, 7, 7, 7, 7, 7, 7,
7, 8, 9, 4, 4, 10, 4, 4, 4, 4,
@@ -838,48 +841,49 @@ static const flex_int16_t yy_nxt[437] =
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,
367, 146, 366, 158, 147, 167, 168, 173, 174, 180,
372, 146, 371, 158, 147, 167, 181, 168, 169, 174,
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,
175, 183, 176, 185, 182, 177, 178, 370, 189, 184,
191, 186, 193, 179, 208, 180, 190, 210, 192, 212,
194, 221, 209, 218, 223, 211, 222, 213, 319, 219,
224, 225, 220, 239, 246, 247, 369, 240, 226, 248,
249, 268, 333, 330, 269, 331, 346, 348, 332, 350,
334, 368, 367, 366, 347, 349, 365, 351, 364, 363,
362, 361, 320, 19, 360, 19, 359, 358, 357, 356,
355, 354, 353, 352, 345, 344, 343, 342, 341, 340,
339, 338, 337, 336, 335, 329, 328, 327, 326, 325,
324, 323, 322, 321, 318, 317, 316, 315, 314, 313,
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,
187, 186, 172, 171, 170, 169, 166, 165, 164, 163,
312, 311, 310, 309, 308, 307, 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, 267, 266, 265, 264, 263, 262, 261,
260, 259, 258, 257, 256, 255, 254, 253, 252, 251,
250, 245, 244, 243, 242, 241, 238, 237, 236, 235,
234, 233, 232, 231, 230, 229, 228, 227, 217, 216,
215, 214, 207, 206, 205, 204, 203, 202, 201, 200,
199, 198, 197, 196, 195, 188, 187, 173, 172, 171,
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,
170, 166, 165, 164, 163, 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, 373, 3,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373
} ;
static const flex_int16_t yy_chk[437] =
static const flex_int16_t yy_chk[442] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -888,47 +892,48 @@ static const flex_int16_t yy_chk[437] =
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, 370, 111, 129, 121,
129, 80, 98, 62, 96, 111, 375, 111, 129, 121,
111, 111, 112, 121, 112, 133, 105, 112, 112, 123,
366, 123, 364, 133, 123, 143, 143, 148, 148, 149,
371, 123, 369, 133, 123, 143, 149, 143, 143, 148,
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,
148, 150, 148, 151, 149, 148, 148, 367, 154, 150,
155, 151, 156, 148, 171, 148, 154, 172, 155, 173,
156, 179, 171, 178, 180, 172, 179, 173, 305, 178,
180, 180, 178, 197, 205, 205, 366, 197, 180, 206,
206, 225, 325, 324, 225, 324, 338, 339, 324, 340,
325, 365, 364, 363, 338, 339, 362, 340, 361, 354,
353, 352, 305, 374, 351, 374, 350, 349, 348, 347,
346, 345, 344, 343, 337, 336, 335, 334, 333, 332,
331, 330, 329, 328, 326, 321, 320, 319, 318, 317,
316, 313, 311, 306, 304, 298, 297, 296, 295, 293,
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,
292, 291, 289, 288, 287, 285, 284, 283, 282, 280,
279, 278, 277, 276, 275, 274, 273, 272, 271, 270,
269, 268, 267, 266, 265, 264, 263, 262, 261, 259,
258, 257, 249, 248, 247, 246, 245, 244, 242, 241,
240, 239, 226, 224, 223, 222, 221, 220, 219, 218,
217, 216, 215, 214, 213, 212, 211, 210, 209, 208,
207, 204, 203, 201, 200, 198, 194, 193, 192, 191,
190, 189, 186, 185, 184, 183, 182, 181, 177, 176,
175, 174, 170, 169, 168, 167, 166, 165, 164, 162,
161, 160, 159, 158, 157, 153, 152, 147, 146, 145,
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,
144, 142, 141, 140, 139, 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, 373,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
368, 368, 368, 368, 368, 368
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373, 373, 373, 373, 373, 373, 373, 373, 373, 373,
373
} ;
static yy_state_type yy_last_accepting_state;
@@ -987,8 +992,8 @@ static int my_yyinput(char *, int);
extern char *myinput;
extern size_t input_len;
#line 961 "hl/src//H5LTanalyze.c"
#line 962 "hl/src//H5LTanalyze.c"
#line 966 "hl/src//H5LTanalyze.c"
#line 967 "hl/src//H5LTanalyze.c"
#define INITIAL 0
@@ -1200,7 +1205,7 @@ YY_DECL
#line 53 "hl/src//H5LTanalyze.l"
#line 1174 "hl/src//H5LTanalyze.c"
#line 1179 "hl/src//H5LTanalyze.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -1227,13 +1232,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 >= 369 )
if ( yy_current_state >= 374 )
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] != 395 );
while ( yy_base[yy_current_state] != 400 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1455,232 +1460,237 @@ YY_RULE_SETUP
case 40:
YY_RULE_SETUP
#line 97 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT16_TOKEN);}
{return hid(H5T_FLOAT_F4E2M1_TOKEN);}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 98 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
{return hid(H5T_NATIVE_FLOAT16_TOKEN);}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 99 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 100 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 102 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F16BE_TOKEN);}
#line 101 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 103 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F16LE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F16BE_TOKEN);}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 104 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F32BE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F16LE_TOKEN);}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 105 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F32LE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F32BE_TOKEN);}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 106 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F64BE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F32LE_TOKEN);}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 107 "hl/src//H5LTanalyze.l"
{return hid(H5T_COMPLEX_IEEE_F64LE_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F64BE_TOKEN);}
YY_BREAK
case 50:
YY_RULE_SETUP
#line 108 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_COMPLEX_TOKEN);}
{return hid(H5T_COMPLEX_IEEE_F64LE_TOKEN);}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 109 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_COMPLEX_TOKEN);}
{return hid(H5T_NATIVE_FLOAT_COMPLEX_TOKEN);}
YY_BREAK
case 52:
YY_RULE_SETUP
#line 110 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN);}
{return hid(H5T_NATIVE_DOUBLE_COMPLEX_TOKEN);}
YY_BREAK
case 53:
YY_RULE_SETUP
#line 112 "hl/src//H5LTanalyze.l"
{return token(H5T_STRING_TOKEN);}
#line 111 "hl/src//H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN);}
YY_BREAK
case 54:
YY_RULE_SETUP
#line 113 "hl/src//H5LTanalyze.l"
{return token(STRSIZE_TOKEN);}
{return token(H5T_STRING_TOKEN);}
YY_BREAK
case 55:
YY_RULE_SETUP
#line 114 "hl/src//H5LTanalyze.l"
{return token(STRPAD_TOKEN);}
{return token(STRSIZE_TOKEN);}
YY_BREAK
case 56:
YY_RULE_SETUP
#line 115 "hl/src//H5LTanalyze.l"
{return token(CSET_TOKEN);}
{return token(STRPAD_TOKEN);}
YY_BREAK
case 57:
YY_RULE_SETUP
#line 116 "hl/src//H5LTanalyze.l"
{return token(CTYPE_TOKEN);}
{return token(CSET_TOKEN);}
YY_BREAK
case 58:
YY_RULE_SETUP
#line 117 "hl/src//H5LTanalyze.l"
{return token(H5T_STR_NULLTERM_TOKEN);}
{return token(CTYPE_TOKEN);}
YY_BREAK
case 59:
YY_RULE_SETUP
#line 118 "hl/src//H5LTanalyze.l"
{return token(H5T_STR_NULLPAD_TOKEN);}
{return token(H5T_STR_NULLTERM_TOKEN);}
YY_BREAK
case 60:
YY_RULE_SETUP
#line 119 "hl/src//H5LTanalyze.l"
{return token(H5T_STR_SPACEPAD_TOKEN);}
{return token(H5T_STR_NULLPAD_TOKEN);}
YY_BREAK
case 61:
YY_RULE_SETUP
#line 120 "hl/src//H5LTanalyze.l"
{return token(H5T_CSET_ASCII_TOKEN);}
{return token(H5T_STR_SPACEPAD_TOKEN);}
YY_BREAK
case 62:
YY_RULE_SETUP
#line 121 "hl/src//H5LTanalyze.l"
{return token(H5T_CSET_UTF8_TOKEN);}
{return token(H5T_CSET_ASCII_TOKEN);}
YY_BREAK
case 63:
YY_RULE_SETUP
#line 122 "hl/src//H5LTanalyze.l"
{return token(H5T_C_S1_TOKEN);}
{return token(H5T_CSET_UTF8_TOKEN);}
YY_BREAK
case 64:
YY_RULE_SETUP
#line 123 "hl/src//H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
{return token(H5T_C_S1_TOKEN);}
YY_BREAK
case 65:
YY_RULE_SETUP
#line 124 "hl/src//H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
{return token(H5T_FORTRAN_S1_TOKEN);}
YY_BREAK
case 66:
YY_RULE_SETUP
#line 126 "hl/src//H5LTanalyze.l"
{return token(H5T_COMPOUND_TOKEN);}
#line 125 "hl/src//H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
YY_BREAK
case 67:
YY_RULE_SETUP
#line 127 "hl/src//H5LTanalyze.l"
{return token(H5T_ENUM_TOKEN);}
{return token(H5T_COMPOUND_TOKEN);}
YY_BREAK
case 68:
YY_RULE_SETUP
#line 128 "hl/src//H5LTanalyze.l"
{return token(H5T_ARRAY_TOKEN);}
{return token(H5T_ENUM_TOKEN);}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 129 "hl/src//H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
{return token(H5T_ARRAY_TOKEN);}
YY_BREAK
case 70:
YY_RULE_SETUP
#line 130 "hl/src//H5LTanalyze.l"
{return token(H5T_COMPLEX_TOKEN);}
{return token(H5T_VLEN_TOKEN);}
YY_BREAK
case 71:
YY_RULE_SETUP
#line 132 "hl/src//H5LTanalyze.l"
{return token(H5T_OPAQUE_TOKEN);}
#line 131 "hl/src//H5LTanalyze.l"
{return token(H5T_COMPLEX_TOKEN);}
YY_BREAK
case 72:
YY_RULE_SETUP
#line 133 "hl/src//H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
{return token(H5T_OPAQUE_TOKEN);}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 134 "hl/src//H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
{return token(OPQ_SIZE_TOKEN);}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 136 "hl/src//H5LTanalyze.l"
#line 135 "hl/src//H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
YY_BREAK
case 75:
YY_RULE_SETUP
#line 137 "hl/src//H5LTanalyze.l"
{
H5LTyylval.ival = atoi(yytext);
return NUMBER;
}
YY_BREAK
case 75:
/* rule 75 can match eol */
case 76:
/* rule 76 can match eol */
YY_RULE_SETUP
#line 141 "hl/src//H5LTanalyze.l"
#line 142 "hl/src//H5LTanalyze.l"
{
H5LTyylval.sval = trim_quotes(yytext);
return STRING;
}
YY_BREAK
case 76:
YY_RULE_SETUP
#line 146 "hl/src//H5LTanalyze.l"
{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:
YY_RULE_SETUP
#line 150 "hl/src//H5LTanalyze.l"
{return token(':');}
{return token(']');}
YY_BREAK
case 81:
YY_RULE_SETUP
#line 151 "hl/src//H5LTanalyze.l"
{return token(';');}
{return token(':');}
YY_BREAK
case 82:
/* rule 82 can match eol */
YY_RULE_SETUP
#line 152 "hl/src//H5LTanalyze.l"
;
{return token(';');}
YY_BREAK
case 83:
/* rule 83 can match eol */
YY_RULE_SETUP
#line 154 "hl/src//H5LTanalyze.l"
#line 153 "hl/src//H5LTanalyze.l"
;
YY_BREAK
case 84:
YY_RULE_SETUP
#line 155 "hl/src//H5LTanalyze.l"
ECHO;
YY_BREAK
#line 1654 "hl/src//H5LTanalyze.c"
#line 1664 "hl/src//H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1977,7 +1987,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 >= 369 )
if ( yy_current_state >= 374 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -2005,11 +2015,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 >= 369 )
if ( yy_current_state >= 374 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 368);
yy_is_jam = (yy_current_state == 373);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2685,7 +2695,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
#line 154 "hl/src//H5LTanalyze.l"
#line 155 "hl/src//H5LTanalyze.l"
/* Allocate a copy of `quoted` with the double quote character at
+1
View File
@@ -94,6 +94,7 @@ 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_FLOAT_F4E2M1 {return hid(H5T_FLOAT_F4E2M1_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);}
+490 -481
View File
@@ -223,92 +223,93 @@ enum yysymbol_kind_t
YYSYMBOL_H5T_FLOAT_F8E5M2_TOKEN = 39, /* H5T_FLOAT_F8E5M2_TOKEN */
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 */
YYSYMBOL_H5T_FLOAT_F4E2M1_TOKEN = 42, /* H5T_FLOAT_F4E2M1_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT16_TOKEN = 43, /* H5T_NATIVE_FLOAT16_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT_TOKEN = 44, /* H5T_NATIVE_FLOAT_TOKEN */
YYSYMBOL_H5T_NATIVE_DOUBLE_TOKEN = 45, /* H5T_NATIVE_DOUBLE_TOKEN */
YYSYMBOL_H5T_NATIVE_LDOUBLE_TOKEN = 46, /* H5T_NATIVE_LDOUBLE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F16BE_TOKEN = 47, /* H5T_COMPLEX_IEEE_F16BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F16LE_TOKEN = 48, /* H5T_COMPLEX_IEEE_F16LE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F32BE_TOKEN = 49, /* H5T_COMPLEX_IEEE_F32BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F32LE_TOKEN = 50, /* H5T_COMPLEX_IEEE_F32LE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F64BE_TOKEN = 51, /* H5T_COMPLEX_IEEE_F64BE_TOKEN */
YYSYMBOL_H5T_COMPLEX_IEEE_F64LE_TOKEN = 52, /* H5T_COMPLEX_IEEE_F64LE_TOKEN */
YYSYMBOL_H5T_NATIVE_FLOAT_COMPLEX_TOKEN = 53, /* H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
YYSYMBOL_H5T_NATIVE_DOUBLE_COMPLEX_TOKEN = 54, /* H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
YYSYMBOL_H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN = 55, /* H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
YYSYMBOL_H5T_STRING_TOKEN = 56, /* H5T_STRING_TOKEN */
YYSYMBOL_STRSIZE_TOKEN = 57, /* STRSIZE_TOKEN */
YYSYMBOL_STRPAD_TOKEN = 58, /* STRPAD_TOKEN */
YYSYMBOL_CSET_TOKEN = 59, /* CSET_TOKEN */
YYSYMBOL_CTYPE_TOKEN = 60, /* CTYPE_TOKEN */
YYSYMBOL_H5T_VARIABLE_TOKEN = 61, /* H5T_VARIABLE_TOKEN */
YYSYMBOL_H5T_STR_NULLTERM_TOKEN = 62, /* H5T_STR_NULLTERM_TOKEN */
YYSYMBOL_H5T_STR_NULLPAD_TOKEN = 63, /* H5T_STR_NULLPAD_TOKEN */
YYSYMBOL_H5T_STR_SPACEPAD_TOKEN = 64, /* H5T_STR_SPACEPAD_TOKEN */
YYSYMBOL_H5T_CSET_ASCII_TOKEN = 65, /* H5T_CSET_ASCII_TOKEN */
YYSYMBOL_H5T_CSET_UTF8_TOKEN = 66, /* H5T_CSET_UTF8_TOKEN */
YYSYMBOL_H5T_C_S1_TOKEN = 67, /* H5T_C_S1_TOKEN */
YYSYMBOL_H5T_FORTRAN_S1_TOKEN = 68, /* H5T_FORTRAN_S1_TOKEN */
YYSYMBOL_H5T_OPAQUE_TOKEN = 69, /* H5T_OPAQUE_TOKEN */
YYSYMBOL_OPQ_SIZE_TOKEN = 70, /* OPQ_SIZE_TOKEN */
YYSYMBOL_OPQ_TAG_TOKEN = 71, /* OPQ_TAG_TOKEN */
YYSYMBOL_H5T_COMPOUND_TOKEN = 72, /* H5T_COMPOUND_TOKEN */
YYSYMBOL_H5T_ENUM_TOKEN = 73, /* H5T_ENUM_TOKEN */
YYSYMBOL_H5T_ARRAY_TOKEN = 74, /* H5T_ARRAY_TOKEN */
YYSYMBOL_H5T_VLEN_TOKEN = 75, /* H5T_VLEN_TOKEN */
YYSYMBOL_H5T_COMPLEX_TOKEN = 76, /* H5T_COMPLEX_TOKEN */
YYSYMBOL_STRING = 77, /* STRING */
YYSYMBOL_NUMBER = 78, /* NUMBER */
YYSYMBOL_79_ = 79, /* '{' */
YYSYMBOL_80_ = 80, /* '}' */
YYSYMBOL_81_ = 81, /* '[' */
YYSYMBOL_82_ = 82, /* ']' */
YYSYMBOL_83_ = 83, /* ':' */
YYSYMBOL_84_ = 84, /* ';' */
YYSYMBOL_YYACCEPT = 85, /* $accept */
YYSYMBOL_start = 86, /* start */
YYSYMBOL_ddl_type = 87, /* ddl_type */
YYSYMBOL_atomic_type = 88, /* atomic_type */
YYSYMBOL_integer_type = 89, /* integer_type */
YYSYMBOL_fp_type = 90, /* fp_type */
YYSYMBOL_compound_type = 91, /* compound_type */
YYSYMBOL_92_1 = 92, /* $@1 */
YYSYMBOL_memb_list = 93, /* memb_list */
YYSYMBOL_memb_def = 94, /* memb_def */
YYSYMBOL_95_2 = 95, /* $@2 */
YYSYMBOL_field_name = 96, /* field_name */
YYSYMBOL_field_offset = 97, /* field_offset */
YYSYMBOL_offset = 98, /* offset */
YYSYMBOL_array_type = 99, /* array_type */
YYSYMBOL_100_3 = 100, /* $@3 */
YYSYMBOL_dim_list = 101, /* dim_list */
YYSYMBOL_dim = 102, /* dim */
YYSYMBOL_103_4 = 103, /* $@4 */
YYSYMBOL_104_5 = 104, /* $@5 */
YYSYMBOL_dimsize = 105, /* dimsize */
YYSYMBOL_vlen_type = 106, /* vlen_type */
YYSYMBOL_complex_type = 107, /* complex_type */
YYSYMBOL_opaque_type = 108, /* opaque_type */
YYSYMBOL_109_6 = 109, /* @6 */
YYSYMBOL_110_7 = 110, /* $@7 */
YYSYMBOL_opaque_size = 111, /* opaque_size */
YYSYMBOL_opaque_tag = 112, /* opaque_tag */
YYSYMBOL_string_type = 113, /* string_type */
YYSYMBOL_114_8 = 114, /* $@8 */
YYSYMBOL_115_9 = 115, /* $@9 */
YYSYMBOL_116_10 = 116, /* $@10 */
YYSYMBOL_117_11 = 117, /* @11 */
YYSYMBOL_strsize = 118, /* strsize */
YYSYMBOL_strpad = 119, /* strpad */
YYSYMBOL_cset = 120, /* cset */
YYSYMBOL_ctype = 121, /* ctype */
YYSYMBOL_enum_type = 122, /* enum_type */
YYSYMBOL_123_12 = 123, /* $@12 */
YYSYMBOL_enum_list = 124, /* enum_list */
YYSYMBOL_enum_def = 125, /* enum_def */
YYSYMBOL_126_13 = 126, /* $@13 */
YYSYMBOL_enum_symbol = 127, /* enum_symbol */
YYSYMBOL_enum_val = 128 /* enum_val */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
@@ -634,21 +635,21 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 79
#define YYFINAL 80
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 257
#define YYLAST 260
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 84
#define YYNTOKENS 85
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 44
/* YYNRULES -- Number of rules. */
#define YYNRULES 112
#define YYNRULES 113
/* YYNSTATES -- Number of states. */
#define YYNSTATES 157
#define YYNSTATES 158
/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 332
#define YYMAXUTOK 333
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -667,14 +668,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, 82, 83,
2, 2, 2, 2, 2, 2, 2, 2, 83, 84,
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, 2, 81, 2, 2, 2, 2, 2, 2,
2, 81, 2, 82, 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, 79, 2, 80, 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,
@@ -695,25 +696,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, 76, 77
75, 76, 77, 78
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
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
0, 112, 112, 113, 115, 116, 117, 118, 119, 121,
122, 123, 124, 125, 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,
154, 157, 158, 159, 160, 161, 162, 163, 164, 165,
166, 167, 168, 169, 170, 171, 172, 173, 177, 176,
185, 186, 188, 188, 225, 233, 234, 237, 239, 239,
248, 249, 251, 252, 251, 259, 262, 266, 267, 268,
269, 270, 271, 272, 273, 274, 275, 282, 287, 279,
294, 296, 301, 308, 317, 324, 298, 348, 349, 351,
352, 353, 355, 356, 358, 359, 363, 362, 367, 368,
370, 370, 420, 422
};
#endif
@@ -746,28 +747,28 @@ static const char *const yytname[] =
"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",
"H5T_COMPLEX_IEEE_F32BE_TOKEN", "H5T_COMPLEX_IEEE_F32LE_TOKEN",
"H5T_COMPLEX_IEEE_F64BE_TOKEN", "H5T_COMPLEX_IEEE_F64LE_TOKEN",
"H5T_NATIVE_FLOAT_COMPLEX_TOKEN", "H5T_NATIVE_DOUBLE_COMPLEX_TOKEN",
"H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN", "H5T_STRING_TOKEN", "STRSIZE_TOKEN",
"STRPAD_TOKEN", "CSET_TOKEN", "CTYPE_TOKEN", "H5T_VARIABLE_TOKEN",
"H5T_STR_NULLTERM_TOKEN", "H5T_STR_NULLPAD_TOKEN",
"H5T_STR_SPACEPAD_TOKEN", "H5T_CSET_ASCII_TOKEN", "H5T_CSET_UTF8_TOKEN",
"H5T_C_S1_TOKEN", "H5T_FORTRAN_S1_TOKEN", "H5T_OPAQUE_TOKEN",
"OPQ_SIZE_TOKEN", "OPQ_TAG_TOKEN", "H5T_COMPOUND_TOKEN",
"H5T_ENUM_TOKEN", "H5T_ARRAY_TOKEN", "H5T_VLEN_TOKEN",
"H5T_COMPLEX_TOKEN", "STRING", "NUMBER", "'{'", "'}'", "'['", "']'",
"':'", "';'", "$accept", "start", "ddl_type", "atomic_type",
"integer_type", "fp_type", "compound_type", "$@1", "memb_list",
"memb_def", "$@2", "field_name", "field_offset", "offset", "array_type",
"$@3", "dim_list", "dim", "$@4", "$@5", "dimsize", "vlen_type",
"complex_type", "opaque_type", "@6", "$@7", "opaque_size", "opaque_tag",
"string_type", "$@8", "$@9", "$@10", "@11", "strsize", "strpad", "cset",
"ctype", "enum_type", "$@12", "enum_list", "enum_def", "$@13",
"enum_symbol", "enum_val", YY_NULLPTR
"H5T_FLOAT_F4E2M1_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", "H5T_COMPLEX_IEEE_F32BE_TOKEN",
"H5T_COMPLEX_IEEE_F32LE_TOKEN", "H5T_COMPLEX_IEEE_F64BE_TOKEN",
"H5T_COMPLEX_IEEE_F64LE_TOKEN", "H5T_NATIVE_FLOAT_COMPLEX_TOKEN",
"H5T_NATIVE_DOUBLE_COMPLEX_TOKEN", "H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN",
"H5T_STRING_TOKEN", "STRSIZE_TOKEN", "STRPAD_TOKEN", "CSET_TOKEN",
"CTYPE_TOKEN", "H5T_VARIABLE_TOKEN", "H5T_STR_NULLTERM_TOKEN",
"H5T_STR_NULLPAD_TOKEN", "H5T_STR_SPACEPAD_TOKEN",
"H5T_CSET_ASCII_TOKEN", "H5T_CSET_UTF8_TOKEN", "H5T_C_S1_TOKEN",
"H5T_FORTRAN_S1_TOKEN", "H5T_OPAQUE_TOKEN", "OPQ_SIZE_TOKEN",
"OPQ_TAG_TOKEN", "H5T_COMPOUND_TOKEN", "H5T_ENUM_TOKEN",
"H5T_ARRAY_TOKEN", "H5T_VLEN_TOKEN", "H5T_COMPLEX_TOKEN", "STRING",
"NUMBER", "'{'", "'}'", "'['", "']'", "':'", "';'", "$accept", "start",
"ddl_type", "atomic_type", "integer_type", "fp_type", "compound_type",
"$@1", "memb_list", "memb_def", "$@2", "field_name", "field_offset",
"offset", "array_type", "$@3", "dim_list", "dim", "$@4", "$@5",
"dimsize", "vlen_type", "complex_type", "opaque_type", "@6", "$@7",
"opaque_size", "opaque_tag", "string_type", "$@8", "$@9", "$@10", "@11",
"strsize", "strpad", "cset", "ctype", "enum_type", "$@12", "enum_list",
"enum_def", "$@13", "enum_symbol", "enum_val", YY_NULLPTR
};
static const char *
@@ -791,22 +792,22 @@ yysymbol_name (yysymbol_kind_t yysymbol)
STATE-NUM. */
static const yytype_int16 yypact[] =
{
152, -24, -24, -24, -24, -24, -24, -24, -24, -24,
154, -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, -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
-24, -24, -24, -24, -21, -15, -24, -14, -24, -4,
-2, 133, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, 77, 65, 58, 228, 59, 154, 154,
-24, 75, 61, -24, 56, -24, 62, 63, -24, -24,
57, -24, 60, 76, -24, -3, -24, -24, -24, -24,
-24, -24, -24, -24, -24, 66, -24, 89, 83, 78,
-23, 134, -24, -1, 136, -24, 128, -24, -24, -24,
-24, -24, -24, -24, -24, -24, 130, -24, 131, 138,
135, 139, 140, -24, -24, -24, -24, -24, -24, 137,
-24, 159, 144, -24, -10, -24, -24, -24, 141, -24,
160, 0, -24, -24, 174, -24, 179, -24
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -818,24 +819,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, 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
53, 54, 55, 56, 57, 81, 80, 83, 82, 85,
84, 77, 78, 79, 0, 0, 58, 0, 68, 0,
0, 0, 3, 4, 9, 10, 5, 6, 7, 8,
13, 11, 12, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 60, 0, 70, 0, 0, 97, 98,
0, 90, 0, 0, 106, 0, 76, 86, 92, 87,
59, 62, 61, 108, 72, 0, 71, 0, 0, 0,
0, 0, 69, 0, 0, 64, 65, 112, 107, 109,
110, 75, 73, 99, 100, 101, 0, 91, 0, 0,
0, 0, 0, 93, 88, 67, 66, 63, 113, 0,
74, 0, 0, 111, 0, 89, 102, 103, 0, 94,
0, 0, 104, 105, 0, 95, 0, 96
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-24, -24, -19, -24, 182, -24, -24, -24, -24, -24,
-24, -24, -19, -24, 184, -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,
@@ -845,11 +846,11 @@ static const yytype_int16 yypgoto[] =
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_uint8 yydefgoto[] =
{
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
0, 61, 62, 63, 64, 65, 66, 75, 93, 102,
109, 116, 130, 136, 67, 77, 95, 106, 111, 132,
122, 68, 69, 70, 108, 142, 92, 128, 71, 107,
141, 150, 156, 90, 126, 148, 154, 72, 103, 110,
119, 131, 120, 139
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -862,27 +863,28 @@ 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, 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
51, 52, 53, 54, 117, 146, 147, 118, 73, 86,
87, 123, 124, 125, 74, 76, 55, 152, 153, 56,
57, 58, 59, 60, 101, 78, 105, 79, 104, 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, 54, 80, 81, 82, 88, 83, 85, 91,
94, 98, 96, 97, 99, 55, 112, 113, 56, 57,
58, 59, 60, 89, 114, 115, 100, 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,
54, 129, 121, 127, 133, 134, 135, 138, 144, 137,
151, 143, 140, 55, 145, 149, 56, 57, 58, 59,
60, 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, 155, 157,
84
};
static const yytype_int8 yycheck[] =
@@ -892,66 +894,67 @@ 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, 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
53, 54, 55, 56, 77, 65, 66, 80, 79, 78,
79, 62, 63, 64, 79, 79, 69, 67, 68, 72,
73, 74, 75, 76, 93, 79, 95, 79, 81, 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, 56, 0, 57, 70, 61, 79, 79, 78,
84, 84, 80, 80, 84, 69, 80, 58, 72, 73,
74, 75, 76, 78, 71, 77, 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,
56, 83, 78, 77, 84, 84, 78, 78, 59, 84,
60, 84, 82, 69, 80, 84, 72, 73, 74, 75,
76, 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, 84, 80,
76
};
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
state STATE-NUM. */
static const yytype_int8 yystos[] =
static const yytype_uint8 yystos[] =
{
0, 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, 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
52, 53, 54, 55, 56, 69, 72, 73, 74, 75,
76, 86, 87, 88, 89, 90, 91, 99, 106, 107,
108, 113, 122, 79, 79, 92, 79, 100, 79, 79,
0, 57, 70, 79, 89, 79, 87, 87, 61, 78,
118, 78, 111, 93, 84, 101, 80, 80, 84, 84,
80, 87, 94, 123, 81, 87, 102, 114, 109, 95,
124, 103, 80, 58, 71, 77, 96, 77, 80, 125,
127, 78, 105, 62, 63, 64, 119, 77, 112, 83,
97, 126, 104, 84, 84, 78, 98, 84, 78, 128,
82, 115, 110, 84, 59, 80, 65, 66, 120, 84,
116, 60, 67, 68, 121, 84, 117, 80
};
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
static const yytype_int8 yyr1[] =
static const yytype_uint8 yyr1[] =
{
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
0, 85, 86, 86, 87, 87, 87, 87, 87, 88,
88, 88, 88, 88, 89, 89, 89, 89, 89, 89,
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
89, 90, 90, 90, 90, 90, 90, 90, 90, 90,
90, 90, 90, 90, 90, 90, 90, 90, 92, 91,
93, 93, 95, 94, 96, 97, 97, 98, 100, 99,
101, 101, 103, 104, 102, 105, 106, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 109, 110, 108,
111, 112, 114, 115, 116, 117, 113, 118, 118, 119,
119, 119, 120, 120, 121, 121, 123, 122, 124, 124,
126, 125, 127, 128
};
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
@@ -962,13 +965,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, 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, 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
};
@@ -1432,299 +1435,305 @@ yyreduce:
switch (yyn)
{
case 2: /* start: %empty */
#line 111 "hl/src//H5LTparse.y"
#line 112 "hl/src//H5LTparse.y"
{ memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
#line 1409 "hl/src//H5LTparse.c"
#line 1412 "hl/src//H5LTparse.c"
break;
case 3: /* start: ddl_type */
#line 112 "hl/src//H5LTparse.y"
#line 113 "hl/src//H5LTparse.y"
{ return (yyval.hid);}
#line 1415 "hl/src//H5LTparse.c"
#line 1418 "hl/src//H5LTparse.c"
break;
case 14: /* integer_type: H5T_STD_I8BE_TOKEN */
#line 127 "hl/src//H5LTparse.y"
#line 128 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
#line 1421 "hl/src//H5LTparse.c"
#line 1424 "hl/src//H5LTparse.c"
break;
case 15: /* integer_type: H5T_STD_I8LE_TOKEN */
#line 128 "hl/src//H5LTparse.y"
#line 129 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
#line 1427 "hl/src//H5LTparse.c"
#line 1430 "hl/src//H5LTparse.c"
break;
case 16: /* integer_type: H5T_STD_I16BE_TOKEN */
#line 129 "hl/src//H5LTparse.y"
#line 130 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
#line 1433 "hl/src//H5LTparse.c"
#line 1436 "hl/src//H5LTparse.c"
break;
case 17: /* integer_type: H5T_STD_I16LE_TOKEN */
#line 130 "hl/src//H5LTparse.y"
#line 131 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
#line 1439 "hl/src//H5LTparse.c"
#line 1442 "hl/src//H5LTparse.c"
break;
case 18: /* integer_type: H5T_STD_I32BE_TOKEN */
#line 131 "hl/src//H5LTparse.y"
#line 132 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
#line 1445 "hl/src//H5LTparse.c"
#line 1448 "hl/src//H5LTparse.c"
break;
case 19: /* integer_type: H5T_STD_I32LE_TOKEN */
#line 132 "hl/src//H5LTparse.y"
#line 133 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
#line 1451 "hl/src//H5LTparse.c"
#line 1454 "hl/src//H5LTparse.c"
break;
case 20: /* integer_type: H5T_STD_I64BE_TOKEN */
#line 133 "hl/src//H5LTparse.y"
#line 134 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
#line 1457 "hl/src//H5LTparse.c"
#line 1460 "hl/src//H5LTparse.c"
break;
case 21: /* integer_type: H5T_STD_I64LE_TOKEN */
#line 134 "hl/src//H5LTparse.y"
#line 135 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
#line 1463 "hl/src//H5LTparse.c"
#line 1466 "hl/src//H5LTparse.c"
break;
case 22: /* integer_type: H5T_STD_U8BE_TOKEN */
#line 135 "hl/src//H5LTparse.y"
#line 136 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
#line 1469 "hl/src//H5LTparse.c"
#line 1472 "hl/src//H5LTparse.c"
break;
case 23: /* integer_type: H5T_STD_U8LE_TOKEN */
#line 136 "hl/src//H5LTparse.y"
#line 137 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
#line 1475 "hl/src//H5LTparse.c"
#line 1478 "hl/src//H5LTparse.c"
break;
case 24: /* integer_type: H5T_STD_U16BE_TOKEN */
#line 137 "hl/src//H5LTparse.y"
#line 138 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
#line 1481 "hl/src//H5LTparse.c"
#line 1484 "hl/src//H5LTparse.c"
break;
case 25: /* integer_type: H5T_STD_U16LE_TOKEN */
#line 138 "hl/src//H5LTparse.y"
#line 139 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
#line 1487 "hl/src//H5LTparse.c"
#line 1490 "hl/src//H5LTparse.c"
break;
case 26: /* integer_type: H5T_STD_U32BE_TOKEN */
#line 139 "hl/src//H5LTparse.y"
#line 140 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
#line 1493 "hl/src//H5LTparse.c"
#line 1496 "hl/src//H5LTparse.c"
break;
case 27: /* integer_type: H5T_STD_U32LE_TOKEN */
#line 140 "hl/src//H5LTparse.y"
#line 141 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
#line 1499 "hl/src//H5LTparse.c"
#line 1502 "hl/src//H5LTparse.c"
break;
case 28: /* integer_type: H5T_STD_U64BE_TOKEN */
#line 141 "hl/src//H5LTparse.y"
#line 142 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
#line 1505 "hl/src//H5LTparse.c"
#line 1508 "hl/src//H5LTparse.c"
break;
case 29: /* integer_type: H5T_STD_U64LE_TOKEN */
#line 142 "hl/src//H5LTparse.y"
#line 143 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
#line 1511 "hl/src//H5LTparse.c"
#line 1514 "hl/src//H5LTparse.c"
break;
case 30: /* integer_type: H5T_NATIVE_CHAR_TOKEN */
#line 143 "hl/src//H5LTparse.y"
#line 144 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
#line 1517 "hl/src//H5LTparse.c"
#line 1520 "hl/src//H5LTparse.c"
break;
case 31: /* integer_type: H5T_NATIVE_SCHAR_TOKEN */
#line 144 "hl/src//H5LTparse.y"
#line 145 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
#line 1523 "hl/src//H5LTparse.c"
#line 1526 "hl/src//H5LTparse.c"
break;
case 32: /* integer_type: H5T_NATIVE_UCHAR_TOKEN */
#line 145 "hl/src//H5LTparse.y"
#line 146 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
#line 1529 "hl/src//H5LTparse.c"
#line 1532 "hl/src//H5LTparse.c"
break;
case 33: /* integer_type: H5T_NATIVE_SHORT_TOKEN */
#line 146 "hl/src//H5LTparse.y"
#line 147 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
#line 1535 "hl/src//H5LTparse.c"
#line 1538 "hl/src//H5LTparse.c"
break;
case 34: /* integer_type: H5T_NATIVE_USHORT_TOKEN */
#line 147 "hl/src//H5LTparse.y"
#line 148 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
#line 1541 "hl/src//H5LTparse.c"
#line 1544 "hl/src//H5LTparse.c"
break;
case 35: /* integer_type: H5T_NATIVE_INT_TOKEN */
#line 148 "hl/src//H5LTparse.y"
#line 149 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
#line 1547 "hl/src//H5LTparse.c"
#line 1550 "hl/src//H5LTparse.c"
break;
case 36: /* integer_type: H5T_NATIVE_UINT_TOKEN */
#line 149 "hl/src//H5LTparse.y"
#line 150 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
#line 1553 "hl/src//H5LTparse.c"
#line 1556 "hl/src//H5LTparse.c"
break;
case 37: /* integer_type: H5T_NATIVE_LONG_TOKEN */
#line 150 "hl/src//H5LTparse.y"
#line 151 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
#line 1559 "hl/src//H5LTparse.c"
#line 1562 "hl/src//H5LTparse.c"
break;
case 38: /* integer_type: H5T_NATIVE_ULONG_TOKEN */
#line 151 "hl/src//H5LTparse.y"
#line 152 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
#line 1565 "hl/src//H5LTparse.c"
#line 1568 "hl/src//H5LTparse.c"
break;
case 39: /* integer_type: H5T_NATIVE_LLONG_TOKEN */
#line 152 "hl/src//H5LTparse.y"
#line 153 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
#line 1571 "hl/src//H5LTparse.c"
#line 1574 "hl/src//H5LTparse.c"
break;
case 40: /* integer_type: H5T_NATIVE_ULLONG_TOKEN */
#line 153 "hl/src//H5LTparse.y"
#line 154 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
#line 1577 "hl/src//H5LTparse.c"
#line 1580 "hl/src//H5LTparse.c"
break;
case 41: /* fp_type: H5T_IEEE_F16BE_TOKEN */
#line 156 "hl/src//H5LTparse.y"
#line 157 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F16BE); }
#line 1583 "hl/src//H5LTparse.c"
#line 1586 "hl/src//H5LTparse.c"
break;
case 42: /* fp_type: H5T_IEEE_F16LE_TOKEN */
#line 157 "hl/src//H5LTparse.y"
#line 158 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F16LE); }
#line 1589 "hl/src//H5LTparse.c"
#line 1592 "hl/src//H5LTparse.c"
break;
case 43: /* fp_type: H5T_IEEE_F32BE_TOKEN */
#line 158 "hl/src//H5LTparse.y"
#line 159 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
#line 1595 "hl/src//H5LTparse.c"
#line 1598 "hl/src//H5LTparse.c"
break;
case 44: /* fp_type: H5T_IEEE_F32LE_TOKEN */
#line 159 "hl/src//H5LTparse.y"
#line 160 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
#line 1601 "hl/src//H5LTparse.c"
#line 1604 "hl/src//H5LTparse.c"
break;
case 45: /* fp_type: H5T_IEEE_F64BE_TOKEN */
#line 160 "hl/src//H5LTparse.y"
#line 161 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
#line 1607 "hl/src//H5LTparse.c"
#line 1610 "hl/src//H5LTparse.c"
break;
case 46: /* fp_type: H5T_IEEE_F64LE_TOKEN */
#line 161 "hl/src//H5LTparse.y"
#line 162 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
#line 1613 "hl/src//H5LTparse.c"
#line 1616 "hl/src//H5LTparse.c"
break;
case 47: /* fp_type: H5T_FLOAT_BFLOAT16BE_TOKEN */
#line 162 "hl/src//H5LTparse.y"
#line 163 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_BFLOAT16BE); }
#line 1619 "hl/src//H5LTparse.c"
#line 1622 "hl/src//H5LTparse.c"
break;
case 48: /* fp_type: H5T_FLOAT_BFLOAT16LE_TOKEN */
#line 163 "hl/src//H5LTparse.y"
#line 164 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_BFLOAT16LE); }
#line 1625 "hl/src//H5LTparse.c"
#line 1628 "hl/src//H5LTparse.c"
break;
case 49: /* fp_type: H5T_FLOAT_F8E4M3_TOKEN */
#line 164 "hl/src//H5LTparse.y"
#line 165 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F8E4M3); }
#line 1631 "hl/src//H5LTparse.c"
#line 1634 "hl/src//H5LTparse.c"
break;
case 50: /* fp_type: H5T_FLOAT_F8E5M2_TOKEN */
#line 165 "hl/src//H5LTparse.y"
#line 166 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F8E5M2); }
#line 1637 "hl/src//H5LTparse.c"
#line 1640 "hl/src//H5LTparse.c"
break;
case 51: /* fp_type: H5T_FLOAT_F6E2M3_TOKEN */
#line 166 "hl/src//H5LTparse.y"
#line 167 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F6E2M3); }
#line 1643 "hl/src//H5LTparse.c"
#line 1646 "hl/src//H5LTparse.c"
break;
case 52: /* fp_type: H5T_FLOAT_F6E3M2_TOKEN */
#line 167 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F6E3M2); }
#line 1649 "hl/src//H5LTparse.c"
break;
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"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F6E3M2); }
#line 1652 "hl/src//H5LTparse.c"
break;
case 54: /* fp_type: H5T_NATIVE_FLOAT_TOKEN */
case 53: /* fp_type: H5T_FLOAT_F4E2M1_TOKEN */
#line 169 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
#line 1661 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_FLOAT_F4E2M1); }
#line 1658 "hl/src//H5LTparse.c"
break;
case 55: /* fp_type: H5T_NATIVE_DOUBLE_TOKEN */
case 54: /* fp_type: H5T_NATIVE_FLOAT16_TOKEN */
#line 170 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
#line 1667 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT16); }
#line 1664 "hl/src//H5LTparse.c"
break;
case 56: /* fp_type: H5T_NATIVE_LDOUBLE_TOKEN */
case 55: /* fp_type: H5T_NATIVE_FLOAT_TOKEN */
#line 171 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
#line 1670 "hl/src//H5LTparse.c"
break;
case 56: /* fp_type: H5T_NATIVE_DOUBLE_TOKEN */
#line 172 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
#line 1676 "hl/src//H5LTparse.c"
break;
case 57: /* fp_type: H5T_NATIVE_LDOUBLE_TOKEN */
#line 173 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
#line 1673 "hl/src//H5LTparse.c"
#line 1682 "hl/src//H5LTparse.c"
break;
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 1679 "hl/src//H5LTparse.c"
break;
case 58: /* compound_type: H5T_COMPOUND_TOKEN $@1 '{' memb_list '}' */
case 58: /* $@1: %empty */
#line 177 "hl/src//H5LTparse.y"
{ csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
#line 1688 "hl/src//H5LTparse.c"
break;
case 59: /* compound_type: H5T_COMPOUND_TOKEN $@1 '{' memb_list '}' */
#line 179 "hl/src//H5LTparse.y"
{ (yyval.hid) = cmpd_stack[csindex].id;
cmpd_stack[csindex].id = 0;
cmpd_stack[csindex].first_memb = 1;
csindex--;
}
#line 1689 "hl/src//H5LTparse.c"
#line 1698 "hl/src//H5LTparse.c"
break;
case 61: /* $@2: %empty */
#line 186 "hl/src//H5LTparse.y"
{ cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
#line 1695 "hl/src//H5LTparse.c"
break;
case 62: /* memb_def: ddl_type $@2 field_name field_offset ';' */
case 62: /* $@2: %empty */
#line 188 "hl/src//H5LTparse.y"
{ cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
#line 1704 "hl/src//H5LTparse.c"
break;
case 63: /* memb_def: ddl_type $@2 field_name field_offset ';' */
#line 190 "hl/src//H5LTparse.y"
{
size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
@@ -1759,168 +1768,168 @@ yyreduce:
new_size = H5Tget_size(dtype_id);
}
#line 1734 "hl/src//H5LTparse.c"
#line 1743 "hl/src//H5LTparse.c"
break;
case 63: /* field_name: STRING */
#line 224 "hl/src//H5LTparse.y"
case 64: /* field_name: STRING */
#line 226 "hl/src//H5LTparse.y"
{
(yyval.sval) = strdup(yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
#line 1744 "hl/src//H5LTparse.c"
#line 1753 "hl/src//H5LTparse.c"
break;
case 64: /* field_offset: %empty */
#line 231 "hl/src//H5LTparse.y"
{ (yyval.ival) = 0; }
#line 1750 "hl/src//H5LTparse.c"
break;
case 65: /* field_offset: ':' offset */
case 65: /* field_offset: %empty */
#line 233 "hl/src//H5LTparse.y"
{ (yyval.ival) = 0; }
#line 1759 "hl/src//H5LTparse.c"
break;
case 66: /* field_offset: ':' offset */
#line 235 "hl/src//H5LTparse.y"
{ (yyval.ival) = yylval.ival; }
#line 1756 "hl/src//H5LTparse.c"
#line 1765 "hl/src//H5LTparse.c"
break;
case 67: /* $@3: %empty */
#line 237 "hl/src//H5LTparse.y"
{ asindex++; /*pushd onto the stack*/ }
#line 1762 "hl/src//H5LTparse.c"
break;
case 68: /* array_type: H5T_ARRAY_TOKEN $@3 '{' dim_list ddl_type '}' */
case 68: /* $@3: %empty */
#line 239 "hl/src//H5LTparse.y"
{ asindex++; /*pushd onto the stack*/ }
#line 1771 "hl/src//H5LTparse.c"
break;
case 69: /* array_type: H5T_ARRAY_TOKEN $@3 '{' dim_list ddl_type '}' */
#line 241 "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 1773 "hl/src//H5LTparse.c"
#line 1782 "hl/src//H5LTparse.c"
break;
case 71: /* $@4: %empty */
#line 249 "hl/src//H5LTparse.y"
case 72: /* $@4: %empty */
#line 251 "hl/src//H5LTparse.y"
{ arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
#line 1779 "hl/src//H5LTparse.c"
#line 1788 "hl/src//H5LTparse.c"
break;
case 72: /* $@5: %empty */
#line 250 "hl/src//H5LTparse.y"
case 73: /* $@5: %empty */
#line 252 "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 1789 "hl/src//H5LTparse.c"
#line 1798 "hl/src//H5LTparse.c"
break;
case 75: /* vlen_type: H5T_VLEN_TOKEN '{' ddl_type '}' */
#line 261 "hl/src//H5LTparse.y"
case 76: /* vlen_type: H5T_VLEN_TOKEN '{' ddl_type '}' */
#line 263 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1795 "hl/src//H5LTparse.c"
#line 1804 "hl/src//H5LTparse.c"
break;
case 76: /* complex_type: H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
#line 264 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT_COMPLEX); }
#line 1801 "hl/src//H5LTparse.c"
break;
case 77: /* complex_type: H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
#line 265 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE_COMPLEX); }
#line 1807 "hl/src//H5LTparse.c"
break;
case 78: /* complex_type: H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
case 77: /* complex_type: H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
#line 266 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE_COMPLEX); }
#line 1813 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT_COMPLEX); }
#line 1810 "hl/src//H5LTparse.c"
break;
case 79: /* complex_type: H5T_COMPLEX_IEEE_F16LE_TOKEN */
case 78: /* complex_type: H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
#line 267 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16LE); }
#line 1819 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE_COMPLEX); }
#line 1816 "hl/src//H5LTparse.c"
break;
case 80: /* complex_type: H5T_COMPLEX_IEEE_F16BE_TOKEN */
case 79: /* complex_type: H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
#line 268 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16BE); }
#line 1825 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE_COMPLEX); }
#line 1822 "hl/src//H5LTparse.c"
break;
case 81: /* complex_type: H5T_COMPLEX_IEEE_F32LE_TOKEN */
case 80: /* complex_type: H5T_COMPLEX_IEEE_F16LE_TOKEN */
#line 269 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32LE); }
#line 1831 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16LE); }
#line 1828 "hl/src//H5LTparse.c"
break;
case 82: /* complex_type: H5T_COMPLEX_IEEE_F32BE_TOKEN */
case 81: /* complex_type: H5T_COMPLEX_IEEE_F16BE_TOKEN */
#line 270 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32BE); }
#line 1837 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F16BE); }
#line 1834 "hl/src//H5LTparse.c"
break;
case 83: /* complex_type: H5T_COMPLEX_IEEE_F64LE_TOKEN */
case 82: /* complex_type: H5T_COMPLEX_IEEE_F32LE_TOKEN */
#line 271 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64LE); }
#line 1843 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32LE); }
#line 1840 "hl/src//H5LTparse.c"
break;
case 84: /* complex_type: H5T_COMPLEX_IEEE_F64BE_TOKEN */
case 83: /* complex_type: H5T_COMPLEX_IEEE_F32BE_TOKEN */
#line 272 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64BE); }
#line 1849 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F32BE); }
#line 1846 "hl/src//H5LTparse.c"
break;
case 85: /* complex_type: H5T_COMPLEX_TOKEN '{' ddl_type '}' */
case 84: /* complex_type: H5T_COMPLEX_IEEE_F64LE_TOKEN */
#line 273 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64LE); }
#line 1852 "hl/src//H5LTparse.c"
break;
case 85: /* complex_type: H5T_COMPLEX_IEEE_F64BE_TOKEN */
#line 274 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcomplex_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1855 "hl/src//H5LTparse.c"
{ (yyval.hid) = H5Tcopy(H5T_COMPLEX_IEEE_F64BE); }
#line 1858 "hl/src//H5LTparse.c"
break;
case 86: /* @6: %empty */
#line 280 "hl/src//H5LTparse.y"
case 86: /* complex_type: H5T_COMPLEX_TOKEN '{' ddl_type '}' */
#line 276 "hl/src//H5LTparse.y"
{ (yyval.hid) = H5Tcomplex_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 1864 "hl/src//H5LTparse.c"
break;
case 87: /* @6: %empty */
#line 282 "hl/src//H5LTparse.y"
{
size_t size = (size_t)yylval.ival;
(yyval.hid) = H5Tcreate(H5T_OPAQUE, size);
}
#line 1864 "hl/src//H5LTparse.c"
#line 1873 "hl/src//H5LTparse.c"
break;
case 87: /* $@7: %empty */
#line 285 "hl/src//H5LTparse.y"
case 88: /* $@7: %empty */
#line 287 "hl/src//H5LTparse.y"
{
H5Tset_tag((yyvsp[-3].hid), yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
#line 1874 "hl/src//H5LTparse.c"
#line 1883 "hl/src//H5LTparse.c"
break;
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"
case 89: /* opaque_type: H5T_OPAQUE_TOKEN '{' OPQ_SIZE_TOKEN opaque_size ';' @6 OPQ_TAG_TOKEN opaque_tag ';' $@7 '}' */
#line 292 "hl/src//H5LTparse.y"
{ (yyval.hid) = (yyvsp[-5].hid); }
#line 1880 "hl/src//H5LTparse.c"
#line 1889 "hl/src//H5LTparse.c"
break;
case 91: /* $@8: %empty */
#line 299 "hl/src//H5LTparse.y"
case 92: /* $@8: %empty */
#line 301 "hl/src//H5LTparse.y"
{
if((yyvsp[-1].ival) == H5T_VARIABLE_TOKEN)
is_variable = 1;
else
str_size = yylval.ival;
}
#line 1891 "hl/src//H5LTparse.c"
#line 1900 "hl/src//H5LTparse.c"
break;
case 92: /* $@9: %empty */
#line 306 "hl/src//H5LTparse.y"
case 93: /* $@9: %empty */
#line 308 "hl/src//H5LTparse.y"
{
if((yyvsp[-1].ival) == H5T_STR_NULLTERM_TOKEN)
str_pad = H5T_STR_NULLTERM;
@@ -1929,33 +1938,33 @@ yyreduce:
else if((yyvsp[-1].ival) == H5T_STR_SPACEPAD_TOKEN)
str_pad = H5T_STR_SPACEPAD;
}
#line 1904 "hl/src//H5LTparse.c"
#line 1913 "hl/src//H5LTparse.c"
break;
case 93: /* $@10: %empty */
#line 315 "hl/src//H5LTparse.y"
case 94: /* $@10: %empty */
#line 317 "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 1915 "hl/src//H5LTparse.c"
#line 1924 "hl/src//H5LTparse.c"
break;
case 94: /* @11: %empty */
#line 322 "hl/src//H5LTparse.y"
case 95: /* @11: %empty */
#line 324 "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 1926 "hl/src//H5LTparse.c"
#line 1935 "hl/src//H5LTparse.c"
break;
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"
case 96: /* string_type: H5T_STRING_TOKEN '{' STRSIZE_TOKEN strsize ';' $@8 STRPAD_TOKEN strpad ';' $@9 CSET_TOKEN cset ';' $@10 CTYPE_TOKEN ctype ';' @11 '}' */
#line 331 "hl/src//H5LTparse.y"
{
hid_t str_id = (yyvsp[-1].hid);
@@ -1972,82 +1981,82 @@ yyreduce:
(yyval.hid) = str_id;
}
#line 1947 "hl/src//H5LTparse.c"
#line 1956 "hl/src//H5LTparse.c"
break;
case 96: /* strsize: H5T_VARIABLE_TOKEN */
#line 346 "hl/src//H5LTparse.y"
case 97: /* strsize: H5T_VARIABLE_TOKEN */
#line 348 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_VARIABLE_TOKEN;}
#line 1953 "hl/src//H5LTparse.c"
#line 1962 "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 1959 "hl/src//H5LTparse.c"
break;
case 99: /* strpad: H5T_STR_NULLPAD_TOKEN */
#line 350 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
#line 1965 "hl/src//H5LTparse.c"
break;
case 100: /* strpad: H5T_STR_SPACEPAD_TOKEN */
case 99: /* strpad: H5T_STR_NULLTERM_TOKEN */
#line 351 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
#line 1971 "hl/src//H5LTparse.c"
{(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
#line 1968 "hl/src//H5LTparse.c"
break;
case 101: /* cset: H5T_CSET_ASCII_TOKEN */
case 100: /* strpad: H5T_STR_NULLPAD_TOKEN */
#line 352 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
#line 1974 "hl/src//H5LTparse.c"
break;
case 101: /* strpad: H5T_STR_SPACEPAD_TOKEN */
#line 353 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
#line 1980 "hl/src//H5LTparse.c"
break;
case 102: /* cset: H5T_CSET_ASCII_TOKEN */
#line 355 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
#line 1977 "hl/src//H5LTparse.c"
#line 1986 "hl/src//H5LTparse.c"
break;
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 */
case 103: /* cset: H5T_CSET_UTF8_TOKEN */
#line 356 "hl/src//H5LTparse.y"
{(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
#line 1992 "hl/src//H5LTparse.c"
break;
case 104: /* ctype: H5T_C_S1_TOKEN */
#line 358 "hl/src//H5LTparse.y"
{(yyval.hid) = H5T_C_S1_TOKEN;}
#line 1989 "hl/src//H5LTparse.c"
#line 1998 "hl/src//H5LTparse.c"
break;
case 104: /* ctype: H5T_FORTRAN_S1_TOKEN */
#line 357 "hl/src//H5LTparse.y"
case 105: /* ctype: H5T_FORTRAN_S1_TOKEN */
#line 359 "hl/src//H5LTparse.y"
{(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
#line 1995 "hl/src//H5LTparse.c"
#line 2004 "hl/src//H5LTparse.c"
break;
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 2001 "hl/src//H5LTparse.c"
break;
case 106: /* enum_type: H5T_ENUM_TOKEN '{' integer_type ';' $@12 enum_list '}' */
case 106: /* $@12: %empty */
#line 363 "hl/src//H5LTparse.y"
{ is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
#line 2007 "hl/src//H5LTparse.c"
{ is_enum = 1; enum_id = H5Tenum_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
#line 2010 "hl/src//H5LTparse.c"
break;
case 109: /* $@13: %empty */
#line 368 "hl/src//H5LTparse.y"
case 107: /* enum_type: H5T_ENUM_TOKEN '{' integer_type ';' $@12 enum_list '}' */
#line 365 "hl/src//H5LTparse.y"
{ is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
#line 2016 "hl/src//H5LTparse.c"
break;
case 110: /* $@13: %empty */
#line 370 "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 2018 "hl/src//H5LTparse.c"
#line 2027 "hl/src//H5LTparse.c"
break;
case 110: /* enum_def: enum_symbol $@13 enum_val ';' */
#line 375 "hl/src//H5LTparse.y"
case 111: /* enum_def: enum_symbol $@13 enum_val ';' */
#line 377 "hl/src//H5LTparse.y"
{
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
@@ -2090,11 +2099,11 @@ yyreduce:
H5Tclose(super);
H5Tclose(native);
}
#line 2065 "hl/src//H5LTparse.c"
#line 2074 "hl/src//H5LTparse.c"
break;
#line 2069 "hl/src//H5LTparse.c"
#line 2078 "hl/src//H5LTparse.c"
default: break;
}
+38 -37
View File
@@ -93,42 +93,43 @@ extern int H5LTyydebug;
H5T_FLOAT_F8E5M2_TOKEN = 294, /* H5T_FLOAT_F8E5M2_TOKEN */
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 */
H5T_FLOAT_F4E2M1_TOKEN = 297, /* H5T_FLOAT_F4E2M1_TOKEN */
H5T_NATIVE_FLOAT16_TOKEN = 298, /* H5T_NATIVE_FLOAT16_TOKEN */
H5T_NATIVE_FLOAT_TOKEN = 299, /* H5T_NATIVE_FLOAT_TOKEN */
H5T_NATIVE_DOUBLE_TOKEN = 300, /* H5T_NATIVE_DOUBLE_TOKEN */
H5T_NATIVE_LDOUBLE_TOKEN = 301, /* H5T_NATIVE_LDOUBLE_TOKEN */
H5T_COMPLEX_IEEE_F16BE_TOKEN = 302, /* H5T_COMPLEX_IEEE_F16BE_TOKEN */
H5T_COMPLEX_IEEE_F16LE_TOKEN = 303, /* H5T_COMPLEX_IEEE_F16LE_TOKEN */
H5T_COMPLEX_IEEE_F32BE_TOKEN = 304, /* H5T_COMPLEX_IEEE_F32BE_TOKEN */
H5T_COMPLEX_IEEE_F32LE_TOKEN = 305, /* H5T_COMPLEX_IEEE_F32LE_TOKEN */
H5T_COMPLEX_IEEE_F64BE_TOKEN = 306, /* H5T_COMPLEX_IEEE_F64BE_TOKEN */
H5T_COMPLEX_IEEE_F64LE_TOKEN = 307, /* H5T_COMPLEX_IEEE_F64LE_TOKEN */
H5T_NATIVE_FLOAT_COMPLEX_TOKEN = 308, /* H5T_NATIVE_FLOAT_COMPLEX_TOKEN */
H5T_NATIVE_DOUBLE_COMPLEX_TOKEN = 309, /* H5T_NATIVE_DOUBLE_COMPLEX_TOKEN */
H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN = 310, /* H5T_NATIVE_LDOUBLE_COMPLEX_TOKEN */
H5T_STRING_TOKEN = 311, /* H5T_STRING_TOKEN */
STRSIZE_TOKEN = 312, /* STRSIZE_TOKEN */
STRPAD_TOKEN = 313, /* STRPAD_TOKEN */
CSET_TOKEN = 314, /* CSET_TOKEN */
CTYPE_TOKEN = 315, /* CTYPE_TOKEN */
H5T_VARIABLE_TOKEN = 316, /* H5T_VARIABLE_TOKEN */
H5T_STR_NULLTERM_TOKEN = 317, /* H5T_STR_NULLTERM_TOKEN */
H5T_STR_NULLPAD_TOKEN = 318, /* H5T_STR_NULLPAD_TOKEN */
H5T_STR_SPACEPAD_TOKEN = 319, /* H5T_STR_SPACEPAD_TOKEN */
H5T_CSET_ASCII_TOKEN = 320, /* H5T_CSET_ASCII_TOKEN */
H5T_CSET_UTF8_TOKEN = 321, /* H5T_CSET_UTF8_TOKEN */
H5T_C_S1_TOKEN = 322, /* H5T_C_S1_TOKEN */
H5T_FORTRAN_S1_TOKEN = 323, /* H5T_FORTRAN_S1_TOKEN */
H5T_OPAQUE_TOKEN = 324, /* H5T_OPAQUE_TOKEN */
OPQ_SIZE_TOKEN = 325, /* OPQ_SIZE_TOKEN */
OPQ_TAG_TOKEN = 326, /* OPQ_TAG_TOKEN */
H5T_COMPOUND_TOKEN = 327, /* H5T_COMPOUND_TOKEN */
H5T_ENUM_TOKEN = 328, /* H5T_ENUM_TOKEN */
H5T_ARRAY_TOKEN = 329, /* H5T_ARRAY_TOKEN */
H5T_VLEN_TOKEN = 330, /* H5T_VLEN_TOKEN */
H5T_COMPLEX_TOKEN = 331, /* H5T_COMPLEX_TOKEN */
STRING = 332, /* STRING */
NUMBER = 333 /* NUMBER */
};
typedef enum yytokentype yytoken_kind_t;
#endif
@@ -143,7 +144,7 @@ union YYSTYPE
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
#line 147 "hl/src//H5LTparse.h"
#line 148 "hl/src//H5LTparse.h"
};
typedef union YYSTYPE YYSTYPE;
+2
View File
@@ -84,6 +84,7 @@ static char* enum_memb_symbol; /*enum member symbol string*/
%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_FLOAT_F4E2M1_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
@@ -165,6 +166,7 @@ fp_type : H5T_IEEE_F16BE_TOKEN { $<hid>$ = H5Tcopy(H5T_IEEE_F16BE)
| 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_FLOAT_F4E2M1_TOKEN { $<hid>$ = H5Tcopy(H5T_FLOAT_F4E2M1); }
| 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); }
+7
View File
@@ -1235,6 +1235,13 @@ test_fps(void)
if (H5Tclose(dtype) < 0)
goto out;
if ((dtype = H5LTtext_to_dtype("H5T_FLOAT_F4E2M1\n", H5LT_DDL)) < 0)
goto out;
if (!H5Tequal(dtype, H5T_FLOAT_F4E2M1))
goto out;
if (H5Tclose(dtype) < 0)
goto out;
PASSED();
return 0;
@@ -1133,6 +1133,8 @@ public class HDF5Constants {
/** */
public static final long H5T_FLOAT_F6E3M2 = H5T_FLOAT_F6E3M2();
/** */
public static final long H5T_FLOAT_F4E2M1 = H5T_FLOAT_F4E2M1();
/** */
public static final int H5T_INTEGER = H5T_INTEGER();
/** */
public static final long H5T_INTEL_B16 = H5T_INTEL_B16();
@@ -2656,6 +2658,8 @@ public class HDF5Constants {
private static native final long H5T_FLOAT_F6E3M2();
private static native final long H5T_FLOAT_F4E2M1();
private static native final int H5T_INTEGER();
private static native final long H5T_INTEL_B16();
+5
View File
@@ -2766,6 +2766,11 @@ Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F6E3M2(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F6E3M2;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F4E2M1(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F4E2M1;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEGER(JNIEnv *env, jclass cls)
{
+8
View File
@@ -2175,6 +2175,8 @@ h5str_get_little_endian_type(hid_t tid)
p_type = H5Tcopy(H5T_FLOAT_F6E2M3);
else if (true == H5Tequal(tid, H5T_FLOAT_F6E3M2))
p_type = H5Tcopy(H5T_FLOAT_F6E3M2);
else if (true == H5Tequal(tid, H5T_FLOAT_F4E2M1))
p_type = H5Tcopy(H5T_FLOAT_F4E2M1);
}
else if (size == 2) {
if (true == H5Tequal(tid, H5T_IEEE_F16LE) || true == H5Tequal(tid, H5T_IEEE_F16BE))
@@ -2310,6 +2312,12 @@ h5str_get_big_endian_type(hid_t tid)
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);
}
else if (true == H5Tequal(tid, H5T_FLOAT_F4E2M1)) {
p_type = H5Tcopy(H5T_FLOAT_F4E2M1);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
+15
View File
@@ -71,6 +71,20 @@ We would like to thank the many HDF5 community members who contributed to HDF5 2
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.
### Added predefined datatype for FP4 data
A predefined datatype has been added for FP4 data in E2M1 format (https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf).
The following new macro has been added:
- H5T_FLOAT_F4E2M1
This macro maps to the ID of an HDF5 datatype representing a 4-bit floating-point datatype with 1 sign bit, 2 exponent bits and 1 mantissa bit.
Note that support for a native FP4 datatype has not been added yet. This means that any datatype conversions to/from the new FP4 datatype will be emulated in software rather than potentially using specialized hardware instructions. Until support for a native FP4 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 the above floating-point format. In this case, the application can specify the above macro 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
@@ -141,6 +155,7 @@ Current test results are available [here](https://my.cdash.org/index.php?project
H5T_FLOAT_F8E5M2
H5T_FLOAT_F6E2M3
H5T_FLOAT_F6E3M2
H5T_FLOAT_F4E2M1
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.
+20
View File
@@ -225,6 +225,21 @@
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \
}
/* Define the code templates for standard FP4 E2M1 4-bit floats for the "GUTS" in the H5T_INIT_TYPE macro */
#define H5T_INIT_TYPE_FLOAT4E2M1_CORE \
{ \
H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_LE) /* Simply pick LE here */ \
dt->shared->u.atomic.prec = 4; \
dt->shared->u.atomic.u.f.sign = 3; \
dt->shared->u.atomic.u.f.epos = 1; \
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 = 1; \
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) \
{ \
@@ -521,6 +536,7 @@ 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_FLOAT_F4E2M1_g = H5I_INVALID_HID;
hid_t H5T_COMPLEX_IEEE_F16BE_g = H5I_INVALID_HID;
hid_t H5T_COMPLEX_IEEE_F16LE_g = H5I_INVALID_HID;
@@ -1199,6 +1215,9 @@ H5T__init_package(void)
/* 6-bit FP6 E3M2 float type */
H5T_INIT_TYPE(FLOAT6E3M2, H5T_FLOAT_F6E3M2_g, COPY, native_double, SET, 1)
/* 4-bit FP4 E2M1 float type */
H5T_INIT_TYPE(FLOAT4E2M1, H5T_FLOAT_F4E2M1_g, COPY, native_double, SET, 1)
/*------------------------------------------------------------
* VAX Types
*------------------------------------------------------------
@@ -2300,6 +2319,7 @@ H5T_top_term_package(void)
H5T_FLOAT_F8E5M2_g = H5I_INVALID_HID;
H5T_FLOAT_F6E2M3_g = H5I_INVALID_HID;
H5T_FLOAT_F6E3M2_g = H5I_INVALID_HID;
H5T_FLOAT_F4E2M1_g = H5I_INVALID_HID;
H5T_COMPLEX_IEEE_F16BE_g = H5I_INVALID_HID;
H5T_COMPLEX_IEEE_F16LE_g = H5I_INVALID_HID;
+3 -2
View File
@@ -4012,8 +4012,9 @@ filled according to the value of this property. The padding can be:
* 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
* H5T_FLOAT_F4E2M1 | H5T_NATIVE_FLOAT16 |
* H5T_NATIVE_FLOAT | H5T_NATIVE_DOUBLE |
* H5T_NATIVE_LDOUBLE
*
* <time> ::= H5T_TIME: not yet implemented
*
+10 -2
View File
@@ -742,6 +742,7 @@ H5T__get_native_float(const H5T_t *dtype, H5T_direction_t direction, size_t *str
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 */
H5T_t *f4_e2m1_dt = NULL; /* Datatype for FP4 E2M1 */
if (NULL == (f8_e4m3_dt = H5I_object(H5T_FLOAT_F8E4M3)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
@@ -751,9 +752,12 @@ H5T__get_native_float(const H5T_t *dtype, H5T_direction_t direction, size_t *str
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 (NULL == (f4_e2m1_dt = H5I_object(H5T_FLOAT_F4E2M1)))
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) ||
0 == H5T_cmp(dtype, f6_e2m3_dt, false) || 0 == H5T_cmp(dtype, f6_e3m2_dt, false)) {
0 == H5T_cmp(dtype, f6_e2m3_dt, false) || 0 == H5T_cmp(dtype, f6_e3m2_dt, false) ||
0 == H5T_cmp(dtype, f4_e2m1_dt, false)) {
match = H5T_NATIVE_FLOAT_MATCH_FLOAT16;
native_size = sizeof(H5__Float16);
}
@@ -867,6 +871,7 @@ H5T__get_native_float(const H5T_t *dtype, H5T_direction_t direction, size_t *str
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 */
H5T_t *f4_e2m1_dt = NULL; /* Datatype for FP4 E2M1 */
if (NULL == (f8_e4m3_dt = H5I_object(H5T_FLOAT_F8E4M3)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
@@ -876,9 +881,12 @@ H5T__get_native_float(const H5T_t *dtype, H5T_direction_t direction, size_t *str
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 (NULL == (f4_e2m1_dt = H5I_object(H5T_FLOAT_F4E2M1)))
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) ||
0 == H5T_cmp(dtype, f6_e2m3_dt, false) || 0 == H5T_cmp(dtype, f6_e3m2_dt, false)) {
0 == H5T_cmp(dtype, f6_e2m3_dt, false) || 0 == H5T_cmp(dtype, f6_e3m2_dt, false) ||
0 == H5T_cmp(dtype, f4_e2m1_dt, false)) {
match = H5T_NATIVE_FLOAT_MATCH_FLOAT16;
native_size = sizeof(H5__Float16);
}
+17
View File
@@ -365,12 +365,29 @@ H5_DLLVAR hid_t H5T_IEEE_F64LE_g;
* \endparblock
*/
#define H5T_FLOAT_F6E3M2 (H5OPEN H5T_FLOAT_F6E3M2_g)
/**
* \ingroup PDTALTFLOAT
* 4-bit FP4 E2M1 (2 exponent bits, 1 mantissa bit) 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 FP4 E2M1 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 FP4 E2M1 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_F4E2M1 (H5OPEN H5T_FLOAT_F4E2M1_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;
H5_DLLVAR hid_t H5T_FLOAT_F4E2M1_g;
/*
* Complex number types made up of IEEE floating point types
+2
View File
@@ -1699,6 +1699,8 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
H5RS_acat(rs, "H5T_FLOAT_F6E2M3");
else if (obj == H5T_FLOAT_F6E3M2_g)
H5RS_acat(rs, "H5T_FLOAT_F6E3M2");
else if (obj == H5T_FLOAT_F4E2M1_g)
H5RS_acat(rs, "H5T_FLOAT_F4E2M1");
else if (obj == H5T_COMPLEX_IEEE_F16BE_g)
H5RS_acat(rs, "H5T_COMPLEX_IEEE_F16BE");
else if (obj == H5T_COMPLEX_IEEE_F16LE_g)
+2 -2
View File
@@ -1219,8 +1219,8 @@ test_create_dataset_predefined_types(void H5_ATTR_UNUSED *params)
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_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};
H5T_FLOAT_F4E2M1, 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");
+4 -1
View File
@@ -44,7 +44,7 @@
/* The number of predefined floating point types in HDF5
*/
#define NUM_PREDEFINED_FLOAT_TYPES 12
#define NUM_PREDEFINED_FLOAT_TYPES 13
/* The number of predefined complex number types in HDF5
*/
@@ -339,6 +339,9 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_
case 11:
type_to_copy = H5T_FLOAT_F6E3M2;
break;
case 12:
type_to_copy = H5T_FLOAT_F4E2M1;
break;
default:
printf(" invalid value for floating point type; should not happen\n");
+267 -4
View File
@@ -74,10 +74,10 @@
} \
} while (0)
static const char *FILENAME[] = {"dtypes0", "dtypes1", "dtypes2", "dtypes3", "dtypes4",
"dtypes5", "dtypes6", "dtypes7", "dtypes8", "dtypes9",
"dtypes10", "dtypes11", "dtypes12", "dtypes13", "dtypes14",
"dtypes15", "dtypes16", "dtypes17", "dtypes18", NULL};
static const char *FILENAME[] = {"dtypes0", "dtypes1", "dtypes2", "dtypes3", "dtypes4", "dtypes5",
"dtypes6", "dtypes7", "dtypes8", "dtypes9", "dtypes10", "dtypes11",
"dtypes12", "dtypes13", "dtypes14", "dtypes15", "dtypes16", "dtypes17",
"dtypes18", "dtypes19", NULL};
#define TESTFILE "bad_compound.h5"
@@ -8007,6 +8007,268 @@ error:
return 1;
}
/*-------------------------------------------------------------------------
* Function: test_fp4
*
* Purpose: Tests the FP4 datatype.
*
* Return: Success: 0
* Failure: number of errors
*-------------------------------------------------------------------------
*/
static int
test_fp4(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("FP4 datatypes");
/* Check characteristics of the predefined type */
if ((type_class = H5Tget_class(H5T_FLOAT_F4E2M1)) < 0) {
H5_FAILED();
printf("Couldn't get datatype class for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (H5T_FLOAT != type_class) {
H5_FAILED();
printf("Datatype class for H5T_FLOAT_F4E2M1 wasn't H5T_FLOAT\n");
goto error;
}
if ((type_size = H5Tget_size(H5T_FLOAT_F4E2M1)) == 0) {
H5_FAILED();
printf("Couldn't get datatype size for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (type_size != 1) {
H5_FAILED();
printf("Datatype size for H5T_FLOAT_F4E2M1 was incorrect (expected 1, got %zu)\n", type_size);
goto error;
}
if ((type_order = H5Tget_order(H5T_FLOAT_F4E2M1)) < 0) {
H5_FAILED();
printf("Couldn't get datatype order for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (type_order != H5T_ORDER_LE) {
H5_FAILED();
printf("Datatype order for H5T_FLOAT_F4E2M1 wasn't H5T_ORDER_LE\n");
goto error;
}
if ((type_prec = H5Tget_precision(H5T_FLOAT_F4E2M1)) == 0) {
H5_FAILED();
printf("Couldn't get datatype precision for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (type_prec != 4) {
H5_FAILED();
printf("Datatype precision for H5T_FLOAT_F4E2M1 was incorrect (expected 4, got %zu)\n", type_prec);
goto error;
}
if ((type_offset = H5Tget_offset(H5T_FLOAT_F4E2M1)) < 0) {
H5_FAILED();
printf("Couldn't get datatype offset for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (type_offset != 0) {
H5_FAILED();
printf("Datatype offset for H5T_FLOAT_F4E2M1 was incorrect (expected 0, got %d)\n", type_offset);
goto error;
}
if (H5Tget_pad(H5T_FLOAT_F4E2M1, &lsb_pad, &msb_pad) < 0) {
H5_FAILED();
printf("Couldn't get datatype padding type for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (lsb_pad != H5T_PAD_ZERO || msb_pad != H5T_PAD_ZERO) {
H5_FAILED();
printf("Datatype padding type for H5T_FLOAT_F4E2M1 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_F4E2M1, &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_F4E2M1\n");
goto error;
}
if (sign_pos != 3 || expo_pos != 1 || mant_pos != 0 || expo_size != 2 || mant_size != 1) {
H5_FAILED();
printf("H5T_FLOAT_F4E2M1 didn't match FP4 E2M1 specification "
"(expected spos=3, epos=1, esize=2, mpos=0, msize=1, "
"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_F4E2M1)) == 0) {
H5_FAILED();
printf("Couldn't get datatype exponent bias for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (expo_bias != 1) {
H5_FAILED();
printf("Datatype exponent bias for H5T_FLOAT_F4E2M1 was incorrect (expected 1, got %zu)\n",
expo_bias);
goto error;
}
if ((type_norm = H5Tget_norm(H5T_FLOAT_F4E2M1)) < 0) {
H5_FAILED();
printf("Couldn't get datatype mantissa normalization type for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (type_norm != H5T_NORM_IMPLIED) {
H5_FAILED();
printf("Datatype mantissa normalization type for H5T_FLOAT_F4E2M1 wasn't H5T_NORM_IMPLIED\n");
goto error;
}
if ((inpad = H5Tget_inpad(H5T_FLOAT_F4E2M1)) < 0) {
H5_FAILED();
printf("Couldn't get datatype unused bits padding type for H5T_FLOAT_F4E2M1\n");
goto error;
}
if (inpad != H5T_PAD_ZERO) {
H5_FAILED();
printf("Datatype unused bits padding type for H5T_FLOAT_F4E2M1 was incorrect (expected H5T_PAD_ZERO, "
"got pad type %d)\n",
inpad);
goto error;
}
/*
* Ensure that some random conversions on the FP4 datatype
* are currently covered by general software routines rather
* than compiler conversions.
*/
if (H5Tcompiler_conv(H5T_FLOAT_F4E2M1, H5T_IEEE_F16LE) != false) {
H5_FAILED();
printf("Conversion path for H5T_FLOAT_F4E2M1 -> H5T_IEEE_F16LE was not a software conversion\n");
goto error;
}
if (H5Tcompiler_conv(H5T_FLOAT_F4E2M1, H5T_NATIVE_INT) != false) {
H5_FAILED();
printf("Conversion path for H5T_FLOAT_F4E2M1 -> H5T_NATIVE_INT was not a software conversion\n");
goto error;
}
/*
* Create datasets with the FP4 datatype and check the dataset raw data storage size
*/
h5_fixname(FILENAME[19], 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, "DatasetE2M1", H5T_FLOAT_F4E2M1, 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
*
@@ -14209,6 +14471,7 @@ main(void)
nerrors += test_bfloat16();
nerrors += test_fp8();
nerrors += test_fp6();
nerrors += test_fp4();
nerrors += test_complex_type();
#ifdef H5_HAVE_COMPLEX_NUMBERS
nerrors += test_complex_type_conv_funcs();
+57
View File
@@ -3380,6 +3380,62 @@ error:
return -1;
}
static herr_t
test_fp4(void)
{
hid_t native_type = H5I_INVALID_HID;
TESTING("FP4 datatypes");
/*
* Just ensure that the FP4 types are currently promoted
* to either float16 or float, depending on whether float16
* support is enabled. Until native support is added for a
* FP4 type, conversion from FP4 to float16 should be fine.
*/
if ((native_type = H5Tget_native_type(H5T_FLOAT_F4E2M1, 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_F4E2M1, 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)
@@ -3561,6 +3617,7 @@ main(void)
nerrors += test_bfloat16() < 0 ? 1 : 0;
nerrors += test_fp8() < 0 ? 1 : 0;
nerrors += test_fp6() < 0 ? 1 : 0;
nerrors += test_fp4() < 0 ? 1 : 0;
#ifdef H5_HAVE_COMPLEX_NUMBERS
nerrors += test_complex(file) < 0 ? 1 : 0;
+2
View File
@@ -144,6 +144,8 @@ print_type(hid_t type)
parallel_print("H5T_FLOAT_F6E2M3");
else if (H5Tequal(type, H5T_FLOAT_F6E3M2))
parallel_print("H5T_FLOAT_F6E3M2");
else if (H5Tequal(type, H5T_FLOAT_F4E2M1))
parallel_print("H5T_FLOAT_F4E2M1");
#ifdef H5_HAVE__FLOAT16
else if (H5Tequal(type, H5T_NATIVE_FLOAT16))
parallel_print("H5T_NATIVE_FLOAT16");
+2
View File
@@ -2220,6 +2220,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
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_FLOAT_F4E2M1) == true)
h5tools_str_append(buffer, "H5T_FLOAT_F4E2M1");
else if (H5Tequal(type, H5T_VAX_F32) == true)
h5tools_str_append(buffer, "H5T_VAX_F32");
else if (H5Tequal(type, H5T_VAX_F64) == true)
+8
View File
@@ -64,6 +64,8 @@ h5tools_get_little_endian_type(hid_t tid)
p_type = H5Tcopy(H5T_FLOAT_F6E2M3);
else if (true == H5Tequal(tid, H5T_FLOAT_F6E3M2))
p_type = H5Tcopy(H5T_FLOAT_F6E3M2);
else if (true == H5Tequal(tid, H5T_FLOAT_F4E2M1))
p_type = H5Tcopy(H5T_FLOAT_F4E2M1);
}
else if (size == 2) {
if (true == H5Tequal(tid, H5T_IEEE_F16LE) || true == H5Tequal(tid, H5T_IEEE_F16BE))
@@ -182,6 +184,12 @@ h5tools_get_big_endian_type(hid_t tid)
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);
}
else if (true == H5Tequal(tid, H5T_FLOAT_F4E2M1)) {
p_type = H5Tcopy(H5T_FLOAT_F4E2M1);
/* Though not very useful, set order to BE as expected */
H5Tset_order(p_type, H5T_ORDER_BE);
}
+54
View File
@@ -3367,6 +3367,27 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
else if (!strcmp(buffer, "H5T_FLOAT_F4E2M1")) {
in->inputSize = 4;
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;
@@ -4224,6 +4245,25 @@ createOutputDataType(struct Input *in)
case 8:
switch (in->outputSize) {
case 4:
switch (in->outputByteOrder) {
case -1:
case 0:
new_type = H5Tcopy(H5T_FLOAT_F4E2M1);
/* 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_F4E2M1);
break;
default:
(void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 6:
/*
* NOTE: h5import does not currently have a way to specify
@@ -4679,6 +4719,20 @@ createInputDataType(struct Input *in)
case 8:
switch (in->inputSize) {
case 4:
switch (in->outputByteOrder) {
case -1:
case 0:
case 1:
new_type = H5Tcopy(H5T_FLOAT_F4E2M1);
break;
default:
(void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 6:
/*
* NOTE: h5import does not currently have a way to specify
+3
View File
@@ -617,6 +617,9 @@ print_specific_float_type(h5tools_str_t *buffer, hid_t type, int ind)
else if (H5Tequal(type, H5T_FLOAT_F6E3M2) == true) {
h5tools_str_append(buffer, "FP6 E3M2 6-bit float");
}
else if (H5Tequal(type, H5T_FLOAT_F4E2M1) == true) {
h5tools_str_append(buffer, "FP4 E2M1 4-bit float");
}
else {
return print_float_type(buffer, type, ind);
}
+11
View File
@@ -119,6 +119,7 @@ set (HDF5_REFERENCE_FILES
tfill.ddl
tfletcher32.ddl
tfloatsattrs.ddl
tfloat4.ddl
tfloat6.ddl
tfloat8.ddl
tfloat16.ddl
@@ -315,6 +316,7 @@ set (HDF5_REFERENCE_TEST_FILES
tfcontents2.h5
tfilters.h5
tfloatsattrs.h5
tfloat4.h5
tfloat6.h5
tfloat8.h5
tfloat16.h5
@@ -1340,6 +1342,15 @@ ADD_H5_TEST (tfloat6 RESULT_CODE 0 --enable-error-stack -A 0 -d /DS6BITSE2M3
-d /DS6BITSE3M2_ALLVALS --start="0,0" --stride="1,1" --count="7,1" --block="1,8"
-d /DS6BITSE3M2_ALLVALS_CONVERT TARGET_FILE tfloat6.h5)
# Add test for FP4 type - 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 (tfloat4 RESULT_CODE 0 --enable-error-stack -A 0 -d /DS4BITSE2M1
-d /DS4BITSE2M1_ALLVALS --start="0,0" --stride="1,1" --count="1,1" --block="2,6"
-d /DS4BITSE2M1_ALLVALS_CONVERT TARGET_FILE tfloat4.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.
+46
View File
@@ -0,0 +1,46 @@
HDF5 "tfloat4.h5" {
DATASET "/DS4BITSE2M1" {
DATATYPE H5T_FLOAT_F4E2M1
DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
DATA {
(0,0): inf, 0.5, 1, 1.5, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(0,15): inf,
(1,0): inf, 0.5, 1, 1.5, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(1,15): inf,
(2,0): inf, 0.5, 1, 1.5, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(2,15): inf,
(3,0): inf, 0.5, 1, 1.5, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(3,15): inf,
(4,0): inf, 0.5, 1.5, 2, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(4,15): inf,
(5,0): inf, 0.5, 1.5, 2, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(5,15): inf,
(6,0): inf, 0.5, 1.5, 2, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(6,15): inf,
(7,0): inf, 0.5, 1.5, 2, 2, 3, 3, 3, inf, inf, inf, inf, inf, inf, inf,
(7,15): inf
}
}
DATASET "/DS4BITSE2M1_ALLVALS" {
DATATYPE H5T_FLOAT_F4E2M1
DATASPACE SIMPLE { ( 2, 8 ) / ( 2, 8 ) }
SUBSET {
START ( 0, 0 );
STRIDE ( 1, 1 );
COUNT ( 1, 1 );
BLOCK ( 2, 6 );
DATA {
(0,0): 0, 0.5, 1, 1.5, 2, 3,
(1,0): -0, -0.5, -1, -1.5, -2, -3
}
}
}
DATASET "/DS4BITSE2M1_ALLVALS_CONVERT" {
DATATYPE H5T_FLOAT_F4E2M1
DATASPACE SIMPLE { ( 2, 8 ) / ( 2, 8 ) }
DATA {
(0,0): 0, 0.5, 1, 1.5, 2, 3, inf, inf,
(1,0): -0, -0.5, -1, -1.5, -2, -3, -inf, -inf
}
}
}
+180
View File
@@ -134,6 +134,7 @@
#define FILE109 "tvms.h5"
#define FILE110 "tfloat8.h5"
#define FILE111 "tfloat6.h5"
#define FILE112 "tfloat4.h5"
#define ONION_TEST_FIXNAME_SIZE 1024
#define ONION_TEST_PAGE_SIZE (uint32_t)32
@@ -474,6 +475,13 @@ typedef struct s1_t {
#define F111_DATASET5 "DS6BITSE2M3_ALLVALS_CONVERT"
#define F111_DATASET6 "DS6BITSE3M2_ALLVALS_CONVERT"
/* "FILE112" macros */
#define F112_XDIM 8
#define F112_YDIM 16
#define F112_DATASET "DS4BITSE2M1"
#define F112_DATASET2 "DS4BITSE2M1_ALLVALS"
#define F112_DATASET3 "DS4BITSE2M1_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.
@@ -573,6 +581,13 @@ static float fp6_e3m2_vals[64] = {
-7.0f, -8.0f, -10.0f, -12.0f, -14.0f, -16.0f, -20.0f, -24.0f, -28.0f,
};
/* Since there are only 16 FP4 values, it's simple enough to
* list them all here for reference when checking to make sure
* the datatypes are represented correctly.
*/
static float fp4_e2m1_vals[16] = {0.0f, 0.5f, 1.0f, 1.5f, 2.0f, 3.0f, 4.0f, 6.0f,
-0.0f, -0.5f, -1.0f, -1.5f, -2.0f, -3.0f, -4.0f, -6.0f};
void
gent_group(void)
{
@@ -14999,3 +15014,168 @@ error:
}
H5E_END_TRY;
}
void
gent_float4(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 FP4
* 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 FP4 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 FP4 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
* FP4 values display correctly. Other tests ensure that the
* FP4 types are in the correct format.
*/
struct {
float arr[F112_XDIM][F112_YDIM];
} *dset4;
float *aset4 = NULL;
float val;
uint8_t all_vals_buf[16];
dset4 = malloc(sizeof(*dset4));
aset4 = calloc(F112_XDIM * F112_YDIM, sizeof(float));
fid = H5Fcreate(FILE112, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
dims[0] = F112_XDIM;
dims[1] = F112_YDIM;
space = H5Screate_simple(2, dims, NULL);
adims[0] = F112_XDIM * F112_YDIM;
aspace = H5Screate_simple(1, adims, NULL);
val = (float)F112_YDIM;
for (size_t i = 0; i < dims[0]; i++) {
dset4->arr[i][0] = val;
aset4[i * dims[1]] = dset4->arr[i][0];
for (size_t j = 1; j < dims[1]; j++) {
dset4->arr[i][j] = (float)(j * dims[0] + i) / (float)F112_YDIM;
aset4[i * dims[1] + j] = dset4->arr[i][j];
}
val -= (float)1;
}
/* Populate all_vals_buf with every FP4 number. Note
* that uint8_t is used for the buffer here since we
* don't currently have support for an FP4 type to
* use and there are currently conversion issues when
* converting larger types to the FP4 types. Writing
* a uint8_t buffer allows bypassing the datatype
* conversion process.
*/
all_vals_buf[0] = 0;
for (size_t i = 1; i < 16; i++)
all_vals_buf[i] = all_vals_buf[i - 1] + 1;
/* Dataset of 4-bit FP4 E2M1 */
dataset = H5Dcreate2(fid, F112_DATASET, H5T_FLOAT_F4E2M1, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset4);
/* Attribute of 4-bit FP4 E2M1 */
attr = H5Acreate2(dataset, F112_DATASET, H5T_FLOAT_F4E2M1, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_FLOAT, aset4);
H5Aclose(attr);
H5Dclose(dataset);
H5Sclose(aspace);
H5Sclose(space);
dims[0] = 2;
dims[1] = 8;
space = H5Screate_simple(2, dims, NULL);
adims[0] = 16;
aspace = H5Screate_simple(1, adims, NULL);
/* Dataset of 4-bit FP4 E2M1 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 E2M1 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, F112_DATASET2, H5T_FLOAT_F4E2M1, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_FLOAT_F4E2M1, H5S_ALL, H5S_ALL, H5P_DEFAULT, all_vals_buf);
/* Attribute of 4-bit FP4 E2M1 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 E2M1 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, F112_DATASET2, H5T_FLOAT_F4E2M1, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_FLOAT_F4E2M1, all_vals_buf);
H5Aclose(attr);
H5Dclose(dataset);
/* Dataset of 4-bit FP4 E2M1 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 E2M1 format doesn't follow the IEEE standard. While bit
* patterns that have all exponent bits set are normal values in the E2M1 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, F112_DATASET3, H5T_FLOAT_F4E2M1, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fp4_e2m1_vals);
/* Attribute of 4-bit FP4 E2M1 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 E2M1 format doesn't follow the IEEE standard. While bit
* patterns that have all exponent bits set are normal values in the E2M1 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, F112_DATASET3, H5T_FLOAT_F4E2M1, aspace, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_FLOAT, fp4_e2m1_vals);
H5Aclose(attr);
H5Dclose(dataset);
error:
free(aset4);
free(dset4);
H5E_BEGIN_TRY
{
H5Aclose(attr);
H5Sclose(aspace);
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
}
H5E_END_TRY;
}
+1
View File
@@ -130,6 +130,7 @@ void gent_bfloat16_be(void);
void gent_float8(void);
void gent_float6(void);
void gent_float4(void);
void gent_trefer_attr(void);
void gent_tattr4_be(void);
+1
View File
@@ -269,6 +269,7 @@ gen_h5dump_files(void)
gent_float8();
gent_float6();
gent_float4();
gent_trefer_attr();
gent_tattr4_be();
+5
View File
@@ -41,6 +41,7 @@ set (LIST_HDF5_TEST_FILES
textlink.h5
textlinksrc.h5
textlinktar.h5
tfloat4.h5
tfloat6.h5
tfloat8.h5
tfloat16.h5
@@ -102,6 +103,7 @@ set (LIST_OTHER_TEST_FILES
textlinksrc-7-old.ls
textlinksrc-nodangle-1.ls
textlinksrc-nodangle-2.ls
tfloat4.ls
tfloat6.ls
tfloat8.ls
tfloat16.ls
@@ -515,6 +517,9 @@ 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)
# test for FP4 type
ADD_H5_TEST (tfloat4 RESULT_CODE 0 -w80 -v tfloat4.h5)
# tests for complex numbers
if (${${HDF_PREFIX}_HAVE_COMPLEX_NUMBERS})
# If support is available for complex numbers, the second test
+22
View File
@@ -0,0 +1,22 @@
Opened "tfloat4.h5" with sec2 driver.
DS4BITSE2M1 Dataset {8/8, 16/16}
Attribute: DS4BITSE2M1 {128}
Type: FP4 E2M1 4-bit float
Location: 1:800
Links: 1
Storage: 128 logical bytes, 128 allocated bytes, 100.00% utilization
Type: FP4 E2M1 4-bit float
DS4BITSE2M1_ALLVALS Dataset {2/2, 8/8}
Attribute: DS4BITSE2M1_ALLVALS {16}
Type: FP4 E2M1 4-bit float
Location: 1:1608
Links: 1
Storage: 16 logical bytes, 16 allocated bytes, 100.00% utilization
Type: FP4 E2M1 4-bit float
DS4BITSE2M1_ALLVALS_CONVERT Dataset {2/2, 8/8}
Attribute: DS4BITSE2M1_ALLVALS_CONVERT {16}
Type: FP4 E2M1 4-bit float
Location: 1:4096
Links: 1
Storage: 16 logical bytes, 16 allocated bytes, 100.00% utilization
Type: FP4 E2M1 4-bit float
Binary file not shown.