hdf5/tools/testfiles/tdset2-1s.ddl
Pedro Vicente Nunes aa646b5b43 [svn-r13064]
Fix several bugs

1) the parsing of subsetting was using atoi to convert the parameter to an int, which caused problems for numbers greater that int. Substitute with atof

2) the printing of indices in the subsetting case was not being done. Solution: calculate the element position at the start of the subsetting using the algorythm 

Given an index I(z,y,x) its position from the beginning of an array   of sizes A(size_z, size_y,size_x) is given by
Position of I(z,y,x) = index_z * size_y * size_x 
                              + index_y * size_x
                              + index_x

And pass that position to the function that dumps data, h5tools_dump_simple_data. 

3) several index counters were declared as int, use hsize_t instead

4) modified the test generation program so that it includes test cases for subsetting of 1d, 2d, 3d, and 4d arrays and add these tests to the shell script
2006-12-14 16:18:08 -05:00

22 lines
625 B
SQL

#############################
Expected output for 'h5dump -d /dset1[;3,2;4,4;1,4] tdset2.h5'
#############################
HDF5 "tdset2.h5" {
DATASET "/dset1" {
DATATYPE H5T_STD_I32BE
DATASPACE SIMPLE { ( 10, 20 ) / ( H5S_UNLIMITED, 20 ) }
SUBSET {
START ( 0, 0 );
STRIDE ( 3, 2 );
COUNT ( 4, 4 );
BLOCK ( 1, 4 );
DATA {
(0,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
(0,2): 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5,
(0,4): 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7,
(0,6): 6, 7, 8, 9, 6, 7, 8, 9, 6, 7, 8, 9, 6, 7, 8, 9
}
}
}
}