diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-07-10 21:19:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-07-10 21:19:18 (GMT) |
commit | 990fadfbe55353383639f0151990ec375fbe18cb (patch) | |
tree | a07f3b3215057bad7d46cbb9e26a4699b1fc8040 /test | |
parent | 0c1c23245d103927c5d59c67b84526974e6217af (diff) | |
download | hdf5-990fadfbe55353383639f0151990ec375fbe18cb.zip hdf5-990fadfbe55353383639f0151990ec375fbe18cb.tar.gz hdf5-990fadfbe55353383639f0151990ec375fbe18cb.tar.bz2 |
[svn-r4181] Purpose:
Bug Fix, Code Cleanup, Code Optimization, etc.
Description:
Fold in the hyperslab speedups, clean up compile warnings and change a
few things from using 'unsigned' or 'hsize_t' to use 'size_t' instead.
Platforms tested:
FreeBSD 4.3 (hawkwind), Solaris 2.7 (arabica), Irix64 6.5 (modi4)
Diffstat (limited to 'test')
-rw-r--r-- | test/dsets.c | 4 | ||||
-rw-r--r-- | test/tselect.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/test/dsets.c b/test/dsets.c index eb0b0bf..798d9fe 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -200,7 +200,7 @@ test_simple_io(hid_t file) tconv_buf = malloc (1000); xfer = H5Pcreate (H5P_DATASET_XFER); assert (xfer>=0); - if (H5Pset_buffer (xfer, (hsize_t)1000, tconv_buf, NULL)<0) goto error; + if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error; /* Create the dataset */ if ((dataset = H5Dcreate(file, DSET_SIMPLE_IO_NAME, H5T_NATIVE_INT, space, @@ -385,7 +385,7 @@ test_compression(hid_t file) */ if ((xfer = H5Pcreate (H5P_DATASET_XFER))<0) goto error; tconv_buf = malloc (1000); - if (H5Pset_buffer (xfer, (hsize_t)1000, tconv_buf, NULL)<0) goto error; + if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error; /* Use chunked storage with compression */ if ((dc = H5Pcreate (H5P_DATASET_CREATE))<0) goto error; diff --git a/test/tselect.c b/test/tselect.c index b140d16..3dcd1d3 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -1170,7 +1170,7 @@ test_select_hyper_contig(void) /* Compare data read with data written out */ if(HDmemcmp(rbuf,wbuf,sizeof(uint16_t)*30*12)) { - printf("hyperslab values don't match!\n"); + printf("hyperslab values don't match! Line=%d\n",__LINE__); num_errs++; #ifdef QAK for(i=0, tbuf=wbuf; i<12; i++) @@ -1319,8 +1319,14 @@ test_select_hyper_copy(void) /* Compare data read with data written out */ if(HDmemcmp(rbuf,rbuf2,sizeof(uint16_t)*SPACE3_DIM1*SPACE3_DIM2)) { - printf("hyperslab values don't match!\n"); + printf("hyperslab values don't match! Line=%d\n",__LINE__); num_errs++; +#ifdef QAK + for(i=0; i<SPACE3_DIM1; i++) + for(j=0; j<SPACE3_DIM2; j++) + if((unsigned)*(rbuf+i*SPACE3_DIM2+j)!=(unsigned)*(rbuf2+i*SPACE3_DIM2+j)) + printf("i=%d, j=%d, *rbuf=%u, *rbuf2=%u\n",i,j,(unsigned)*(rbuf+i*SPACE3_DIM2+j),(unsigned)*(rbuf2+i*SPACE3_DIM2+j)); +#endif /* QAK */ } /* end if */ /* Close memory dataspace */ @@ -3155,7 +3161,7 @@ test_select(void) hid_t plist_id; /* Property list for reading random hyperslabs */ hid_t fapl; /* Property list accessing the file */ int mdc_nelmts; /* Metadata number of elements */ - int rdcc_nelmts; /* Raw data number of elements */ + unsigned rdcc_nelmts; /* Raw data number of elements */ size_t rdcc_nbytes; /* Raw data number of bytes */ double rdcc_w0; /* Raw data write percentage */ herr_t ret; /* Generic return value */ @@ -3168,7 +3174,7 @@ test_select(void) CHECK(plist_id, FAIL, "H5Pcreate"); /* test I/O with a very small buffer for reads */ - ret=H5Pset_buffer(plist_id,(hsize_t)128,NULL,NULL); + ret=H5Pset_buffer(plist_id,128,NULL,NULL); CHECK(ret, FAIL, "H5Pset_buffer"); /* These next tests use the same file */ |