summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-01-15 00:18:29 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-01-15 00:18:29 (GMT)
commitbe4ca1f67ec5e43806378913e280cc3ca4f9d5bc (patch)
tree82d910906e265f8a45d80d9f2bc189c0cf159e42
parent7fc10c0ea7e447408ccc747d16516b5505dcffa6 (diff)
downloadhdf5-be4ca1f67ec5e43806378913e280cc3ca4f9d5bc.zip
hdf5-be4ca1f67ec5e43806378913e280cc3ca4f9d5bc.tar.gz
hdf5-be4ca1f67ec5e43806378913e280cc3ca4f9d5bc.tar.bz2
[svn-r14414] revert the subsetting calls of h5dump to 1 size block, still a bug with size > 1
tested: linux
-rw-r--r--tools/h5dump/testh5dump.sh.in4
-rw-r--r--tools/lib/h5tools.c20
-rw-r--r--tools/testfiles/tindicessub2.ddl10
-rw-r--r--tools/testfiles/tindicessub3.ddl8
4 files changed, 15 insertions, 27 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 3db5c58..c0055d6 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -378,10 +378,10 @@ TOOLTEST tindicesno.ddl -y taindices.h5
TOOLTEST tindicessub1.ddl -d 1d -s 1 -c 2 -k 3 -S 10 taindices.h5
# 2D case
-TOOLTEST tindicessub2.ddl -d 2d -s 1,2 -c 2,3 -k 2,2 -S 2,1 taindices.h5
+TOOLTEST tindicessub2.ddl -d 2d -s 1,2 -c 2,3 -k 1,1 -S 2,1 taindices.h5
# 3D case
-TOOLTEST tindicessub3.ddl -d 3d -s 0,1,2 -c 1,2,3 -k 1,2,1 -S 1,2,1 taindices.h5
+TOOLTEST tindicessub3.ddl -d 3d -s 0,1,2 -c 1,2,3 -k 1,1,1 -S 1,2,1 taindices.h5
# 4D case
TOOLTEST tindicessub4.ddl -d 4d -s 0,0,1,3 -c 2,2,6,4 taindices.h5
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 045d875..77a8bb3 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -835,12 +835,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
{
temp_start[ i ] = sset->start[ i ];
temp_count[ i ] = sset->count[ i ];
-
- if (ctx.ndims > 1)
- temp_block[ i ] = 1; /* block size is considered in temp_count later */
- else
- temp_block[ i ] = sset->block[ i ];
-
+ temp_block[ i ] = sset->block[ i ];
max_start[ i ] = 0;
}
@@ -863,16 +858,13 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
if (ctx.ndims > 1)
{
- /* count is the number of iterations to display all the rows
- consider how many blocks */
+ /* count is the number of iterations to display all the rows,
+ the block size count times */
count = sset->count[ row_dim ] * sset->block[ row_dim ];
- temp_count[ row_dim ] = 1; /* always 1 row at a time */
- /* but consider the block size in temp_count for columns */
- temp_count[ row_dim + 1 ] = sset->count[ row_dim + 1 ]
- * sset->block[ row_dim + 1 ];
-
-
+ /* always 1 row at a time, that is a block of size 1, 1 time */
+ temp_count[ row_dim ] = 1;
+ temp_block[ row_dim ] = 1;
}
/* for the 1D case */
diff --git a/tools/testfiles/tindicessub2.ddl b/tools/testfiles/tindicessub2.ddl
index 2cb8912..39260bc 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 2,2 -S 2,1 taindices.h5'
+Expected output for 'h5dump -d 2d -s 1,2 -c 2,3 -k 1,1 -S 2,1 taindices.h5'
#############################
HDF5 "taindices.h5" {
DATASET "2d" {
@@ -9,12 +9,10 @@ DATASET "2d" {
START ( 1, 2 );
STRIDE ( 2, 1 );
COUNT ( 2, 3 );
- BLOCK ( 2, 2 );
+ BLOCK ( 1, 1 );
DATA {
- (1,2): 12, 13, 14, 15, 16, 17,
- (3,2): 32, 33, 34, 35, 36, 37,
- (5,2): 52, 53, 54, 55, 56, 57,
- (7,2): 72, 73, 74, 75, 76, 77
+ (1,2): 12, 13, 14,
+ (3,2): 32, 33, 34
}
}
}
diff --git a/tools/testfiles/tindicessub3.ddl b/tools/testfiles/tindicessub3.ddl
index 222e552..16c71d3 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,2,1 -S 1,2,1 taindices.h5'
+Expected output for 'h5dump -d 3d -s 0,1,2 -c 1,2,3 -k 1,1,1 -S 1,2,1 taindices.h5'
#############################
HDF5 "taindices.h5" {
DATASET "3d" {
@@ -9,12 +9,10 @@ DATASET "3d" {
START ( 0, 1, 2 );
STRIDE ( 1, 2, 1 );
COUNT ( 1, 2, 3 );
- BLOCK ( 1, 2, 1 );
+ BLOCK ( 1, 1, 1 );
DATA {
(0,1,2): 12, 13, 14,
- (0,3,2): 32, 33, 34,
- (0,5,2): 52, 53, 54,
- (0,7,2): 72, 73, 74
+ (0,3,2): 32, 33, 34
}
}
}