diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-12-14 21:18:08 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-12-14 21:18:08 (GMT) |
commit | aa646b5b43361597e547cea18af1825b43ad8ecb (patch) | |
tree | 46b46713137bcbb0da32c66223739faee75be08d /tools/h5import | |
parent | 57a786d9c0242b7c94d0b0a1c8519f9b906d194a (diff) | |
download | hdf5-aa646b5b43361597e547cea18af1825b43ad8ecb.zip hdf5-aa646b5b43361597e547cea18af1825b43ad8ecb.tar.gz hdf5-aa646b5b43361597e547cea18af1825b43ad8ecb.tar.bz2 |
[svn-r13064]
Fix several bugs
1) the parsing of subsetting was using atoi to convert the parameter to an int, which caused problems for numbers greater that int. Substitute with atof
2) the printing of indices in the subsetting case was not being done. Solution: calculate the element position at the start of the subsetting using the algorythm
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
And pass that position to the function that dumps data, h5tools_dump_simple_data.
3) several index counters were declared as int, use hsize_t instead
4) modified the test generation program so that it includes test cases for subsetting of 1d, 2d, 3d, and 4d arrays and add these tests to the shell script
Diffstat (limited to 'tools/h5import')
-rwxr-xr-x | tools/h5import/h5import.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 6e233c3..f318d1e 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -2571,7 +2571,7 @@ help(char *name) (void) fprintf(stderr, "\t following values.\n"); (void) fprintf(stderr, "\t BE (default)\n"); (void) fprintf(stderr, "\t LE\n\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION:\n"); + (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES:\n"); (void) fprintf(stderr, "\t Integers separated by spaces to denote the \n"); (void) fprintf(stderr, "\t dimension sizes of the chunk for the no. of \n"); (void) fprintf(stderr, "\t dimensions determined by rank. Required field\n"); @@ -2581,7 +2581,7 @@ help(char *name) (void) fprintf(stderr, "\t COMPRESSION-TYPE:\n"); (void) fprintf(stderr, "\t String denoting the type of compression to be\n"); (void) fprintf(stderr, "\t used with the chunked storage. Requires the\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION to be specified. The only \n"); + (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n"); (void) fprintf(stderr, "\t currently supported compression method is GZIP. \n"); (void) fprintf(stderr, "\t Will accept the following value\n"); (void) fprintf(stderr, "\t GZIP\n\n"); @@ -2607,7 +2607,7 @@ help(char *name) (void) fprintf(stderr, "\t Integers separated by spaces to denote the \n"); (void) fprintf(stderr, "\t maximum dimension sizes of all the \n"); (void) fprintf(stderr, "\t dimensions determined by rank. Requires the\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION to be specified. A value of \n"); + (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n"); (void) fprintf(stderr, "\t -1 for any dimension implies UNLIMITED \n"); (void) fprintf(stderr, "\t DIMENSION size for that particular dimension.\n\n"); (void) fprintf(stderr, "\t EXAMPLES:\n"); @@ -2620,7 +2620,7 @@ help(char *name) (void) fprintf(stderr, "\t OUTPUT-SIZE 64\n"); (void) fprintf(stderr, "\t OUTPUT-ARCHITECTURE IEEE\n"); (void) fprintf(stderr, "\t OUTPUT-BYTE-ORDER LE\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION 2 2 2 \n\n"); + (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n"); (void) fprintf(stderr, "\t The above configuration will accept a floating point array \n"); (void) fprintf(stderr, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n"); (void) fprintf(stderr, "\t specified and will save it in a chunked data-set (of pattern \n"); @@ -2634,7 +2634,7 @@ help(char *name) (void) fprintf(stderr, "\t DIMENSION-SIZES 6 3 5 2 4\n"); (void) fprintf(stderr, "\t OUTPUT-CLASS IN\n"); (void) fprintf(stderr, "\t OUTPUT-SIZE 32\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION 2 2 2 2 2\n"); + (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n"); (void) fprintf(stderr, "\t EXTENDIBLE-DATASET 1 3 \n"); (void) fprintf(stderr, "\t COMPRESSION-TYPE GZIP\n"); (void) fprintf(stderr, "\t COMPRESSION-PARAM 7\n\n\n"); |