summaryrefslogtreecommitdiffstats
path: root/src/H5Dcontig.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-30 17:51:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-30 17:51:49 (GMT)
commite1ceea54ff06ffef0029b20007cd7685e000fdec (patch)
tree3aacc0bfbc6762d7c28f53df2183b797e9d32854 /src/H5Dcontig.c
parentf0ce4df67f82ee7308ad812a1772079fcb141182 (diff)
downloadhdf5-e1ceea54ff06ffef0029b20007cd7685e000fdec.zip
hdf5-e1ceea54ff06ffef0029b20007cd7685e000fdec.tar.gz
hdf5-e1ceea54ff06ffef0029b20007cd7685e000fdec.tar.bz2
[svn-r17275] Description:
Refactor dataet storage information further, moving the chunk operations into the storage struct and also fine-tune the chunk index structure for index callbacks. 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/H5Dcontig.c')
-rw-r--r--src/H5Dcontig.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 66427a3..62b63a5 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -132,7 +132,7 @@ H5D_contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout /*out */ )
HDassert(layout);
/* Allocate space for the contiguous data */
- if(HADDR_UNDEF == (layout->store.u.contig.addr = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, layout->store.u.contig.size)))
+ if(HADDR_UNDEF == (layout->storage.u.contig.addr = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, layout->storage.u.contig.size)))
HGOTO_ERROR(H5E_IO, H5E_NOSPACE, FAIL, "unable to reserve file space")
done:
@@ -179,8 +179,8 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
/* Check args */
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
HDassert(dset && H5D_CONTIGUOUS == dset->shared->layout.type);
- HDassert(H5F_addr_defined(dset->shared->layout.store.u.contig.addr));
- HDassert(dset->shared->layout.store.u.contig.size > 0);
+ HDassert(H5F_addr_defined(dset->shared->layout.storage.u.contig.addr));
+ HDassert(dset->shared->layout.storage.u.contig.size > 0);
HDassert(dset->shared->space);
HDassert(dset->shared->type);
@@ -214,8 +214,8 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Initialize storage info for this dataset */
- store.contig.dset_addr = dset->shared->layout.store.u.contig.addr;
- store.contig.dset_size = dset->shared->layout.store.u.contig.size;
+ store.contig.dset_addr = dset->shared->layout.storage.u.contig.addr;
+ store.contig.dset_size = dset->shared->layout.storage.u.contig.size;
/* Get the number of elements in the dataset's dataspace */
snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space);
@@ -317,7 +317,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_contig_delete(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout)
+H5D_contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -325,11 +325,11 @@ H5D_contig_delete(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout)
/* check args */
HDassert(f);
- HDassert(layout);
+ HDassert(storage);
/* Free the file space for the chunk */
- if(H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, layout->store.u.contig.addr, layout->store.u.contig.size) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object header")
+ if(H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, storage->u.contig.addr, storage->u.contig.size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free contiguous storage space")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -357,7 +357,7 @@ H5D_contig_get_addr(const H5D_t *dset)
HDassert(dset);
HDassert(dset->shared->layout.type == H5D_CONTIGUOUS);
- FUNC_LEAVE_NOAPI(dset->shared->layout.store.u.contig.addr)
+ FUNC_LEAVE_NOAPI(dset->shared->layout.storage.u.contig.addr)
} /* end H5D_contig_get_addr() */
@@ -423,7 +423,7 @@ H5D_contig_construct(H5F_t *f, H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
/* Assign the dataset's contiguous storage size */
- dset->shared->layout.store.u.contig.size = tmp_size;
+ dset->shared->layout.storage.u.contig.size = tmp_size;
/* Get the sieve buffer size for this dataset */
dset->shared->cache.contig.sieve_buf_size = H5F_SIEVE_BUF_SIZE(f);
@@ -456,7 +456,7 @@ H5D_contig_is_space_alloc(const H5O_layout_t *layout)
HDassert(layout);
/* Set return value */
- ret_value = (hbool_t)H5F_addr_defined(layout->store.u.contig.addr);
+ ret_value = (hbool_t)H5F_addr_defined(layout->storage.u.contig.addr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_contig_is_space_alloc() */
@@ -481,8 +481,8 @@ H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *t
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_contig_io_init)
- io_info->store->contig.dset_addr = io_info->dset->shared->layout.store.u.contig.addr;
- io_info->store->contig.dset_size = io_info->dset->shared->layout.store.u.contig.size;
+ io_info->store->contig.dset_addr = io_info->dset->shared->layout.storage.u.contig.addr;
+ io_info->store->contig.dset_size = io_info->dset->shared->layout.storage.u.contig.size;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D_contig_io_init() */
@@ -1267,7 +1267,7 @@ H5D_contig_copy(H5F_t *f_src, const H5O_layout_t *layout_src, H5F_t *f_dst,
/* Set up number of bytes to copy, and initial buffer size */
/* (actually use the destination size, which has been fixed up, if necessary) */
- total_src_nbytes = layout_dst->store.u.contig.size;
+ total_src_nbytes = layout_dst->storage.u.contig.size;
H5_CHECK_OVERFLOW(total_src_nbytes, hsize_t, size_t);
buf_size = MIN(H5D_TEMP_BUF_SIZE, (size_t)total_src_nbytes);
@@ -1365,8 +1365,8 @@ H5D_contig_copy(H5F_t *f_src, const H5O_layout_t *layout_src, H5F_t *f_dst,
} /* end if */
/* Loop over copying data */
- addr_src = layout_src->store.u.contig.addr;
- addr_dst = layout_dst->store.u.contig.addr;
+ addr_src = layout_src->storage.u.contig.addr;
+ addr_dst = layout_dst->storage.u.contig.addr;
while(total_src_nbytes > 0) {
/* Check if we should reduce the number of bytes to transfer */
if(total_src_nbytes < src_nbytes) {