summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-01-16 19:52:04 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-01-16 19:52:04 (GMT)
commit74618e3670ed6c8db4c01dd30d1d7bba70447027 (patch)
tree7cb9ab8c0802eb8a46edc885dd8d6167a3c98d24 /test
parente59138031958a1ceb6105de0e1b222f85f2ac017 (diff)
downloadhdf5-74618e3670ed6c8db4c01dd30d1d7bba70447027.zip
hdf5-74618e3670ed6c8db4c01dd30d1d7bba70447027.tar.gz
hdf5-74618e3670ed6c8db4c01dd30d1d7bba70447027.tar.bz2
[svn-r155] Changes since 19980114
---------------------- ./html/Datasets.html Removed some archaic comments about data spaces. Fixed example code. ./MANIFEST ./html/H5.format.html ./src/H5O.c ./src/H5Oprivate.h ./src/H5Ocstore.c [DELETED] ./src/H5Oistore.c [DELETED] ./src/H5Olayout.c [NEW] ./src/Makefile.in ./test/istore.c Replaced H5O_CSTORE and H5O_ISTORE messages with a more general H5O_LAYOUT message. ./src/H5D.c ./src/H5Dprivate.h ./src/H5Dpublic.h A little more work on the pipeline. Access to the file data is through the new H5F_arr_read() and H5F_arr_write() which do I/O on hyperslabs of byte arrays and don't depend on data layout. This should simplify the I/O pipeline quite a bit. I also added another argument to H5Dread() and H5Dwrite() to describe the hyerslab of the file array on which I/O is occuring. We discussed this at last week's meeting. ./src/H5Farray.c [NEW] Added functions that sit on top of H5F_block_read() and H5F_istore_read() and implement a common set of functions between all layouts. This means I/O of hyperslabs of byte-arrays in the file to arrays of bytes in memory. When operating on arrays of elements (>1byte) then we just add another dimension. That is, a 10x20 array of int32 becomes a 10x20x4 array of bytes. [This is the area I'll be working on most of next week to implement partial I/O for contiguous data and to improve performance for chunked data.] ./src/H5Fistore.c ./src/H5Fprivate.h Replaced the H5F_istore_t data type with the layout message H5O_layout_t which looks almost the same. Eventually I'd like to rename `istore' to `chunked' everywhere and use `istore' for 1-d storage where the chunks are all different sizes like in the small object heap where each object is a chunk. ./src/H5V.c Changed ISTORE to LAYOUT in one place. ./test/dsets.c Fixed for extra argument to H5Dread() and H5Dwrite().
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c11
-rw-r--r--test/istore.c35
2 files changed, 25 insertions, 21 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 45aff80..9e024af 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -231,7 +231,8 @@ test_simple_io (hid_t file)
assert (dataset>=0);
/* Write the data to the dataset */
- status = H5Dwrite (dataset, H5T_NATIVE_INT, H5P_ALL, H5C_DEFAULT, points);
+ status = H5Dwrite (dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL,
+ H5C_DEFAULT, points);
if (status<0) {
puts ("*FAILED*");
if (!isatty (1)) {
@@ -242,7 +243,8 @@ test_simple_io (hid_t file)
}
/* Read the dataset back */
- status = H5Dread (dataset, H5T_NATIVE_INT, H5P_ALL, H5C_DEFAULT, check);
+ status = H5Dread (dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL,
+ H5C_DEFAULT, check);
if (status<0) {
puts ("*FAILED*");
if (!isatty (1)) {
@@ -321,7 +323,8 @@ test_tconv (hid_t file)
assert (dataset>=0);
/* Write the data to the dataset */
- status = H5Dwrite (dataset, H5T_NATIVE_INT32, H5P_ALL, H5C_DEFAULT, out);
+ status = H5Dwrite (dataset, H5T_NATIVE_INT32, H5P_ALL, H5P_ALL,
+ H5C_DEFAULT, out);
assert (status>=0);
/* Create a new type with the opposite byte order */
@@ -339,7 +342,7 @@ test_tconv (hid_t file)
}
/* Read data with byte order conversion */
- status = H5Dread (dataset, type, H5P_ALL, H5C_DEFAULT, in);
+ status = H5Dread (dataset, type, H5P_ALL, H5P_ALL, H5C_DEFAULT, in);
assert (status>=0);
/* Check */
diff --git a/test/istore.c b/test/istore.c
index 74154fc..8f246c8 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -99,8 +99,7 @@ print_array (uint8 *array, size_t nx, size_t ny, size_t nz)
static int
new_object (H5F_t *f, const char *name, size_t ndims, H5G_entry_t *ent/*out*/)
{
- H5O_istore_t istore;
- size_t alignment[H5O_ISTORE_NDIMS];
+ H5O_layout_t layout;
intn i;
/* Create the object header */
@@ -113,16 +112,18 @@ new_object (H5F_t *f, const char *name, size_t ndims, H5G_entry_t *ent/*out*/)
return -1;
}
- /* Add the indexed-storage message */
+ /* create chunked storage */
+ layout.type = H5D_CHUNKED;
+ layout.ndims = ndims;
for (i=0; i<ndims; i++) {
if (i<NELMTS (align_g)) {
- alignment[i] = align_g[i];
+ layout.dim[i] = align_g[i];
} else {
- alignment[i] = 2;
+ layout.dim[i] = 2;
}
}
- H5F_istore_create (f, &istore, ndims, alignment);
- if (H5O_modify (ent, H5O_ISTORE, H5O_NEW_MESG, 0, &istore)<0) {
+ H5F_arr_create (f, &layout/*in,out*/);
+ if (H5O_modify (ent, H5O_LAYOUT, H5O_NEW_MESG, 0, &layout)<0) {
printf ("*FAILED*\n");
if (!isatty (1)) {
AT();
@@ -174,7 +175,7 @@ test_create (H5F_t *f, const char *prefix)
printf ("%-70s", "Testing istore create");
- for (i=1; i<=H5O_ISTORE_NDIMS; i++) {
+ for (i=1; i<=H5O_LAYOUT_NDIMS; i++) {
sprintf (name, "%s_%02d", prefix, i);
if (new_object (f, name, i, &handle)<0) return FAIL;
}
@@ -216,7 +217,7 @@ test_extend (H5F_t *f, const char *prefix,
size_t size[3];
size_t whole_size[3];
size_t nelmts;
- H5O_istore_t istore;
+ H5O_layout_t layout;
if (!nz) {
if (!ny) {
@@ -250,7 +251,7 @@ test_extend (H5F_t *f, const char *prefix,
}
goto error;
}
- if (NULL==H5O_read (&handle, H5O_ISTORE, 0, &istore)) {
+ if (NULL==H5O_read (&handle, H5O_LAYOUT, 0, &layout)) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();
@@ -258,7 +259,7 @@ test_extend (H5F_t *f, const char *prefix,
}
goto error;
}
- if (ndims!=istore.ndims) {
+ if (ndims!=layout.ndims) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();
@@ -312,7 +313,7 @@ test_extend (H5F_t *f, const char *prefix,
memset (buf, 128+ctr, nelmts);
/* Write to disk */
- if (H5F_istore_write (f, &istore, offset, size, buf)<0) {
+ if (H5F_arr_write (f, &layout, offset, size, buf)<0) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();
@@ -323,7 +324,7 @@ test_extend (H5F_t *f, const char *prefix,
/* Read from disk */
memset (check, 0xff, nelmts);
- if (H5F_istore_read (f, &istore, offset, size, check)<0) {
+ if (H5F_arr_read (f, &layout, offset, size, check)<0) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();
@@ -357,7 +358,7 @@ test_extend (H5F_t *f, const char *prefix,
/* Now read the entire array back out and check it */
memset (buf, 0xff, nx*ny*nz);
- if (H5F_istore_read (f, &istore, H5V_ZERO, whole_size, buf)<0) {
+ if (H5F_arr_read (f, &layout, H5V_ZERO, whole_size, buf)<0) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();
@@ -426,7 +427,7 @@ test_sparse (H5F_t *f, const char *prefix, size_t nblocks,
char dims[64], s[256], name[256];
size_t offset[3], size[3], total=0;
H5G_entry_t handle;
- H5O_istore_t istore;
+ H5O_layout_t layout;
uint8 *buf = NULL;
if (!nz) {
@@ -458,7 +459,7 @@ test_sparse (H5F_t *f, const char *prefix, size_t nblocks,
}
goto error;
}
- if (NULL==H5O_read (&handle, H5O_ISTORE, 0, &istore)) {
+ if (NULL==H5O_read (&handle, H5O_LAYOUT, 0, &layout)) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();
@@ -477,7 +478,7 @@ test_sparse (H5F_t *f, const char *prefix, size_t nblocks,
memset (buf, 128+ctr, nx*ny*nz);
/* write to disk */
- if (H5F_istore_write (f, &istore, offset, size, buf)<0) {
+ if (H5F_arr_write (f, &layout, offset, size, buf)<0) {
puts ("*FAILED*");
if (!isatty (1)) {
AT ();