diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-07-29 21:39:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-07-29 21:39:14 (GMT) |
commit | 913adc97563247edb3e41ccaf827aae30a885b23 (patch) | |
tree | f3b496d60139c37a6dcbdc69005635e73ae3a579 /src/H5Dint.c | |
parent | 7b93d00cd6446633d1d45705cf66d1353e241d1e (diff) | |
download | hdf5-913adc97563247edb3e41ccaf827aae30a885b23.zip hdf5-913adc97563247edb3e41ccaf827aae30a885b23.tar.gz hdf5-913adc97563247edb3e41ccaf827aae30a885b23.tar.bz2 |
[svn-r17261] Description:
Refactoring dataset layout information to segregate the constant items
from the variable items (at least from a storage standpoint).
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.7 (amazon) in debug mode
Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index 93d0e1d..77050e4 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -784,7 +784,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) /* Add the dataset's raw data size to the size of the header, if the raw data will be stored as compact */ if(layout->type == H5D_COMPACT) - ohdr_size += layout->u.compact.size; + ohdr_size += layout->store.u.compact.size; /* Create an object header for the dataset */ if(H5O_create(file, dxpl_id, ohdr_size, dset->shared->dcpl_id, oloc/*out*/) < 0) @@ -1403,7 +1403,7 @@ H5D_close(H5D_t *dataset) case H5D_COMPACT: /* Free the buffer for the raw data for compact datasets */ - dataset->shared->layout.u.compact.buf = H5MM_xfree(dataset->shared->layout.u.compact.buf); + dataset->shared->layout.store.u.compact.buf = H5MM_xfree(dataset->shared->layout.store.u.compact.buf); break; default: @@ -1617,14 +1617,14 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al case H5D_COMPACT: /* Check if space is already allocated */ - if(layout->u.compact.buf==NULL) { + if(NULL == layout->store.u.compact.buf) { /* Reserve space in layout header message for the entire array. */ - HDassert(layout->u.compact.size > 0); - if(NULL == (layout->u.compact.buf = H5MM_malloc(layout->u.compact.size))) + HDassert(layout->store.u.compact.size > 0); + if(NULL == (layout->store.u.compact.buf = H5MM_malloc(layout->store.u.compact.size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory for compact dataset") if(!full_overwrite) - HDmemset(layout->u.compact.buf, 0, layout->u.compact.size); - layout->u.compact.dirty = TRUE; + HDmemset(layout->store.u.compact.buf, 0, layout->store.u.compact.size); + layout->store.u.compact.dirty = TRUE; /* Indicate that we should initialize storage space */ must_init_space = TRUE; @@ -1790,7 +1790,7 @@ H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id) break; case H5D_COMPACT: - ret_value = dset->shared->layout.u.compact.size; + ret_value = dset->shared->layout.store.u.compact.size; break; default: @@ -1834,9 +1834,9 @@ H5D_get_offset(const H5D_t *dset) case H5D_CONTIGUOUS: /* If dataspace hasn't been allocated or dataset is stored in * an external file, the value will be HADDR_UNDEF. */ - if(dset->shared->dcpl_cache.efl.nused == 0 || H5F_addr_defined(dset->shared->layout.u.contig.addr)) + if(dset->shared->dcpl_cache.efl.nused == 0 || H5F_addr_defined(dset->shared->layout.store.u.contig.addr)) /* Return the absolute dataset offset from the beginning of file. */ - ret_value = dset->shared->layout.u.contig.addr + H5F_BASE_ADDR(dset->oloc.file); + ret_value = dset->shared->layout.store.u.contig.addr + H5F_BASE_ADDR(dset->oloc.file); break; default: |