[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
This commit is contained in:
Pedro Vicente Nunes
2006-12-14 16:18:08 -05:00
parent 57a786d9c0
commit aa646b5b43
18 changed files with 566 additions and 381 deletions

View File

@@ -262,7 +262,7 @@ hsize_t diff_array( void *_mem1,
acc[rank-1]=1;
for(j=(rank-2); j>=0; j--)
{
acc[j]=acc[j+1]*(int)dims[j+1];
acc[j]=acc[j+1]*dims[j+1];
}
for ( j = 0; j < rank; j++)
pos[j]=0;