Re: question about HDF5 compound type macros...

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

There's something I just don't understand here.

Suppose, on machine A, that I have an array of C struct data, of type
"struct s1", and using HOFFSET, I create a compound type. Then I write
a bunch of data.

Then, on machine B, which packs its structs differently, I open the
file, and read the data into an array of the same "struct s1". Will my
data be messed up because of the different padding on machine B?

I can see that, using the HOFFSET macro, you adjust the compound type
to the actual struct when the file is created, because of the
H5Tcompound_insert calls. But readers don't give you any information
about the C struct they are reading into. How do you know the padding
isn't different?



Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx

  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-hdf archives: