[svn-r14414] revert the subsetting calls of h5dump to 1 size block, still a bug with size > 1

tested: linux
This commit is contained in:
Pedro Vicente Nunes 2008-01-14 19:18:29 -05:00
parent 7fc10c0ea7
commit be4ca1f67e
4 changed files with 15 additions and 27 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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
}
}
}

View File

@ -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
}
}
}