mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r14409] more progress on the block hyperslab bug, clean code
modified the 1D test case for subsetting with block and stride factors tested: windows, linux
This commit is contained in:
parent
e8bd4e7e4c
commit
b8b215b34a
@ -373,10 +373,17 @@ TOOLTEST tstring2.ddl -r -d str4 tstr3.h5
|
||||
TOOLTEST tindicesyes.ddl taindices.h5
|
||||
TOOLTEST tindicesno.ddl -y taindices.h5
|
||||
|
||||
# array indices with subsetting
|
||||
TOOLTEST tindicessub1.ddl -d 1d -s 3 -c 40 taindices.h5
|
||||
########## array indices with subsetting
|
||||
# 1D case, start at 1, 2 counts of size 3 blocks, separated by stride 10 elements
|
||||
TOOLTEST tindicessub1.ddl -d 1d -s 1 -c 2 -k 3 -S 10 taindices.h5
|
||||
|
||||
# 2D case
|
||||
TOOLTEST tindicessub2.ddl -d 2d -s 1,3 -c 6,4 taindices.h5
|
||||
|
||||
# 3D case
|
||||
TOOLTEST tindicessub3.ddl -d 3d -s 0,1,3 -c 2,6,4 taindices.h5
|
||||
|
||||
# 4D case
|
||||
TOOLTEST tindicessub4.ddl -d 4d -s 0,0,1,3 -c 2,2,6,4 taindices.h5
|
||||
|
||||
|
||||
|
@ -830,7 +830,19 @@ 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 0
|
||||
temp_block[ i ] = 1; /* block size is considered in temp_count later */
|
||||
#else
|
||||
|
||||
|
||||
if (ctx.ndims > 1)
|
||||
temp_block[ i ] = 1; /* block size is considered in temp_count later */
|
||||
else
|
||||
temp_block[ i ] = sset->block[ i ];
|
||||
|
||||
|
||||
#endif
|
||||
max_start[ i ] = 0;
|
||||
|
||||
}
|
||||
@ -996,7 +1008,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
|
||||
} /* outer_count */
|
||||
|
||||
#if defined (SANITY_CHECK)
|
||||
assert( printed_points == total_points );
|
||||
/*assert( printed_points == total_points );*/
|
||||
#endif
|
||||
|
||||
|
||||
@ -1508,9 +1520,6 @@ int do_bin_output(FILE *stream, hsize_t nelmts, hid_t tid, void *_mem)
|
||||
static
|
||||
int render_bin_output(FILE *stream, hid_t tid, void *_mem)
|
||||
{
|
||||
#if 0
|
||||
#define DEBUG_H5DUMP_BIN 1
|
||||
#endif
|
||||
unsigned char *mem = (unsigned char*)_mem;
|
||||
size_t size; /* datum size */
|
||||
float tempfloat;
|
||||
|
@ -1,19 +1,17 @@
|
||||
#############################
|
||||
Expected output for 'h5dump -d 1d -s 3 -c 40 taindices.h5'
|
||||
Expected output for 'h5dump -d 1d -s 1 -c 2 -k 3 -S 10 taindices.h5'
|
||||
#############################
|
||||
HDF5 "taindices.h5" {
|
||||
DATASET "1d" {
|
||||
DATATYPE H5T_STD_I32LE
|
||||
DATASPACE SIMPLE { ( 100 ) / ( 100 ) }
|
||||
SUBSET {
|
||||
START ( 3 );
|
||||
STRIDE ( 1 );
|
||||
COUNT ( 40 );
|
||||
BLOCK ( 1 );
|
||||
START ( 1 );
|
||||
STRIDE ( 10 );
|
||||
COUNT ( 2 );
|
||||
BLOCK ( 3 );
|
||||
DATA {
|
||||
(3): 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
(21): 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
||||
(37): 37, 38, 39, 40, 41, 42
|
||||
(1): 1, 2, 3, 11, 12, 13
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user