On Sep 29, 2011, at 9:15 AM, guillaume wrote:

> Thank you for your reply.
> This is what H5TB does internally. This is using field name to get data, but
> what if I want to extract 2 fields in one ? For instance, if I have
> compound type {
> "a_name" INT8
> "b_name" INT8
> "c_name" INT16
> }
> 
> and I want to read "a_name" and "b_name" in a INT16 ? 
> Is there any lower API that can achieve that ?

        Yes, that's work too.  The HDF5 library matches fields by name when 
doing I/O, so just define your compound datatype in memory with 'a_name' and 
'b_name' fields that are of INT16 type and the library will extract just those 
two fields and also type convert from INT8 to INT16.

        Quincey


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to