summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-09-24 15:51:05 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-09-24 15:51:05 (GMT)
commit311e4c9ebfbea0be881586df16a8a411bb7fc9f8 (patch)
treee92cf9dde45481da9a6070ce0926a1d279538201 /test
parentf180bc993f45bdb5d3a46abeab9e1378e6f210da (diff)
downloadhdf5-311e4c9ebfbea0be881586df16a8a411bb7fc9f8.zip
hdf5-311e4c9ebfbea0be881586df16a8a411bb7fc9f8.tar.gz
hdf5-311e4c9ebfbea0be881586df16a8a411bb7fc9f8.tar.bz2
[svn-r720] Changes since 19980922
---------------------- ./src/H5F.c ./src/H5Fprivate.h ./src/H5P.c ./src/H5Ppublic.h ./test/chunk.c ./test/dsets.c The number of slots in the raw data cache can be queried or set with H5Pget/set_cache(), which now take an extra argument. The default number of slots is 521 and the default maximum size is 1MB. ./src/H5Fistore.c ./src/H5Fprivate.h Finished optimizations. The cache is now a hash and a linked list instead of an array. The cpu time on my machine for H5F_istore_lock() has been cut by 60% and H5F_istore_unlock() by 35%.
Diffstat (limited to 'test')
-rw-r--r--test/chunk.c16
-rw-r--r--test/dsets.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/test/chunk.c b/test/chunk.c
index 704c396..73a1e1e 100644
--- a/test/chunk.c
+++ b/test/chunk.c
@@ -159,11 +159,12 @@ test_rowmaj (int op, hsize_t cache_size, hsize_t io_size)
char *buf = calloc (1, SQUARE(io_size));
hsize_t i, j, hs_size[2];
hssize_t hs_offset[2];
- int mdc_nelmts;
+ int mdc_nelmts, rdcc_nelmts;
double w0;
- H5Pget_cache (fapl_g, &mdc_nelmts, NULL, &w0);
- H5Pset_cache (fapl_g, mdc_nelmts, cache_size*SQUARE (CH_SIZE), w0);
+ H5Pget_cache (fapl_g, &mdc_nelmts, &rdcc_nelmts, NULL, &w0);
+ H5Pset_cache (fapl_g, mdc_nelmts, rdcc_nelmts,
+ cache_size*SQUARE (CH_SIZE), w0);
file = H5Fopen (FILE_NAME, H5F_ACC_RDWR, fapl_g);
dset = H5Dopen (file, "dset");
file_space = H5Dget_space (dset);
@@ -227,11 +228,12 @@ test_diag (int op, hsize_t cache_size, hsize_t io_size, hsize_t offset)
hsize_t i, hs_size[2], nio=0;
hssize_t hs_offset[2];
char *buf = calloc (1, SQUARE (io_size));
- int mdc_nelmts;
+ int mdc_nelmts, rdcc_nelmts;
double w0;
- H5Pget_cache (fapl_g, &mdc_nelmts, NULL, &w0);
- H5Pset_cache (fapl_g, mdc_nelmts, cache_size*SQUARE (CH_SIZE), w0);
+ H5Pget_cache (fapl_g, &mdc_nelmts, &rdcc_nelmts, NULL, &w0);
+ H5Pset_cache (fapl_g, mdc_nelmts, rdcc_nelmts,
+ cache_size*SQUARE (CH_SIZE), w0);
file = H5Fopen (FILE_NAME, H5F_ACC_RDWR, fapl_g);
dset = H5Dopen (file, "dset");
file_space = H5Dget_space (dset);
@@ -293,7 +295,7 @@ main (void)
* Create a global file access property list.
*/
fapl_g = H5Pcreate (H5P_FILE_ACCESS);
- H5Pget_cache (fapl_g, NULL, NULL, &w0);
+ H5Pget_cache (fapl_g, NULL, NULL, NULL, &w0);
/* Create the file */
create_dataset ();
diff --git a/test/dsets.c b/test/dsets.c
index 0fb7732..104ee11 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -783,8 +783,6 @@ main(void)
hid_t file, grp, fapl;
herr_t status;
int nerrors=0, mdc_nelmts;
- size_t rdcc_nbytes;
- double rdcc_w0;
status = H5open ();
assert (status>=0);
@@ -798,9 +796,9 @@ main(void)
#if 1
/* Turn off raw data cache */
- status = H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nbytes, &rdcc_w0);
+ status = H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL);
assert(status>=0);
- status = H5Pset_cache(fapl, mdc_nelmts, 0, rdcc_w0);
+ status = H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0);
assert(status>=0);
#endif