summaryrefslogtreecommitdiffstats
path: root/src/H5Dseq.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-02-06 15:34:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-02-06 15:34:01 (GMT)
commitd8cfeadd906c13421c4fe9abe1a5318a956236f6 (patch)
tree1c0c4c1f988ebd2ec44de73411bd8dcc136c6464 /src/H5Dseq.c
parentaaeecad6564fe93bb8de567220eed453f890acf4 (diff)
downloadhdf5-d8cfeadd906c13421c4fe9abe1a5318a956236f6.zip
hdf5-d8cfeadd906c13421c4fe9abe1a5318a956236f6.tar.gz
hdf5-d8cfeadd906c13421c4fe9abe1a5318a956236f6.tar.bz2
[svn-r8158] Purpose:
Code cleanup/optimization Description: Query property list values once, at the beginning of the I/O routines, instead of querying the property list values multiple (lots!) of times in lower level routines. Solution: Create "property list caches" for internal library queries of the property list values. Platforms tested: IBM p690 (copper) w/parallel & fphdf5 h5committest
Diffstat (limited to 'src/H5Dseq.c')
-rw-r--r--src/H5Dseq.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/H5Dseq.c b/src/H5Dseq.c
index 03c10fe..3e8ce3b 100644
--- a/src/H5Dseq.c
+++ b/src/H5Dseq.c
@@ -68,8 +68,9 @@ static int interface_initialize_g = 0;
*-------------------------------------------------------------------------
*/
herr_t
-H5F_seq_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
- H5P_genplist_t *dc_plist, const H5D_storage_t *store,
+H5F_seq_read(H5F_t *f, const struct H5D_dxpl_cache_t *dxpl_cache,
+ hid_t dxpl_id, const H5O_layout_t *layout,
+ const struct H5D_dcpl_cache_t *dcpl_cache, const H5D_storage_t *store,
size_t seq_len, hsize_t dset_offset, void *buf/*out*/)
{
hsize_t mem_off=0; /* Offset in memory */
@@ -86,7 +87,7 @@ H5F_seq_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
assert(buf);
assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
- if (H5F_seq_readvv(f, dxpl_id, layout, dc_plist, store, 1, &dset_curr_seq, &seq_len, &dset_offset, 1, &mem_curr_seq, &mem_len, &mem_off, buf)<0)
+ if (H5F_seq_readvv(f, dxpl_cache, dxpl_id, layout, dcpl_cache, store, 1, &dset_curr_seq, &seq_len, &dset_offset, 1, &mem_curr_seq, &mem_len, &mem_off, buf)<0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "vector read failed");
done:
@@ -116,8 +117,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_seq_write(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
- H5P_genplist_t *dc_plist, const H5D_storage_t *store,
+H5F_seq_write(H5F_t *f, const struct H5D_dxpl_cache_t *dxpl_cache,
+ hid_t dxpl_id, H5O_layout_t *layout,
+ const struct H5D_dcpl_cache_t *dcpl_cache, const H5D_storage_t *store,
size_t seq_len, hsize_t dset_offset, const void *buf)
{
hsize_t mem_off=0; /* Offset in memory */
@@ -134,7 +136,7 @@ H5F_seq_write(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
assert(buf);
assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
- if (H5F_seq_writevv(f, dxpl_id, layout, dc_plist, store, 1, &dset_curr_seq, &seq_len, &dset_offset, 1, &mem_curr_seq, &mem_len, &mem_off, buf)<0)
+ if (H5F_seq_writevv(f, dxpl_cache, dxpl_id, layout, dcpl_cache, store, 1, &dset_curr_seq, &seq_len, &dset_offset, 1, &mem_curr_seq, &mem_len, &mem_off, buf)<0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write failed");
done:
@@ -183,8 +185,9 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5F_seq_readvv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
- struct H5P_genplist_t *dc_plist, const H5D_storage_t *store,
+H5F_seq_readvv(H5F_t *f, const struct H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
+ const struct H5O_layout_t *layout,
+ const struct H5D_dcpl_cache_t *dcpl_cache, const H5D_storage_t *store,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[],
void *buf/*out*/)
@@ -197,7 +200,7 @@ H5F_seq_readvv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
assert(f);
assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER)); /* Make certain we have the correct type of property list */
assert(layout);
- assert(dc_plist);
+ assert(dcpl_cache);
assert(dset_curr_seq);
assert(*dset_curr_seq<dset_max_nseq);
assert(dset_len_arr);
@@ -241,7 +244,7 @@ H5F_seq_readvv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
case H5D_CHUNKED:
assert(store);
- if((ret_value=H5F_istore_readvv(f, dxpl_id, layout, dc_plist, store->chunk_coords,
+ if((ret_value=H5F_istore_readvv(f, dxpl_cache, dxpl_id, layout, dcpl_cache, store->chunk_coords,
dset_max_nseq, dset_curr_seq, dset_len_arr, dset_offset_arr,
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_offset_arr,
buf))<0)
@@ -298,8 +301,9 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5F_seq_writevv(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
- struct H5P_genplist_t *dc_plist, const H5D_storage_t *store,
+H5F_seq_writevv(H5F_t *f, const struct H5D_dxpl_cache_t *dxpl_cache,
+ hid_t dxpl_id, struct H5O_layout_t *layout,
+ const struct H5D_dcpl_cache_t *dcpl_cache, const H5D_storage_t *store,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[],
const void *buf)
@@ -312,7 +316,7 @@ H5F_seq_writevv(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
assert(f);
assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER)); /* Make certain we have the correct type of property list */
assert(layout);
- assert(dc_plist);
+ assert(dcpl_cache);
assert(dset_curr_seq);
assert(*dset_curr_seq<dset_max_nseq);
assert(dset_len_arr);
@@ -356,7 +360,7 @@ H5F_seq_writevv(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
case H5D_CHUNKED:
assert(store);
- if((ret_value=H5F_istore_writevv(f, dxpl_id, layout, dc_plist, store->chunk_coords,
+ if((ret_value=H5F_istore_writevv(f, dxpl_cache, dxpl_id, layout, dcpl_cache, store->chunk_coords,
dset_max_nseq, dset_curr_seq, dset_len_arr, dset_offset_arr,
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_offset_arr,
buf))<0)