Open
Conversation
| void H5AttrRecorder::record_arr(const char *name, const double *arr, int length) | ||
| { | ||
| hid_t type_id = H5T_NATIVE_DOUBLE; | ||
| // is there a compelling reason why this is big endian? |
Collaborator
There was a problem hiding this comment.
No, in fact there isn't and it has caused problems in the past. Perhaps we should change it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To be reviewed after #469 is merged
This PR introduces the
H5AttrWritertype. This is a temporary type that wraps ahid_tthat wraps an hdf5 file (or an hdf5 group). The intention is to provide a nicer interface for writing hdf5 attributes to disk.This was initially intended to be short and quick, but after making a bunch of progress, I hit some subtle and very annoying bugs that took a surprisingly long time to debug. The resulting code is a little longer than I would like.
A side motivation: in a followup PR, we make this class inherit from an abstract
AttrWriterAdaptorclass so that we can unify the code for text headers and H5 headersI have tested to confirm that the headers are identical to the earlier version of the code