summaryrefslogtreecommitdiffstats
path: root/src/H5Dcompact.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/H5Dcompact.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/H5Dcompact.c')
-rw-r--r--src/H5Dcompact.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 17bf531..ae6a72e 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -127,16 +127,16 @@ H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
/* Check args */
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
HDassert(dset && H5D_COMPACT == dset->shared->layout.type);
- HDassert(dset->shared->layout.store.u.compact.buf);
+ HDassert(dset->shared->layout.storage.u.compact.buf);
HDassert(dset->shared->type);
HDassert(dset->shared->space);
/* Initialize the fill value buffer */
/* (use the compact dataset storage buffer as the fill value buffer) */
- if(H5D_fill_init(&fb_info, dset->shared->layout.store.u.compact.buf, FALSE,
+ if(H5D_fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf, FALSE,
NULL, NULL, NULL, NULL,
&dset->shared->dcpl_cache.fill, dset->shared->type,
- dset->shared->type_id, (size_t)0, dset->shared->layout.store.u.compact.size, dxpl_id) < 0)
+ dset->shared->type_id, (size_t)0, dset->shared->layout.storage.u.compact.size, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
@@ -186,13 +186,13 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset)
* layout.
*/
tmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space) * H5T_get_size(dset->shared->type);
- H5_ASSIGN_OVERFLOW(dset->shared->layout.store.u.compact.size, tmp_size, hssize_t, size_t);
+ H5_ASSIGN_OVERFLOW(dset->shared->layout.storage.u.compact.size, tmp_size, hssize_t, size_t);
/* Verify data size is smaller than maximum header message size
* (64KB) minus other layout message fields.
*/
max_comp_data_size = H5O_MESG_MAX_SIZE - H5D_layout_meta_size(f, &(dset->shared->layout), FALSE);
- if(dset->shared->layout.store.u.compact.size > max_comp_data_size)
+ if(dset->shared->layout.storage.u.compact.size > max_comp_data_size)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "compact dataset size is bigger than header message maximum size")
done:
@@ -244,8 +244,8 @@ H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_compact_io_init)
- io_info->store->compact.buf = io_info->dset->shared->layout.store.u.compact.buf;
- io_info->store->compact.dirty = &io_info->dset->shared->layout.store.u.compact.dirty;
+ io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
+ io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D_compact_io_init() */
@@ -356,10 +356,10 @@ H5D_compact_flush(H5D_t *dset, hid_t dxpl_id, unsigned UNUSED flags)
HDassert(dset);
/* Check if the buffered compact information is dirty */
- if(dset->shared->layout.store.u.compact.dirty) {
+ if(dset->shared->layout.storage.u.compact.dirty) {
if(H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout), dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message")
- dset->shared->layout.store.u.compact.dirty = FALSE;
+ dset->shared->layout.storage.u.compact.dirty = FALSE;
} /* end if */
done:
@@ -449,7 +449,7 @@ H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src, H5F_t *f_dst,
max_dt_size = MAX(max_dt_size, tmp_dt_size);
/* Set number of whole elements that fit in buffer */
- if(0 == (nelmts = layout_src->store.u.compact.size / src_dt_size))
+ if(0 == (nelmts = layout_src->storage.u.compact.size / src_dt_size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large")
/* Set up number of bytes to copy, and initial buffer size */
@@ -476,7 +476,7 @@ H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src, H5F_t *f_dst,
if(NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemcpy(buf, layout_src->store.u.compact.buf, layout_src->store.u.compact.size);
+ HDmemcpy(buf, layout_src->storage.u.compact.buf, layout_src->storage.u.compact.size);
/* Convert from source file to memory */
if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, NULL, dxpl_id) < 0)
@@ -492,7 +492,7 @@ H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src, H5F_t *f_dst,
if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
- HDmemcpy(layout_dst->store.u.compact.buf, buf, layout_dst->store.u.compact.size);
+ HDmemcpy(layout_dst->storage.u.compact.buf, buf, layout_dst->storage.u.compact.size);
if(H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data")
@@ -504,24 +504,24 @@ H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src, H5F_t *f_dst,
size_t ref_count;
/* Determine # of reference elements to copy */
- ref_count = layout_src->store.u.compact.size / H5T_get_size(dt_src);
+ ref_count = layout_src->storage.u.compact.size / H5T_get_size(dt_src);
/* Copy objects referenced in source buffer to destination file and set destination elements */
- if(H5O_copy_expand_ref(f_src, layout_src->store.u.compact.buf, dxpl_id, f_dst,
- layout_dst->store.u.compact.buf, ref_count, H5T_get_ref_type(dt_src), cpy_info) < 0)
+ if(H5O_copy_expand_ref(f_src, layout_src->storage.u.compact.buf, dxpl_id, f_dst,
+ layout_dst->storage.u.compact.buf, ref_count, H5T_get_ref_type(dt_src), cpy_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute")
} /* end if */
else
/* Reset value to zero */
- HDmemset(layout_dst->store.u.compact.buf, 0, layout_src->store.u.compact.size);
+ HDmemset(layout_dst->storage.u.compact.buf, 0, layout_src->storage.u.compact.size);
} /* end if */
else
/* Type conversion not necessary */
- HDmemcpy(layout_dst->store.u.compact.buf, layout_src->store.u.compact.buf, layout_src->store.u.compact.size);
+ HDmemcpy(layout_dst->storage.u.compact.buf, layout_src->storage.u.compact.buf, layout_src->storage.u.compact.size);
} /* end if */
else
/* Type conversion not necessary */
- HDmemcpy(layout_dst->store.u.compact.buf, layout_src->store.u.compact.buf, layout_src->store.u.compact.size);
+ HDmemcpy(layout_dst->storage.u.compact.buf, layout_src->storage.u.compact.buf, layout_src->storage.u.compact.size);
done:
if(buf_sid > 0 && H5I_dec_ref(buf_sid, FALSE) < 0)