diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 14:00:07 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 14:00:07 (GMT) |
commit | 5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71 (patch) | |
tree | 8087d74d2e1862e4127bd92cf66ee543d0807b90 /src/H5Dio.c | |
parent | 85a1c5c27377a12f1b7dca29ad90b7484d7fcfed (diff) | |
download | hdf5-5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71.zip hdf5-5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71.tar.gz hdf5-5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71.tar.bz2 |
[svn-r16354] Description:
Bring r16353 back from revise_chunks branch:
Refactor internal layout information, making it easier to add another
type of chunk index.
Tested on:
FreeBSD/32 6.3 (duty)
(other platforms tested with original patch)
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r-- | src/H5Dio.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index 9308c33..c1d57fd 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -351,8 +351,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, * has been overwritten. So just proceed in reading. */ if(nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 && - ((dataset->shared->layout.type == H5D_CONTIGUOUS && !H5F_addr_defined(dataset->shared->layout.u.contig.addr)) - || (dataset->shared->layout.type == H5D_CHUNKED && !H5F_addr_defined(dataset->shared->layout.u.chunk.addr)))) { + !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout)) { H5D_fill_value_t fill_status; /* Whether/How the fill value is defined */ /* Retrieve dataset's fill-value properties */ @@ -386,8 +385,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, /* Sanity check that space is allocated, if there are elements */ if(nelmts > 0) - HDassert(((dataset->shared->layout.type == H5D_CONTIGUOUS && H5F_addr_defined(dataset->shared->layout.u.contig.addr)) - || (dataset->shared->layout.type == H5D_CHUNKED && H5F_addr_defined(dataset->shared->layout.u.chunk.addr))) + HDassert((*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout) || dataset->shared->dcpl_cache.efl.nused > 0 || dataset->shared->layout.type == H5D_COMPACT); @@ -537,8 +535,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, /* Allocate data space and initialize it if it hasn't been. */ if(nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 && - ((dataset->shared->layout.type == H5D_CONTIGUOUS && !H5F_addr_defined(dataset->shared->layout.u.contig.addr)) - || (dataset->shared->layout.type == H5D_CHUNKED && !H5F_addr_defined(dataset->shared->layout.u.chunk.addr)))) { + !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout)) { hssize_t file_nelmts; /* Number of elements in file dataset's dataspace */ hbool_t full_overwrite; /* Whether we are over-writing all the elements */ |