summaryrefslogtreecommitdiffstats
path: root/tools/testfiles/tindicessub3.ddl
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-12-14 21:18:08 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-12-14 21:18:08 (GMT)
commitaa646b5b43361597e547cea18af1825b43ad8ecb (patch)
tree46b46713137bcbb0da32c66223739faee75be08d /tools/testfiles/tindicessub3.ddl
parent57a786d9c0242b7c94d0b0a1c8519f9b906d194a (diff)
downloadhdf5-aa646b5b43361597e547cea18af1825b43ad8ecb.zip
hdf5-aa646b5b43361597e547cea18af1825b43ad8ecb.tar.gz
hdf5-aa646b5b43361597e547cea18af1825b43ad8ecb.tar.bz2
[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
Diffstat (limited to 'tools/testfiles/tindicessub3.ddl')
-rw-r--r--tools/testfiles/tindicessub3.ddl21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/testfiles/tindicessub3.ddl b/tools/testfiles/tindicessub3.ddl
new file mode 100644
index 0000000..76be13f
--- /dev/null
+++ b/tools/testfiles/tindicessub3.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -d 3d -s 0,1,3 -c 1,6,4 taindices.h5'
+#############################
+HDF5 "taindices.h5" {
+DATASET "3d" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 2, 10, 10 ) / ( 2, 10, 10 ) }
+ SUBSET {
+ START ( 0, 1, 3 );
+ STRIDE ( 1, 1, 1 );
+ COUNT ( 1, 6, 4 );
+ BLOCK ( 1, 1, 1 );
+ DATA {
+ (0,1,3): 13, 23, 33, 43, 53, 63,
+ (0,1,4): 14, 24, 34, 44, 54, 64,
+ (0,1,5): 15, 25, 35, 45, 55, 65,
+ (0,1,6): 16, 26, 36, 46, 56, 66
+ }
+ }
+}
+}