summaryrefslogtreecommitdiffstats
path: root/pablo
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2000-10-05 16:56:30 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2000-10-05 16:56:30 (GMT)
commitea7f4421f9b61f0cbe2975f8da6897be5a67111c (patch)
treea9e5b52151499c0c790ca847d9bd25947a205172 /pablo
parent3c2e39acd1cbf4b92bc52afaf96ff57222c2fdbc (diff)
downloadhdf5-ea7f4421f9b61f0cbe2975f8da6897be5a67111c.zip
hdf5-ea7f4421f9b61f0cbe2975f8da6897be5a67111c.tar.gz
hdf5-ea7f4421f9b61f0cbe2975f8da6897be5a67111c.tar.bz2
[svn-r2634] Purpose:
Bug fix Description: In the h5dump_fixtype function, when users created a COMPOUND datatype, the alignment would be off somewhat. Solution: The alignment was being set after insertion. I changed this code: for (i = 0, offset = 0; i < nmembs; i++) { H5Tinsert_array(m_type, name[i], offset, ndims[i], dims + i * 4, NULL, memb[i]); for (j = 0, nelmts = 1; j < ndims[i]; j++) nelmts *= dims[i * 4 + j]; offset = ALIGN(offset, H5Tget_size(memb[i])) + nelmts * H5Tget_size(memb[i]); } to: for (i = 0, offset = 0; i < nmembs; i++) { if (offset) offset = ALIGN(offset, H5Tget_size(memb[i])); H5Tinsert_array(m_type, name[i], offset, ndims[i], dims + i * 4, NULL, memb[i]); for (j = 0, nelmts = 1; j < ndims[i]; j++) nelmts *= dims[i * 4 + j]; offset += nelmts * H5Tget_size(memb[i]); } The alignment is now calculated before the insertion. Platforms tested: Solaris, Linux
Diffstat (limited to 'pablo')
0 files changed, 0 insertions, 0 deletions