summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-01-14 18:47:50 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-01-14 18:47:50 (GMT)
commitcdc33803ee17ce2cd8a67a5be14c11d8b3f39fa7 (patch)
treefd1b4e2fe742c1fbe5de9ec70f826d9636f248fa /tools/lib
parentfd031dd713e925a4ffecd1f62a8c38d266c7c012 (diff)
downloadhdf5-cdc33803ee17ce2cd8a67a5be14c11d8b3f39fa7.zip
hdf5-cdc33803ee17ce2cd8a67a5be14c11d8b3f39fa7.tar.gz
hdf5-cdc33803ee17ce2cd8a67a5be14c11d8b3f39fa7.tar.bz2
[svn-r14407] more progress on the block hyperslab bug, clean code
tested: windows, linux
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index fb0bcd3..287e257 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -806,7 +806,11 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
outer_count = 1;
if (ctx.ndims > 2)
for (i = 0; i < (size_t)ctx.ndims - 2; i++)
- outer_count *= sset->count[ i ];
+ {
+ /* consider block size */
+ outer_count = outer_count * sset->count[ i ] * sset->block[ i ];
+
+ }
if(ctx.ndims>0)
init_acc_pos(&ctx,total_size);
@@ -848,24 +852,16 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
/* number of read iterations in inner loop, read by rows, to match 2D display */
if (ctx.ndims > 1)
{
-
-#if 0
- count = sset->count[ row_dim ];
- temp_count[ row_dim ] = 1;
-#else
-
/* count is the number of iterations to display all the rows
consider how many blocks */
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 */
+ /* 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 ];
-
-#endif
}
/* for the 1D case */
else