summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_dset.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-10-25 20:38:28 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-10-25 20:38:28 (GMT)
commit9d94440384d20ab09297b8c451dfbda051ed6b17 (patch)
tree83c66c31c30c19b0935e3f70d90cacbe027d3bd1 /tools/lib/h5diff_dset.c
parentea1047de515e12e651e65c1b88c40b1c713f0b06 (diff)
downloadhdf5-9d94440384d20ab09297b8c451dfbda051ed6b17.zip
hdf5-9d94440384d20ab09297b8c451dfbda051ed6b17.tar.gz
hdf5-9d94440384d20ab09297b8c451dfbda051ed6b17.tar.bz2
[svn-r12815]
1) added a new parameter to the h5diff function diff_array that contains the beginning position of the hyperslab, so that the total position in the array is printed correctly when reading by hyperslabs. 2) added a new test to h5diff that reads and diffs by hyperslabs. The test reads a 1GB dataset, from which a 1KB hyperslab was written with differences . 3) added the generation of 2 files to the generator program to test the h5diff hyperslab read. 4) changed the h5diff binary pre-generated file names to be more descriptive (e.g, instead of file1.h5, made it h5diff_basic1.h5) 5) changed the name of the h5repack options text file to info.h5repack
Diffstat (limited to 'tools/lib/h5diff_dset.c')
-rw-r--r--tools/lib/h5diff_dset.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 630b408..02a415a 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -395,7 +395,7 @@ hsize_t diff_datasetid( hid_t did1,
*/
need = (size_t)(nelmts1*m_size1); /* bytes needed */
- if ( need < H5TOOLS_MALLOCSIZE )
+ if ( need < H5TOOLS_MALLOCSIZE)
{
buf1 = HDmalloc(need);
buf2 = HDmalloc(need);
@@ -412,6 +412,7 @@ hsize_t diff_datasetid( hid_t did1,
nfound = diff_array(buf1,
buf2,
nelmts1,
+ 0,
rank1,
dims1,
options,
@@ -501,18 +502,20 @@ hsize_t diff_datasetid( hid_t did1,
if ( H5Dread(did2,m_tid2,sm_space,sid2,H5P_DEFAULT,sm_buf2) < 0 )
goto error;
- /* array diff */
- nfound = diff_array(sm_buf1,
- sm_buf2,
- hs_nelmts,
- rank1,
- dims1,
- options,
- name1,
- name2,
- m_tid1,
- did1,
- did2);
+ /* get array differences. in the case of hyperslab read, increment the number of differences
+ found in each hyperslab and pass the position at the beggining for printing */
+ nfound += diff_array(sm_buf1,
+ sm_buf2,
+ hs_nelmts,
+ elmtno,
+ rank1,
+ dims1,
+ options,
+ name1,
+ name2,
+ m_tid1,
+ did1,
+ did2);
/* reclaim any VL memory, if necessary */
if(vl_data)