summaryrefslogtreecommitdiffstats
path: root/src/H5Olayout.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-06-03 19:44:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-06-03 19:44:12 (GMT)
commit771bae88881f4ae8102c9553fd10e0938aa3094c (patch)
tree62ac7bce1e109e1b0b8899ea14da603a2b6e6ffc /src/H5Olayout.c
parentd36f67c0e27a39a54f870c4f917ab2c1754e80d6 (diff)
downloadhdf5-771bae88881f4ae8102c9553fd10e0938aa3094c.zip
hdf5-771bae88881f4ae8102c9553fd10e0938aa3094c.tar.gz
hdf5-771bae88881f4ae8102c9553fd10e0938aa3094c.tar.bz2
[svn-r15131] Description:
Finish omnibus chunked dataset I/O refactoring, to separate general actions on chunked datasets from actions that are specific to using the v1 B-tree index. Cleaned up a few bugs and added some additional tests also. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.2 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r--src/H5Olayout.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index e750d48..1f371f3 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -136,11 +136,30 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags,
p += 5;
/* Address */
- if(mesg->type == H5D_CONTIGUOUS)
+ if(mesg->type == H5D_CONTIGUOUS) {
H5F_addr_decode(f, &p, &(mesg->u.contig.addr));
- else if(mesg->type == H5D_CHUNKED)
+
+ /* Set the layout operations */
+ mesg->ops = H5D_LOPS_CONTIG;
+ } /* end if */
+ else if(mesg->type == H5D_CHUNKED) {
H5F_addr_decode(f, &p, &(mesg->u.chunk.addr));
+ /* Set the layout operations */
+ mesg->ops = H5D_LOPS_CHUNK;
+
+ /* Set the chunk operations */
+ /* (Only "istore" indexing type currently supported */
+ mesg->u.chunk.ops = H5D_COPS_ISTORE;
+ } /* end if */
+ else {
+ /* Sanity check */
+ HDassert(mesg->type == H5D_COMPACT);
+
+ /* Set the layout operations */
+ mesg->ops = H5D_LOPS_COMPACT;
+ } /* end else */
+
/* Read the size */
if(mesg->type != H5D_CHUNKED) {
/* Don't compute size of contiguous storage here, due to possible
@@ -185,11 +204,17 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags,
HDmemcpy(mesg->u.compact.buf, p, mesg->u.compact.size);
p += mesg->u.compact.size;
} /* end if */
+
+ /* Set the layout operations */
+ mesg->ops = H5D_LOPS_COMPACT;
break;
case H5D_CONTIGUOUS:
H5F_addr_decode(f, &p, &(mesg->u.contig.addr));
H5F_DECODE_LENGTH(f, p, mesg->u.contig.size);
+
+ /* Set the layout operations */
+ mesg->ops = H5D_LOPS_CONTIG;
break;
case H5D_CHUNKED:
@@ -208,6 +233,13 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags,
/* Compute chunk size */
for(u = 1, mesg->u.chunk.size = mesg->u.chunk.dim[0]; u < mesg->u.chunk.ndims; u++)
mesg->u.chunk.size *= mesg->u.chunk.dim[u];
+
+ /* Set the layout operations */
+ mesg->ops = H5D_LOPS_CHUNK;
+
+ /* Set the chunk operations */
+ /* (Only "istore" indexing type currently supported */
+ mesg->u.chunk.ops = H5D_COPS_ISTORE;
break;
default:
@@ -576,8 +608,8 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
break;
case H5D_CHUNKED: /* Chunked blocks on disk */
- /* Free the file space for the raw data */
- if(H5D_istore_delete(f, dxpl_id, mesg) < 0)
+ /* Free the file space for the index & chunk raw data */
+ if(H5D_chunk_delete(f, dxpl_id, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
break;
@@ -670,7 +702,7 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
layout_dst->u.chunk.addr = HADDR_UNDEF;
/* create chunked layout */
- if(H5D_istore_copy(file_src, layout_src, file_dst, layout_dst, udata->src_dtype, cpy_info, udata->src_pline, dxpl_id) < 0)
+ if(H5D_chunk_copy(file_src, layout_src, file_dst, layout_dst, udata->src_dtype, cpy_info, udata->src_pline, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to copy chunked storage")
/* Freed by copy routine */