Hi David,
I have a question about the virtual view feature that the hdf5 group is developing. My understanding is that I can build a view dataset out of elements from different datasets of the same type. I'm wondering if I can also build a view dataset that has a different but compatible type. For instance, if I had
datasetA
type = Compound { float x, int a}
could I make a view dataset that is just of float, that pulls out the float x in the compound from in datasetA?
HDF5 virtual dataset uses only spacial information for setting a view (or defining mappings), i.e., there is no way to define the self-describing mapping as above. Also, the source datasets have to have compatible datatypes (one type can be converted to another by the HDF5 library). There is no restriction that they have the same datatype.
In HDF5, atomic type and a field of a compound type of the same atomic type are not compatible. This is a current limitation and it can be probably addressed in the future.
Said this, it is possible to pull data out as you described ( we still need to test it!), but it is clunky.
If all source datasets in the mapping use compatible compound datatypes, the library should be able to read or write virtual dataset data by a field. It will be similar to reading a field from a compound dataset.
If the source datasets have non-compatible datatypes, then one can do I/O only on a selection in the virtual dataset that maps to the elements of compatible datatypes. It will be application’s responsibility to make sure that all elements in the selection have compatible types, otherwise I/O will fail - not fun
Elena
···
On Aug 13, 2015, at 12:30 AM, Schneider, David A. <davidsch@slac.stanford.edu> wrote:
best,
David
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5