diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-27 20:24:08 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-27 20:24:08 (GMT) |
commit | 2ce06c39120fe3d89c0faa1c948b5a0399e968e2 (patch) | |
tree | e00c2829682ffc6d5830e97726ed8c5563278bcb /src/H5Z.c | |
parent | 71fba25e6ea0d7cacb19928af43af6874a4008c2 (diff) | |
download | hdf5-2ce06c39120fe3d89c0faa1c948b5a0399e968e2.zip hdf5-2ce06c39120fe3d89c0faa1c948b5a0399e968e2.tar.gz hdf5-2ce06c39120fe3d89c0faa1c948b5a0399e968e2.tar.bz2 |
[svn-r8590] Purpose:
Code optimization & bug fix
Description:
When dimension information is being stored in the storage layout message
on disk, it is stored as 32-bit quantities, possibly truncating the dimension
information, if a dimension is greater than 32-bits in size.
Solution:
Fix the storage layout message problem by revising file format to not store
dimension information, since it is already available in the dataspace.
Also revise the storage layout data structures to be more compartmentalized
for the information for contiguous, chunked and compact storage.
Platforms tested:
FreeBSD 4.9 (sleipnir) w/parallel
Solaris 2.7 (arabica)
h5committest
Diffstat (limited to 'src/H5Z.c')
-rw-r--r-- | src/H5Z.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -481,7 +481,8 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty /* Check if the chunks have filters */ if(dcpl_pline.nused > 0) { unsigned chunk_ndims; /* # of chunk dimensions */ - hsize_t chunk_size[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ + size_t chunk_size[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ + hsize_t chunk_dims[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ H5S_t *space; /* Dataspace describing chunk */ hid_t space_id; /* ID for dataspace describing chunk */ size_t u; /* Local index variable */ @@ -493,7 +494,9 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve chunk size") /* Create a data space for a chunk & set the extent */ - if(NULL == (space = H5S_create_simple(chunk_ndims,chunk_size,NULL))) + for(u=0; u<chunk_ndims; u++) + chunk_dims[u]=chunk_size[u]; + if(NULL == (space = H5S_create_simple(chunk_ndims,chunk_dims,NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") /* Get ID for dataspace to pass to filter routines */ |