Skip to content

Record support for decl_HDF5 plugin

Karol Sierocinski requested to merge hdf5_record into master

I have added support for records in decl_hdf5 plugin. I have also written 2 tests, the first is the mix of records and arrays, the second is sparse array with record subtype.

Now the inner arrays (inside the record) have the type H5T_ARRAY.

Solves #123 (closed) .

@jbigot If you have other ideas how to test this new feature, please let me know :)

File from decl_hdf5_08_C test:

HDF5 "test_08.h5" {
GROUP "/" {
   DATASET "outer_record" {
      DATATYPE  H5T_COMPOUND {
         H5T_STD_I32LE "id";
         H5T_ARRAY { [2][2] H5T_COMPOUND {
            H5T_STD_I32LE "x";
            H5T_STD_I32LE "y";
            H5T_STD_I32LE "z";
         } } "value";
      }
      DATASPACE  SCALAR
      DATA {
      (0): {
            24,
            [ {
                  0,
                  0,
                  0
               }, {
                  -1,
                  2,
                  3
               },
               {
                  -2,
                  4,
                  6
               }, {
                  -3,
                  6,
                  9
               } ]
         }
      }
   }
}
}

File from decl_hdf5_09_C test:

HDF5 "test_09.h5" {
GROUP "/" {
   DATASET "data_array" {
      DATATYPE  H5T_COMPOUND {
         H5T_STD_I32LE "id";
         H5T_ARRAY { [4][4] H5T_STD_I32LE } "value";
      }
      DATASPACE  SIMPLE { ( 2 ) / ( 2 ) }
      DATA {
      (0): {
            1,
            [ 16, 17, 18, 19,
               20, 21, 22, 23,
               24, 25, 26, 27,
               28, 29, 30, 31 ]
         },
      (1): {
            2,
            [ 32, 33, 34, 35,
               36, 37, 38, 39,
               40, 41, 42, 43,
               44, 45, 46, 47 ]
         }
      }
   }
}
}

Merge request reports