diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-11-03 13:17:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-11-03 13:17:14 (GMT) |
commit | d8c4700561368b378dd1fe6b708a9c01378b7dc5 (patch) | |
tree | 6c3691a56e0138c089d5dc7682d9e62c0c1f8650 /src/H5HFhdr.c | |
parent | ebd34a6a4d390b0074799a7f1e6a2bd59882df99 (diff) | |
download | hdf5-d8c4700561368b378dd1fe6b708a9c01378b7dc5.zip hdf5-d8c4700561368b378dd1fe6b708a9c01378b7dc5.tar.gz hdf5-d8c4700561368b378dd1fe6b708a9c01378b7dc5.tar.bz2 |
[svn-r17807] Description:
Bring r17623 from trunk to 1.8 branch:
Bring "compress group's fractal heap" feature from feature branch.
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/default API=1.8.x,
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.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5HFhdr.c')
-rw-r--r-- | src/H5HFhdr.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index c7dada2..c326a59 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -420,6 +420,17 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam) * length is already set in that case (its stored in the header on disk)) */ if(cparam->pline.nused > 0) { + /* Check if the filters in the DCPL can be applied to this dataset */ + if(H5Z_can_apply_direct(&(cparam->pline)) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap") + + /* Mark the filters as checked */ + hdr->checked_filters = TRUE; + + /* Make the "set local" filter callbacks for this dataset */ + if(H5Z_set_local_direct(&(cparam->pline)) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters") + /* Copy the I/O filter pipeline from the creation parameters to the header */ if(NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline))) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline") @@ -427,7 +438,7 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam) /* Pay attention to the latest version flag for the file */ if(H5F_USE_LATEST_FORMAT(hdr->f)) /* Set the latest version for the I/O pipeline message */ - if(H5Z_set_latest_version(&(hdr->pline)) < 0) + if(H5O_pline_set_latest_version(&(hdr->pline)) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set latest version of I/O filter pipeline") /* Compute the I/O filters' encoded size */ @@ -443,10 +454,14 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", FUNC, hdr->filter_len); + 4 /* Size of filter mask for filtered root direct block */ + hdr->filter_len; /* Size of encoded I/O filter info */ } /* end if */ - else + else { /* Set size of header on disk */ hdr->heap_size = H5HF_HEADER_SIZE(hdr); + /* Mark filters as checked, for performance reasons */ + hdr->checked_filters = TRUE; + } /* end else */ + /* Set the length of IDs in the heap */ /* (This code is not in the "finish init phase" routines because those * routines are also called from the cache 'load' callback, and the ID |