mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
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:
@@ -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");
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user