Skip to content

(H5PT) Improved Append() Method

Sebastien Binet requested to merge TacoVox:h5ptappend_improvement into master

Created by: TacoVox

To keep the fun alive 😎

This patch features an improvement of the HDF5 PacketTable Append method. This was necessary, because the old version did not support the append of struct containing nested structs and/or slices/arrays. To sum it up:

  • Any data of any Compound Datatype can be written to a PacketTable now.
  • This is achieved by allocating memory that contains the necessary data.
  • The whole code is simpler than the doubled code that excisted before.
  • The Append() method now supports proper appending of slices, which are not appended in a append-per-member manner, but rather as several objects to append that are consecutively in memory. This is more aligned with the offical way-of-doing.

What needs to be improved?

  • The append of pointers still follows the old notion that we derefence the pointer and write the value directly. To support H5T_STD_REF_OBJ, further, significant changes have to be done to the whole code base.
  • The read functionality has to be revised, as it seems to not work when strings are part of compound datatypes. Manual testing has shown that they are written properly, the test cases still would fail, because of the mentioned call to read.

I suggest that the above mentioned improvements are tackled in a separate patch.

Merge request reports

Loading