summaryrefslogtreecommitdiffstats
path: root/tools/testfiles
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-01-16 16:12:08 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-01-16 16:12:08 (GMT)
commit8005df6417fa0f57b8769be046ae9bd7b32f9202 (patch)
treee8f1af762f6d5e4fdcad76e0d4c72811948401ab /tools/testfiles
parent5382d51033772833b1d32edc4b4a648576cbf0ee (diff)
downloadhdf5-8005df6417fa0f57b8769be046ae9bd7b32f9202.zip
hdf5-8005df6417fa0f57b8769be046ae9bd7b32f9202.tar.gz
hdf5-8005df6417fa0f57b8769be046ae9bd7b32f9202.tar.bz2
[svn-r14437] bug fix for h5dump subsetting (deal with blocks)and new test runs
add a check for block overlap after the command line parsing * Algorithm * * In a inner loop, the parameters from SSET are translated into temporary * variables so that 1 row is printed at a time (getting the coordinate indices * at each row). * We define the stride, count and block to be 1 in the row dimension to achieve * this and advance until all points are printed. * An outer loop for cases where dimensionality is greater than 2D is made. * In each iteration, the 2D block is displayed in the inner loop. The remaining * slower dimensions above the first 2 are incremented one at a time in the outer loop * * The element position is obtained from the matrix according to: * 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 * tested: windows, linux
Diffstat (limited to 'tools/testfiles')
-rw-r--r--tools/testfiles/tindicessub1.ddl2
-rw-r--r--tools/testfiles/tindicessub2.ddl16
-rw-r--r--tools/testfiles/tindicessub3.ddl18
-rw-r--r--tools/testfiles/tindicessub4.ddl58
4 files changed, 52 insertions, 42 deletions
diff --git a/tools/testfiles/tindicessub1.ddl b/tools/testfiles/tindicessub1.ddl
index 05be904..0173fb5 100644
--- a/tools/testfiles/tindicessub1.ddl
+++ b/tools/testfiles/tindicessub1.ddl
@@ -1,5 +1,5 @@
#############################
-Expected output for 'h5dump -d 1d -s 1 -c 2 -k 3 -S 10 taindices.h5'
+Expected output for 'h5dump -d 1d -s 1 -S 10 -c 2 -k 3 taindices.h5'
#############################
HDF5 "taindices.h5" {
DATASET "1d" {
diff --git a/tools/testfiles/tindicessub2.ddl b/tools/testfiles/tindicessub2.ddl
index 39260bc..7b70d12 100644
--- a/tools/testfiles/tindicessub2.ddl
+++ b/tools/testfiles/tindicessub2.ddl
@@ -1,5 +1,5 @@
#############################
-Expected output for 'h5dump -d 2d -s 1,2 -c 2,3 -k 1,1 -S 2,1 taindices.h5'
+Expected output for 'h5dump -d 2d -s 1,2 -S 3,3 -c 3,2 -k 2,2 taindices.h5'
#############################
HDF5 "taindices.h5" {
DATASET "2d" {
@@ -7,12 +7,16 @@ DATASET "2d" {
DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) }
SUBSET {
START ( 1, 2 );
- STRIDE ( 2, 1 );
- COUNT ( 2, 3 );
- BLOCK ( 1, 1 );
+ STRIDE ( 3, 3 );
+ COUNT ( 3, 2 );
+ BLOCK ( 2, 2 );
DATA {
- (1,2): 12, 13, 14,
- (3,2): 32, 33, 34
+ (1,2): 12, 13, 15, 16,
+ (2,2): 22, 23, 25, 26,
+ (4,2): 42, 43, 45, 46,
+ (5,2): 52, 53, 55, 56,
+ (7,2): 72, 73, 75, 76,
+ (8,2): 82, 83, 85, 86
}
}
}
diff --git a/tools/testfiles/tindicessub3.ddl b/tools/testfiles/tindicessub3.ddl
index 16c71d3..fde8e82 100644
--- a/tools/testfiles/tindicessub3.ddl
+++ b/tools/testfiles/tindicessub3.ddl
@@ -1,5 +1,5 @@
#############################
-Expected output for 'h5dump -d 3d -s 0,1,2 -c 1,2,3 -k 1,1,1 -S 1,2,1 taindices.h5'
+Expected output for 'h5dump -d 3d -s 0,1,2 -S 1,3,3 -c 2,2,2 -k 1,2,2 taindices.h5'
#############################
HDF5 "taindices.h5" {
DATASET "3d" {
@@ -7,12 +7,18 @@ DATASET "3d" {
DATASPACE SIMPLE { ( 2, 10, 10 ) / ( 2, 10, 10 ) }
SUBSET {
START ( 0, 1, 2 );
- STRIDE ( 1, 2, 1 );
- COUNT ( 1, 2, 3 );
- BLOCK ( 1, 1, 1 );
+ STRIDE ( 1, 3, 3 );
+ COUNT ( 2, 2, 2 );
+ BLOCK ( 1, 2, 2 );
DATA {
- (0,1,2): 12, 13, 14,
- (0,3,2): 32, 33, 34
+ (0,1,2): 12, 13, 15, 16,
+ (0,2,2): 22, 23, 25, 26,
+ (0,4,2): 42, 43, 45, 46,
+ (0,5,2): 52, 53, 55, 56
+ (1,1,2): 112, 113, 115, 116,
+ (1,2,2): 122, 123, 125, 126,
+ (1,4,2): 142, 143, 145, 146,
+ (1,5,2): 152, 153, 155, 156
}
}
}
diff --git a/tools/testfiles/tindicessub4.ddl b/tools/testfiles/tindicessub4.ddl
index 99fca01..a57bee6 100644
--- a/tools/testfiles/tindicessub4.ddl
+++ b/tools/testfiles/tindicessub4.ddl
@@ -1,40 +1,40 @@
#############################
-Expected output for 'h5dump -d 4d -s 0,0,1,3 -c 2,2,6,4 taindices.h5'
+Expected output for 'h5dump -d 4d -s 0,0,1,2 -c 2,2,3,2 -S 1,1,3,3 -k 1,1,2,2 taindices.h5'
#############################
HDF5 "taindices.h5" {
DATASET "4d" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 2, 2, 10, 10 ) / ( 2, 2, 10, 10 ) }
SUBSET {
- START ( 0, 0, 1, 3 );
- STRIDE ( 1, 1, 1, 1 );
- COUNT ( 2, 2, 6, 4 );
- BLOCK ( 1, 1, 1, 1 );
+ START ( 0, 0, 1, 2 );
+ STRIDE ( 1, 1, 3, 3 );
+ COUNT ( 2, 2, 3, 2 );
+ BLOCK ( 1, 1, 2, 2 );
DATA {
- (0,0,1,3): 13, 14, 15, 16,
- (0,0,2,3): 23, 24, 25, 26,
- (0,0,3,3): 33, 34, 35, 36,
- (0,0,4,3): 43, 44, 45, 46,
- (0,0,5,3): 53, 54, 55, 56,
- (0,0,6,3): 63, 64, 65, 66
- (0,1,1,3): 113, 114, 115, 116,
- (0,1,2,3): 123, 124, 125, 126,
- (0,1,3,3): 133, 134, 135, 136,
- (0,1,4,3): 143, 144, 145, 146,
- (0,1,5,3): 153, 154, 155, 156,
- (0,1,6,3): 163, 164, 165, 166
- (1,0,1,3): 213, 214, 215, 216,
- (1,0,2,3): 223, 224, 225, 226,
- (1,0,3,3): 233, 234, 235, 236,
- (1,0,4,3): 243, 244, 245, 246,
- (1,0,5,3): 253, 254, 255, 256,
- (1,0,6,3): 263, 264, 265, 266
- (1,1,1,3): 313, 314, 315, 316,
- (1,1,2,3): 323, 324, 325, 326,
- (1,1,3,3): 333, 334, 335, 336,
- (1,1,4,3): 343, 344, 345, 346,
- (1,1,5,3): 353, 354, 355, 356,
- (1,1,6,3): 363, 364, 365, 366
+ (0,0,1,2): 12, 13, 15, 16,
+ (0,0,2,2): 22, 23, 25, 26,
+ (0,0,4,2): 42, 43, 45, 46,
+ (0,0,5,2): 52, 53, 55, 56,
+ (0,0,7,2): 72, 73, 75, 76,
+ (0,0,8,2): 82, 83, 85, 86
+ (0,1,1,2): 112, 113, 115, 116,
+ (0,1,2,2): 122, 123, 125, 126,
+ (0,1,4,2): 142, 143, 145, 146,
+ (0,1,5,2): 152, 153, 155, 156,
+ (0,1,7,2): 172, 173, 175, 176,
+ (0,1,8,2): 182, 183, 185, 186
+ (1,0,1,2): 212, 213, 215, 216,
+ (1,0,2,2): 222, 223, 225, 226,
+ (1,0,4,2): 242, 243, 245, 246,
+ (1,0,5,2): 252, 253, 255, 256,
+ (1,0,7,2): 272, 273, 275, 276,
+ (1,0,8,2): 282, 283, 285, 286
+ (1,1,1,2): 312, 313, 315, 316,
+ (1,1,2,2): 322, 323, 325, 326,
+ (1,1,4,2): 342, 343, 345, 346,
+ (1,1,5,2): 352, 353, 355, 356,
+ (1,1,7,2): 372, 373, 375, 376,
+ (1,1,8,2): 382, 383, 385, 386
}
}
}