diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-08-10 19:54:35 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-08-10 19:54:35 (GMT) |
commit | ed85f64ee75de74373423f2848bc81c19b783db9 (patch) | |
tree | 971a94010bba88d150382dfc642d2164618925cc /test/cmpd_dset.c | |
parent | 9754e9373b731856dbf61fdb9c99501f452ca552 (diff) | |
download | hdf5-ed85f64ee75de74373423f2848bc81c19b783db9.zip hdf5-ed85f64ee75de74373423f2848bc81c19b783db9.tar.gz hdf5-ed85f64ee75de74373423f2848bc81c19b783db9.tar.bz2 |
[svn-r585] Fixed Step 11 but didn't turn it on yet because of a failed assertion.
Diffstat (limited to 'test/cmpd_dset.c')
-rw-r--r-- | test/cmpd_dset.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 4961eab..60219d0 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -153,7 +153,6 @@ main (void) static hsize_t dim[] = {NX, NY}; hssize_t f_offset[2]; /*offset of hyperslab in file */ hsize_t h_size[2]; /*size of hyperslab */ - hsize_t h_sample[2]; /*hyperslab sampling */ size_t memb_size[1] = {4}; /* Create the file */ @@ -586,20 +585,23 @@ STEP 10: Read middle third of hyperslab into middle third of memory array\n\ } } -#ifdef OLD_WAY /* *###################################################################### * Step 11: Write an array into the middle third of the dataset * initializeing only members `b' and `d' to -1. */ +#if 0 printf ("\ STEP 11: Write an array back to the middle third of the dataset to\n\ initialize the `b' and `d' members to -1.\n"); fflush (stdout); /* Create the memory array and initialize all fields to zero */ - ndims = H5Sget_hyperslab (s8_f_sid, f_offset, h_size, h_sample); - assert (ndims==2); + ndims = 2; + f_offset[0] = NX/3; + f_offset[1] = NY/3; + h_size[0] = 2*NX/3 - f_offset[0]; + h_size[1] = 2*NY/3 - f_offset[1]; s11 = malloc ((size_t)h_size[0]*(size_t)h_size[1]*sizeof(s4_t)); assert (s11); @@ -641,8 +643,7 @@ STEP 11: Write an array back to the middle third of the dataset to\n\ } } } -#endif /* OLD_WAY */ - +#endif |