summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-03-04 00:27:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-03-04 00:27:40 (GMT)
commit5b294640c003dac45c2cc489793950207bf63c8f (patch)
treeef451f922a5242888c2cd63552212fa278284162 /tools
parentdc059968de3823ffa1b0008c14b7e7e46c1fb8d8 (diff)
parent6ee9ea656fad6f408e81bd995eb465e0dd4ce0db (diff)
downloadhdf5-5b294640c003dac45c2cc489793950207bf63c8f.zip
hdf5-5b294640c003dac45c2cc489793950207bf63c8f.tar.gz
hdf5-5b294640c003dac45c2cc489793950207bf63c8f.tar.bz2
[svn-r26350] Merge of r26273-26348 from the trunk.
Tested on: h5committest
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/h5diffgentest.c160
-rw-r--r--tools/h5dump/h5dumpgentest.c74
-rw-r--r--tools/h5import/h5importtest.c12
-rw-r--r--tools/h5jam/h5jamgentest.c4
-rw-r--r--tools/lib/h5tools_dump.c430
-rw-r--r--tools/lib/io_timer.c2
-rw-r--r--tools/perform/chunk.c16
-rw-r--r--tools/perform/iopipe.c18
-rw-r--r--tools/perform/overhead.c2
-rw-r--r--tools/perform/perf.c3
-rw-r--r--tools/perform/sio_perf.c20
-rw-r--r--tools/perform/zip_perf.c8
12 files changed, 350 insertions, 399 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 80405e9..1b80317 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -317,10 +317,10 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*/
{
- double data1[3][2] = {{1,1}, {1,1}, {0,0}};
- double data2[3][2] = {{0,1.1},{1.01,1.001},{0,1}};
- double data3[3][2] = {{100,100},{100,100},{100,100}};
- double data4[3][2] = {{105,120},{160,95},{80,40}};
+ double data1[3][2] = {{ 1.0F, 1.0F}, { 1.00F, 1.000F}, { 0.0F, 0.0F}};
+ double data2[3][2] = {{ 0.0F, 1.1F}, { 1.01F, 1.001F}, { 0.0F, 1.0F}};
+ double data3[3][2] = {{100.0F, 100.0F}, {100.00F, 100.000F}, {100.0F, 100.0F}};
+ double data4[3][2] = {{105.0F, 120.0F}, {160.00F, 95.000F}, { 80.0F, 40.0F}};
write_dset(gid1,2,dims2,"dset1",H5T_NATIVE_DOUBLE,data1);
write_dset(gid2,2,dims2,"dset2",H5T_NATIVE_DOUBLE,data2);
@@ -371,8 +371,8 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*-------------------------------------------------------------------------
*/
{
- double data9[3][2] = {{100,100},{100,0},{0,100}};
- double data10[3][2] ={{120,80}, {0,100},{0,50}};
+ double data9[3][2] = {{100.0F, 100.0F}, {100.0F, 0.0F}, {0.0F, 100.0F}};
+ double data10[3][2] ={{120.0F, 80.0F}, { 0.0F, 100.0F}, {0.0F, 50.0F}};
write_dset(gid1,2,dims2,"dset9",H5T_NATIVE_DOUBLE,data9);
write_dset(gid1,2,dims2,"dset10",H5T_NATIVE_DOUBLE,data10);
@@ -393,8 +393,14 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
/* epsilon = 0.0000000000000001 = 1e-16
* system epsilon for double : DBL_EPSILON = 2.22045E-16
*/
- double data13[3][2] ={{0.0000000000000000, 0.0000000000000001},{0.0000000000000001, 0.0000000000000000},{0.00000000000000033, 0.0000000000000001}};
- double data14[3][2] ={{0.0000000000000000, 0.0000000000000004},{0.0000000000000002, 0.0000000000000001},{0.0000000000000001, 0.00000000000000000}};
+ double data13[3][2] ={
+ {H5_DOUBLE(0.0000000000000000), H5_DOUBLE(0.0000000000000001)},
+ {H5_DOUBLE(0.0000000000000001), H5_DOUBLE(0.0000000000000000)},
+ {H5_DOUBLE(0.00000000000000033), H5_DOUBLE(0.0000000000000001)}};
+ double data14[3][2] ={
+ {H5_DOUBLE(0.0000000000000000), H5_DOUBLE(0.0000000000000004)},
+ {H5_DOUBLE(0.0000000000000002), H5_DOUBLE(0.0000000000000001)},
+ {H5_DOUBLE(0.0000000000000001), H5_DOUBLE(0.00000000000000000)}};
write_dset(gid1,2,dims2,"fp1",H5T_NATIVE_FLOAT,data11);
write_dset(gid1,2,dims2,"fp2",H5T_NATIVE_FLOAT,data12);
@@ -412,7 +418,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*-------------------------------------------------------------------------
*/
- long double data15[3][2] ={{1,1},{1,1},{1,1}};
+ long double data15[3][2] ={{1.0L,1.0L},{1.0L,1.0L},{1.0L,1.0L}};
write_dset(gid1,2,dims2,"ld",H5T_NATIVE_LDOUBLE,data15);
@@ -430,19 +436,19 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
float data15[6];
float data16[6];
- data15[0] = (float) sqrt( (double)-1 );
- data15[1] = 1;
- data15[2] = (float) sqrt( (double)-1 );
- data15[3] = 1;
- data15[4] = 1;
- data15[5] = 1;
+ data15[0] = (float)HDsqrt(-1.0F);
+ data15[1] = 1.0F;
+ data15[2] = (float)HDsqrt(-1.0F);
+ data15[3] = 1.0F;
+ data15[4] = 1.0F;
+ data15[5] = 1.0F;
- data16[0] = (float) sqrt( (double)-1 );
- data16[1] = (float) sqrt( (double)-1 );
- data16[2] = 1;
- data16[3] = 1;
- data16[4] = 1;
- data16[5] = 1;
+ data16[0] = (float)HDsqrt(-1.0F);
+ data16[1] = (float)HDsqrt(-1.0F);
+ data16[2] = 1.0F;
+ data16[3] = 1.0F;
+ data16[4] = 1.0F;
+ data16[5] = 1.0F;
write_dset(gid1,1,dims1,"fp15",H5T_NATIVE_FLOAT,data15);
write_dset(gid1,1,dims1,"fp16",H5T_NATIVE_FLOAT,data16);
@@ -458,19 +464,19 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
double data17[6];
double data18[6];
- data17[0] = sqrt( (double)-1 );
- data17[1] = 1;
- data17[2] = sqrt( (double)-1 );
- data17[3] = 1;
- data17[4] = 1;
- data17[5] = 1;
+ data17[0] = HDsqrt(-1.0F);
+ data17[1] = 1.0F;
+ data17[2] = HDsqrt(-1.0F);
+ data17[3] = 1.0F;
+ data17[4] = 1.0F;
+ data17[5] = 1.0F;
- data18[0] = (float) sqrt( (double)-1 );
- data18[1] = (float) sqrt( (double)-10000 );
- data18[2] = 1;
- data18[3] = 1;
- data18[4] = 1;
- data18[5] = 1;
+ data18[0] = HDsqrt(-1.0F);
+ data18[1] = HDsqrt(-10000.0F);
+ data18[2] = 1.0F;
+ data18[3] = 1.0F;
+ data18[4] = 1.0F;
+ data18[5] = 1.0F;
write_dset(gid1,1,dims1,"fp17",H5T_NATIVE_DOUBLE,data17);
write_dset(gid1,1,dims1,"fp18",H5T_NATIVE_DOUBLE,data18);
@@ -485,11 +491,11 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
float data19[6];
double data20[6];
- data19[0] = data19[1] = data19[2] = log(0);
- data19[3] = data19[4] = data19[5] = -log(0);
+ data19[0] = data19[1] = data19[2] = (float)HDlog(0.0F);
+ data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0F);
- data20[0] = data20[1] = data20[2] = log(0);
- data20[3] = data20[4] = data20[5] = -log(0);
+ data20[0] = data20[1] = data20[2] = HDlog(0.0F);
+ data20[3] = data20[4] = data20[5] = -HDlog(0.0F);
write_dset(gid1,1,dims1,"fp19",H5T_NATIVE_FLOAT,data19);
write_dset(gid1,1,dims1,"fp19_COPY",H5T_NATIVE_FLOAT,data19);
@@ -514,15 +520,15 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
size_t type_size;
hid_t tid;
- buf1[0].d = sqrt( (double)-1 );
- buf1[0].f = (float) sqrt( (double)-1 );
- buf2[0].d = sqrt( (double)-1 );
- buf2[0].f = (float) sqrt( (double)-1 );
+ buf1[0].d = HDsqrt(-1.0F);
+ buf1[0].f = (float)HDsqrt(-1.0F);
+ buf2[0].d = HDsqrt(-1.0F);
+ buf2[0].f = (float)HDsqrt(-1.0F);
- buf1[1].d = sqrt( (double)-1 );
- buf1[1].f = (float) sqrt( (double)-1 );
- buf2[1].d = 0;
- buf2[1].f = 0;
+ buf1[1].d = HDsqrt(-1.0F);
+ buf1[1].f = (float)HDsqrt(-1.0F);
+ buf2[1].d = 0.0F;
+ buf2[1].f = 0.0F;
type_size = sizeof( cmp1_t );
tid = H5Tcreate (H5T_COMPOUND, type_size );
@@ -555,7 +561,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
int i;
} cmp3_t;
- double data2[6] = {0,0,0,0,0,0};
+ double data2[6] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
int data3[6] = {0,0,0,0,0,0};
int data4[3][2] = {{0,0},{0,0},{0,0}};
int data5[2][2] = {{0,0},{0,0}};
@@ -770,10 +776,10 @@ int test_datatypes(const char *fname)
int buf3b[3][2] = {{1,1},{3,4},{5,6}};
long buf4a[3][2] = {{1,1},{1,1},{1,1}};
long buf4b[3][2] = {{1,1},{3,4},{5,6}};
- float buf5a[3][2] = {{1,1},{1,1},{1,1}};
- float buf5b[3][2] = {{1,1},{3,4},{5,6}};
- double buf6a[3][2] = {{1,1},{1,1},{1,1}};
- double buf6b[3][2] = {{1,1},{3,4},{5,6}};
+ float buf5a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}};
+ float buf5b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}};
+ double buf6a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}};
+ double buf6b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}};
/*unsigned/signed test
signed char -128 to 127
@@ -1025,10 +1031,10 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
/* file1 attr */
int f1_attr_idata[2]= {1,2}; /* integer */
- float f1_attr_fdata[2]= {1.1,2.2}; /* float */
+ float f1_attr_fdata[2]= {1.1F,2.2F}; /* float */
/* file2 attr */
int f2_attr_idata[2]= {2,3}; /* integer */
- float f2_attr_fdata[2]= {2.1,3.2}; /* float */
+ float f2_attr_fdata[2]= {2.1F,3.2F}; /* float */
/*----------------------------------------------------------------------
@@ -4363,7 +4369,7 @@ static void test_comps_array (const char *fname, const char *dset, const char *a
for(j=0; j < SDIM_CMPD_ARRAY; j++)
{
wdata[i].cmpd2[j].i2 = i*10 + diff;
- wdata[i].cmpd2[j].f2 = (float)(i*10.5) + diff;
+ wdata[i].cmpd2[j].f2 = (float)(i*10.5F) + diff;
} /* end for */
}
@@ -4480,7 +4486,7 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a
for(j=0; j<(i+1); j++)
{
((cmpd2_t *)wdata[i].vl.p)[j].i2 = i*10 + diff;
- ((cmpd2_t *)wdata[i].vl.p)[j].f2 = (float)(i*10.5) + diff;
+ ((cmpd2_t *)wdata[i].vl.p)[j].f2 = (float)(i*10.5F) + diff;
} /* end for */
} /* end for */
@@ -4606,7 +4612,7 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch
{
/* Initialize data of compound3 */
((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].i3 = j*10 + diff;
- ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].f3 = (float)(j*10.5) + diff;
+ ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].f3 = (float)(j*10.5F) + diff;
} /* end for */
} /* end for */
}
@@ -4753,8 +4759,8 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch
for (k=0; k < SDIM_CMPD_ARRAY; k++)
{
/* compound 3 data */
- ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].i3 = k*10.5 + diff;
- ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].f3 = (float)(k*10.5) + diff;
+ ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].i3 = k*10.5F + diff;
+ ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].f3 = (float)(k*10.5F) + diff;
}
} /* end for */
} /* end for */
@@ -5246,27 +5252,27 @@ void write_attr_in(hid_t loc_id,
char buf1[2][STR_SIZE]= {"ab","de"}; /* string */
char *buf1a[2]; /* VL string */
char buf2[2]= {1,2}; /* bitfield, opaque */
- s_t buf3[2]= {{1,2},{3,4}}; /* compound */
+ s_t buf3[2]= {{1,2.0F},{3,4.0F}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2]= {RED,RED}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1]={3}; /* array dimension */
int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
int buf7[2]= {1,2}; /* integer */
- float buf8[2]= {1,2}; /* float */
+ float buf8[2]= {1.0F, 2.0F}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
hsize_t dims2[2]={3,2};
- char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */
- char *buf12a[3][2]; /* VL string */
- char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
- s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
- hobj_ref_t buf42[3][2]; /* reference */
- e_t buf452[3][2]; /* enum */
- hvl_t buf52[3][2]; /* vlen */
- int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
- int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
- float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
+ char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */
+ char *buf12a[3][2]; /* VL string */
+ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
+ s_t buf32[6]= {{1,2.0F},{3,4.0F},{5,6.0F},{7,8.0F},{9,10.0F},{11,12.0F}}; /* compound */
+ hobj_ref_t buf42[3][2]; /* reference */
+ e_t buf452[3][2]; /* enum */
+ hvl_t buf52[3][2]; /* vlen */
+ int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
+ int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
+ float buf82[3][2]= {{1.0F,2.0F},{3.0F,4.0F},{5.0F,6.0F}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3]={4,3,2};
@@ -6017,7 +6023,7 @@ void write_attr_in(hid_t loc_id,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf33[i][j][k].a=0;
- buf33[i][j][k].b=0;
+ buf33[i][j][k].b=0.0F;
}
else {
buf33[i][j][k].a=n++;
@@ -6231,7 +6237,7 @@ void write_attr_in(hid_t loc_id,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k]=0;
- buf83[i][j][k]=0;
+ buf83[i][j][k]=0.0F;
}
else {
buf73[i][j][k]=n++;
@@ -6303,26 +6309,26 @@ void write_dset_in(hid_t loc_id,
char buf1[2][STR_SIZE]= {"ab","de"}; /* string */
char *buf1a[2]; /* VL string */
char buf2[2]= {1,2}; /* bitfield, opaque */
- s_t buf3[2]= {{1,2},{3,4}}; /* compound */
+ s_t buf3[2]= {{1,2.0F},{3,4.0F}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2]= {RED,GREEN}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1]={3}; /* array dimension */
int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
int buf7[2]= {1,2}; /* integer */
- float buf8[2]= {1,2}; /* float */
+ float buf8[2]= {1.0F,2.0F}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
hsize_t dims2[2]={3,2};
char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */
char *buf12a[3][2]; /* VL string */
char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
- s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
+ s_t buf32[6]= {{1,2.0F},{3,4.0F},{5,6.0F},{7,8.0F},{9,10.0F},{11,12.0F}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
- float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
+ float buf82[3][2]= {{1.0F,2.0F},{3.0F,4.0F},{5.0F,6.0F}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3]={4,3,2};
@@ -6859,7 +6865,7 @@ void write_dset_in(hid_t loc_id,
if (make_diffs)
{
buf33[i][j][k].a=0;
- buf33[i][j][k].b=0;
+ buf33[i][j][k].b=0.0F;
}
else {
buf33[i][j][k].a=n++;
@@ -6968,7 +6974,7 @@ void write_dset_in(hid_t loc_id,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k]=0;
- buf83[i][j][k]=0;
+ buf83[i][j][k]=0.0F;
}
else {
buf73[i][j][k]=n++;
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 36c9642..c04afe9 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -429,7 +429,7 @@ gent_dataset(void)
for(i = 0; i < 30; i++)
for(j = 0; j < 20; j++)
- dset2[i][j] = 0.0001 * j + i;
+ dset2[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
@@ -524,7 +524,7 @@ gent_attribute(void)
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT);
- for(i = 0; i < 10; i++) d[i] = 0.1 * i;
+ for(i = 0; i < 10; i++) d[i] = 0.1F * i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space);
@@ -952,16 +952,16 @@ static void gent_compound_dt(void) { /* test compound data type */
for(i = 0; i < (int)sdim; i++) {
dset1[i].a = i;
dset1[i].b = (float)(i*i);
- dset1[i].c = (float)(1./(i+1));
+ dset1[i].c = (float)(1.0F/(i+1));
dset2[i].a = i;
- dset2[i].b = (float)(i+ i*0.1);
+ dset2[i].b = (float)(i+ i*0.1F);
dset4[i].a = i;
dset4[i].b = (float)(i+3);
dset5[i].a = i;
- dset5[i].b = (float)(i*0.1);
+ dset5[i].b = (float)(i*0.1F);
}
@@ -1137,16 +1137,16 @@ static void gent_compound_dt2(void) { /* test compound data type */
for(i = 0; i < (int)sdim; i++) {
dset1[i].a = i;
dset1[i].b = (float)(i*i);
- dset1[i].c = (float)(1./(i+1));
+ dset1[i].c = (float)(1.0F/(i+1));
dset2[i].a = i;
- dset2[i].b = (float)(i+ i*0.1);
+ dset2[i].b = (float)(i+ i*0.1F);
dset4[i].a = i;
- dset4[i].b = (float)(i*1.0);
+ dset4[i].b = (float)(i*1.0F);
dset5[i].a = i;
- dset5[i].b = (float)(i*1.0);
+ dset5[i].b = (float)(i*1.0F);
}
fid = H5Fcreate(FILE9, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1386,7 +1386,7 @@ static void gent_all(void)
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate2(group, "dset2.1", H5T_IEEE_F32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- dset2_1[i] = (float)(i * 0.1 + 1);
+ dset2_1[i] = (float)(i * 0.1F + 1);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Sclose(space);
H5Dclose(dataset);
@@ -1397,7 +1397,7 @@ static void gent_all(void)
dataset = H5Dcreate2(group, "dset2.2", H5T_IEEE_F32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 3; i++)
for(j = 0; j < 5; j++)
- dset2_2[i][j] = (float)((i + 1) * j * 0.1);
+ dset2_2[i][j] = (float)((i + 1) * j * 0.1F);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Sclose(space);
H5Dclose(dataset);
@@ -1565,7 +1565,7 @@ gent_many(void)
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- d[i] = 0.1 * i;
+ d[i] = 0.1F * i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space2);
H5Aclose(attr);
@@ -2378,10 +2378,10 @@ static void gent_nestcomp(void)
for(i = 0; i< 10; i++) {
s1[i].a = i;
s1[i].b = (float)(i*i);
- s1[i].c = 1./(i+1);
+ s1[i].c = 1.0F/(i+1);
s1[i].d.a = 65 + i;
- s1[i].d.b[0] = -100.;
- s1[i].d.b[1] = 100.;
+ s1[i].d.b[0] = -100.0F;
+ s1[i].d.b[1] = 100.0F;
}
/*
@@ -2582,7 +2582,7 @@ static void gent_vldatatypes(void)
wdata[i].len = i + 1;
for(j = 0; j < i + 1; j++)
- ((float *)wdata[i].p)[j] = (float)(i * 10 + ((float)j) / 10.0);
+ ((float *)wdata[i].p)[j] = (float)(i * 10 + ((float)j) / 10.0F);
}
/* write out the floats in little-endian format */
@@ -2716,7 +2716,7 @@ static void gent_vldatatypes3(void)
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
wdata[i].i=i*10;
- wdata[i].f=(float)((i*20)/3.0);
+ wdata[i].f=(float)((i*20)/3.0F);
wdata[i].v.p=HDmalloc((i+1)*sizeof(unsigned int));
wdata[i].v.len=i+1;
for(j=0; j<(i+1); j++)
@@ -2788,7 +2788,7 @@ static void gent_vldatatypes4(void)
wdata[i].len=i+1;
for(j=0; j<(i+1); j++) {
((s1 *)wdata[i].p)[j].i=i*10+j;
- ((s1 *)wdata[i].p)[j].f=(float)((i*20+j)/3.0);
+ ((s1 *)wdata[i].p)[j].f=(float)((i*20+j)/3.0F);
} /* end for */
} /* end for */
@@ -3159,7 +3159,7 @@ static void gent_array4(void)
for(i=0; i<SPACE1_DIM1; i++)
for(j=0; j<ARRAY1_DIM1; j++) {
wdata[i][j].i=i*10+j;
- wdata[i][j].f=(float)(i*2.5+j);
+ wdata[i][j].f=(float)(i*2.5F+j);
} /* end for */
/* Create file */
@@ -3227,7 +3227,7 @@ static void gent_array5(void)
for(j=0; j<ARRAY1_DIM1; j++) {
wdata[i][j].i=i*10+j;
for(k=0; k<ARRAY1_DIM1; k++)
- wdata[i][j].f[k]=(float)(i*10+j*2.5+k);
+ wdata[i][j].f[k]=(float)(i*10+j*2.5F+k);
} /* end for */
/* Create file */
@@ -4933,10 +4933,10 @@ static void gent_compound_complex(void)
}
}
- Array1[m].e = (float)( m * .96 );
+ Array1[m].e = (float)( m * 0.96F );
for(n = 0; n < F41_ARRAY_DIMf; n++) {
- Array1[m].f[n] = ( m * 1024.9637 );
+ Array1[m].f[n] = ( m * 1024.9637F );
}
Array1[m].g = 'm';
@@ -6873,7 +6873,7 @@ gent_fpformat(void)
{
hid_t fid, sid, did;
hsize_t dims[1] = {6};
- double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0};
+ double dbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -7193,7 +7193,7 @@ gent_packedbits(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
@@ -7383,7 +7383,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl);
@@ -7591,7 +7591,7 @@ static void gent_compound_intsizes(void) {
for(n = 0; n < dims[0]; n++)
for(o = 0; o < dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
+ Array1[m].dsetdbl[n][o] = 0.0001F * o + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -7866,7 +7866,7 @@ static void gent_compound_attr_intsizes(void) {
for(n = 0; n < dims[0]; n++)
for(o = 0; o < dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
+ Array1[m].dsetdbl[n][o] = 0.0001F * o + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8034,17 +8034,17 @@ static void gent_nested_compound_dt(void) { /* test nested data type */
dset1[i].b = (float)(i*i);
dset2[i].a = i;
- dset2[i].b = (float)(i+i*0.1);
+ dset2[i].b = (float)(i+i*0.1F);
dset2[i].c = GREEN;
for(j = 0; j < 5; j++) {
dset3[i].a[j] = i*j;
for(k = 0; k < 6; k++) {
- dset3[i].b[j][k] = (float)(i*j*k*1.0);
+ dset3[i].b[j][k] = (float)(i*j*k*1.0F);
}
}
dset3[i].c.a = i;
- dset3[i].c.b = (float)(i*1.0);
+ dset3[i].c.b = (float)(i*1.0F);
}
fid = H5Fcreate(FILE72, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -8332,7 +8332,7 @@ gent_intscalars(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
@@ -8531,7 +8531,7 @@ gent_attr_intscalars(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Awrite(attr, tid, dsetdbl);
@@ -8717,7 +8717,7 @@ static void gent_compound_int_array(void) {
dims[0] = F76_DIM8;
for(n = 0; n < dims[0]; n++)
- Cmpd1[m].dsetdbl[n] = 0.0001 + n;
+ Cmpd1[m].dsetdbl[n] = 0.0001F + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8948,8 +8948,8 @@ static void gent_compound_ints(void) {
val64bits <<= 1;
/* Double Dummy set for failure tests */
- Cmpd1[m].dsetdbl = 0.0001 + m;
- Cmpd2[m].dsetdbl = 0.0001 + m;
+ Cmpd1[m].dsetdbl = 0.0001F + m;
+ Cmpd2[m].dsetdbl = 0.0001F + m;
}
/* Create the dataspace */
@@ -9286,7 +9286,7 @@ gent_intattrscalars(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
/* Attribute of double */
@@ -9551,7 +9551,7 @@ gent_intsattrs(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++) {
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
asetdbl[i*dims[1]+j] = dsetdbl[i][j];
}
diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c
index 49f977c..ac839fb 100644
--- a/tools/h5import/h5importtest.c
+++ b/tools/h5import/h5importtest.c
@@ -40,13 +40,13 @@ main(void)
FILE *sp;
float row4[3], col4[4], pln4[5];
- float rowo4 = (float)11.0e0, colo4 = (float)21.0e0, plno4 = (float)51.0e0;
- float rowi4 = (float)1.0e0, coli4 = (float)2.0e0, plni4 = (float)5.0e0;
+ float rowo4 = 11.0F, colo4 = 21.0F, plno4 = 51.0F;
+ float rowi4 = 1.0F, coli4 = 2.0F, plni4 = 5.0F;
int b32i3[5][3][4];
int row4i[3], col4i[4], pln4i[5];
- int rowo4i = (int)11 , colo4i = (int)21 , plno4i = (int)51 ;
- int rowi4i = (int)1 , coli4i = (int)2 , plni4i = (int)5 ;
+ int rowo4i = 11 , colo4i = 21 , plno4i = 51 ;
+ int rowi4i = 1 , coli4i = 2 , plni4i = 5 ;
#ifdef H5_SIZEOF_LONG_LONG
long long row4i64[3], col4i64[4], pln4i64[5];
@@ -66,8 +66,8 @@ main(void)
double b64r3[5][3][4];
double row8[3], col8[4], pln8[5];
- double rowo8 = 11.0e0, colo8 = 21.0e0, plno8 = 51.0e0;
- double rowi8 = 1.0e0, coli8 = 2.0e0, plni8 = 5.0e0;
+ double rowo8 = 11.0F, colo8 = 21.0F, plno8 = 51.0F;
+ double rowi8 = 1.0F, coli8 = 2.0F, plni8 = 5.0F;
/*
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 9636597..5a93c13 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -254,7 +254,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate2(group, "dset2.1", H5T_IEEE_F32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 10; i++)
- dset2_1[i] = (float)(i*0.1+1);
+ dset2_1[i] = (float)(i*0.1F+1);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Sclose(space);
H5Dclose(dataset);
@@ -265,7 +265,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dataset = H5Dcreate2(group, "dset2.2", H5T_IEEE_F32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 3; i++)
for (j = 0; j < 5; j++)
- dset2_2[i][j] = (float)((i+1)*j*0.1);
+ dset2_2[i][j] = (float)((i+1)*j*0.1F);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Sclose(space);
H5Dclose(dataset);
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index ba1af19..26cac47 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2468,7 +2468,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
/* Close array base type */
if(H5Tclose(super) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
- }
+ }
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_super failed");
@@ -2842,17 +2842,13 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
}
+
/*-------------------------------------------------------------------------
* Function: dump_fill_value
*
* Purpose: prints the fill value
*
* Return: void
- *
- * Programmer: pvn
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -2883,15 +2879,11 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t
* Purpose: prints several dataset create property list properties
*
* Return: void
- *
- * Modifications: pvn, March 28, 2008
- * Add a COMPRESSION ratio information for cases when filters are present
- *
*-------------------------------------------------------------------------
*/
void
h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx, hid_t dcpl_id,hid_t type_id, hid_t obj_id)
+ h5tools_context_t *ctx, hid_t dcpl_id, hid_t type_id, hid_t obj_id)
{
int nfilters; /* number of filters */
int rank; /* rank */
@@ -2905,16 +2897,18 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
H5D_fill_value_t fvstatus;
H5D_alloc_time_t at;
H5D_fill_time_t ft;
- size_t ncols = 80; /* available output width */
+ H5D_layout_t stl;
+ size_t ncols = 80; /* available output width */
size_t cd_nelmts; /* filter client number of values */
off_t offset; /* offset of external file */
char f_name[256]; /* filter name */
- char name[256]; /* external file name */
+ char name[256]; /* external or virtual file name */
+ char dsetname[256]; /* virtual datset name */
hsize_t chsize[64]; /* chunk size in elements */
hsize_t size; /* size of external file */
hsize_t storage_size;
- hsize_t curr_pos = 0; /* total data element position */
- h5tools_str_t buffer; /* string into which to render */
+ hsize_t curr_pos = 0; /* total data element position */
+ h5tools_str_t buffer; /* string into which to render */
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -2936,216 +2930,172 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- if(H5D_CHUNKED == H5Pget_layout(dcpl_id)) {
- ctx->indent_level++;
+ ctx->indent_level++;
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s ", CHUNKED);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- rank = H5Pget_chunk(dcpl_id,(int)NELMTS(chsize),chsize);
- h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]);
- for(i = 1; i < rank; i++)
- h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]);
- h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ stl = H5Pget_layout(dcpl_id);
+ switch (stl) {
+ case H5D_CHUNKED:
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s ", CHUNKED);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
+ rank = H5Pget_chunk(dcpl_id, (int) NELMTS(chsize), chsize);
+ h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]);
+ for(i = 1; i < rank; i++)
+ h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]);
+ h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- /* if there are filters, print a compression ratio */
- if(nfilters) {
- hsize_t dims[H5S_MAX_RANK];
- hsize_t nelmts = 1;
- double ratio = 0;
- int ok = 0;
-
- hid_t tid = H5Dget_type(obj_id);
- hid_t sid = H5Dget_space(obj_id);
- size_t datum_size = H5Tget_size(tid);
- int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
-
- /* only print the compression ratio for these filters */
- for(i = 0; i < nfilters && !ok; i++) {
- cd_nelmts = NELMTS(cd_values);
- filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
- cd_values, sizeof(f_name), f_name, NULL);
- ok = (filtn>=0);
-
- /* this following code will not show compression ratio for
- user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org
- switch(filtn) {
- case H5Z_FILTER_DEFLATE:
- case H5Z_FILTER_SZIP:
- case H5Z_FILTER_NBIT:
- case H5Z_FILTER_SCALEOFFSET:
- ok = 1;
- break;
- }
- */
- }
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- if(ndims && ok) {
- hsize_t uncomp_size;
+ h5tools_str_reset(&buffer);
- for(i = 0; i < ndims; i++) {
- nelmts *= dims[i];
+ /* if there are filters, print a compression ratio */
+ if (nfilters) {
+ hsize_t dims[H5S_MAX_RANK];
+ hsize_t nelmts = 1;
+ double ratio = 0;
+ int ok = 0;
+
+ hid_t tid = H5Dget_type(obj_id);
+ hid_t sid = H5Dget_space(obj_id);
+ size_t datum_size = H5Tget_size(tid);
+ int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
+
+ /* only print the compression ratio for these filters */
+ for (i = 0; i < nfilters && !ok; i++) {
+ cd_nelmts = NELMTS(cd_values);
+ filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name),
+ f_name, NULL);
+ ok = (filtn >= 0);
}
- uncomp_size = nelmts * datum_size;
- /* compression ratio = uncompressed size / compressed size */
+ if(ndims && ok) {
+ hsize_t uncomp_size;
- if(storage_size != 0)
- ratio = (double) uncomp_size / (double) storage_size;
+ for(i = 0; i < ndims; i++) {
+ nelmts *= dims[i];
+ }
+ uncomp_size = nelmts * datum_size;
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio);
+ /* compression ratio = uncompressed size / compressed size */
- }
- else
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
+ if(storage_size != 0)
+ ratio = (double) uncomp_size / (double) storage_size;
- H5Sclose(sid);
- H5Tclose(tid);
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio);
- }
- else {
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
- }
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ }
+ else
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
- ctx->indent_level--;
+ H5Sclose(sid);
+ H5Tclose(tid);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- else if(H5D_COMPACT == H5Pget_layout(dcpl_id)) {
- ctx->indent_level++;
+ }
+ else {
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
+ }
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ break;
+ case H5D_COMPACT:
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", COMPACT);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s", COMPACT);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ break;
+ case H5D_CONTIGUOUS:
+ {
+ int next;
- ctx->indent_level--;
+ next = H5Pget_external_count(dcpl_id);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- else if(H5D_CONTIGUOUS == H5Pget_layout(dcpl_id)) {
- int next;
+ /*-------------------------------------------------------------------------
+ * EXTERNAL_FILE
+ *-------------------------------------------------------------------------
+ */
+ if (next) {
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", CONTIGUOUS);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- next = H5Pget_external_count(dcpl_id);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- /*-------------------------------------------------------------------------
- * EXTERNAL_FILE
- *-------------------------------------------------------------------------
- */
- if(next) {
- ctx->indent_level++;
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s", CONTIGUOUS);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->indent_level++;
+ for (j = 0; j < (unsigned) next; j++) {
+ H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->indent_level++;
- for(j = 0; j < (unsigned)next; j++) {
- H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size);
+ h5tools_str_append(&buffer, " OFFSET %ld", offset);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ ctx->indent_level--;
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size);
- h5tools_str_append(&buffer, " OFFSET %ld", offset);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- ctx->indent_level--;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ else {
+ haddr_t ioffset;
- ctx->indent_level--;
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", CONTIGUOUS);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- else {
- haddr_t ioffset;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->indent_level++;
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s", CONTIGUOUS);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
+ h5tools_str_reset(&buffer);
+ ioffset = H5Dget_offset(obj_id);
+ h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ }
+ break;
+ default:
h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_append(&buffer, "%s", "Unknown layout");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }/*switch*/
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- ioffset = H5Dget_offset(obj_id);
- h5tools_str_append(&buffer,"OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->indent_level--;
- ctx->indent_level--;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- }
- /*-------------------------------------------------------------------------
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+
+ /*-------------------------------------------------------------------------
* FILTERS
*-------------------------------------------------------------------------
*/
@@ -3165,7 +3115,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
- if (filtn<0)
+ if (filtn < 0)
continue; /* nothing to print for invalid filter */
ctx->need_prefix = TRUE;
@@ -3186,70 +3136,68 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
break;
case H5Z_FILTER_SZIP:
- {
- szip_options_mask = cd_values[0];;
- szip_pixels_per_block = cd_values[1];
+ szip_options_mask = cd_values[0];;
+ szip_pixels_per_block = cd_values[1];
- h5tools_str_append(&buffer, "%s %s",SZIP, BEGIN);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_append(&buffer, "%s %s", SZIP, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->indent_level++;
+ ctx->indent_level++;
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK)
- h5tools_str_append(&buffer, "MODE %s", "HARDWARE");
- else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK)
- h5tools_str_append(&buffer, "MODE %s", "K13");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- if(szip_options_mask & H5_SZIP_EC_OPTION_MASK)
- h5tools_str_append(&buffer, "CODING %s", "ENTROPY");
- else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK)
- h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK)
- h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB");
- else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK)
- h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK)
+ h5tools_str_append(&buffer, "MODE %s", "HARDWARE");
+ else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK)
+ h5tools_str_append(&buffer, "MODE %s", "K13");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) {
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "HEADER %s", "RAW");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ if(szip_options_mask & H5_SZIP_EC_OPTION_MASK)
+ h5tools_str_append(&buffer, "CODING %s", "ENTROPY");
+ else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK)
+ h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->indent_level--;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+ h5tools_str_reset(&buffer);
+ if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK)
+ h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB");
+ else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK)
+ h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+
+ if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) {
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
+ h5tools_str_append(&buffer, "HEADER %s", "RAW");
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
break;
case H5Z_FILTER_NBIT:
h5tools_str_append(&buffer, "%s", NBIT);
@@ -3260,7 +3208,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
break;
default:
- /* filter do not have to be avaiable for showing registered filter info.
+ /* filters do not have to be available for showing registered filter info.
see HDFFV-8346 for details. --xcao@hdfgroup.org
if(H5Zfilter_avail(filtn))
h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN);
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index 78e7fe9..b8d44de 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -40,7 +40,7 @@
* The number to divide the tv_usec field with to get a nice decimal to add to
* the number of seconds.
*/
-#define MICROSECOND 1000000.0
+#define MICROSECOND 1000000.0F
/* global variables */
io_time_t *timer_g; /* timer: global for stub functions */
diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c
index a3c11c1..6825a4c 100644
--- a/tools/perform/chunk.c
+++ b/tools/perform/chunk.c
@@ -57,20 +57,20 @@
#define RM_CACHE_STRT 25
#define RM_CACHE_END 25
#define RM_CACHE_DELT 5
-#define RM_START 0.50
-#define RM_END 5.00
-#define RM_DELTA 0.50
-#define RM_W0 0.0
+#define RM_START 0.50F
+#define RM_END 5.00F
+#define RM_DELTA 0.50F
+#define RM_W0 0.0F
#define RM_NRDCC 521
/* Diagonal test */
#define DIAG_CACHE_STRT 25
#define DIAG_CACHE_END 25
#define DIAG_CACHE_DELT 5
-#define DIAG_START 0.50
-#define DIAG_END 5.00
-#define DIAG_DELTA 0.50
-/* #define DIAG_W0 0.65 */
+#define DIAG_START 0.50F
+#define DIAG_END 5.00F
+#define DIAG_DELTA 0.50F
+/* #define DIAG_W0 0.65F */
/* #define DIAG_NRDCC 521 */
static size_t nio_g;
diff --git a/tools/perform/iopipe.c b/tools/perform/iopipe.c
index 85063fa..a04ef82 100644
--- a/tools/perform/iopipe.c
+++ b/tools/perform/iopipe.c
@@ -81,25 +81,25 @@ print_stats (const char *prefix,
double u_time, s_time;
u_time = ((double)(r_stop->ru_utime.tv_sec)+
- (double)(r_stop->ru_utime.tv_usec)/1000000.0) -
+ (double)(r_stop->ru_utime.tv_usec)/1000000.0F) -
((double)(r_start->ru_utime.tv_sec)+
- (double)(r_start->ru_utime.tv_usec)/1000000.0);
+ (double)(r_start->ru_utime.tv_usec)/1000000.0F);
s_time = ((double)(r_stop->ru_stime.tv_sec)+
- (double)(r_stop->ru_stime.tv_usec)/1000000.0) -
+ (double)(r_stop->ru_stime.tv_usec)/1000000.0F) -
((double)(r_start->ru_stime.tv_sec)+
- (double)(r_start->ru_stime.tv_usec)/1000000.0);
+ (double)(r_start->ru_stime.tv_usec)/1000000.0F);
#endif
#ifndef H5_HAVE_SYS_TIMEB
e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/1000000.0) -
+ (double)(t_stop->tv_usec)/1000000.0F) -
((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/1000000.0);
+ (double)(t_start->tv_usec)/1000000.0F);
#else
e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/1000.0) -
+ (double)(t_stop->tv_usec)/1000.0F) -
((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/1000.0);
+ (double)(t_start->tv_usec)/1000.0F);
#endif
bw = (double)nbytes / e_time;
@@ -191,7 +191,7 @@ main (void)
* 1998-11-06 ptl
*/
printf ("I/O request size is %1.1fMB\n",
- (double)(hssize_t)(size[0]*size[1])/1024.0*1024);
+ (double)(hssize_t)(size[0]*size[1])/1024.0F*1024);
/* Open the files */
file = H5Fcreate (HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c
index 9341e64..046668f 100644
--- a/tools/perform/overhead.c
+++ b/tools/perform/overhead.c
@@ -209,7 +209,7 @@ test(fill_t fill_style, const double splits[],
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto error;
if(!use_rdcc) {
if(H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL) < 0) goto error;
- if(H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0) < 0) goto error;
+ if(H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0F) < 0) goto error;
}
if((file = H5Fcreate(FILE_NAME_1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error;
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
diff --git a/tools/perform/perf.c b/tools/perform/perf.c
index 58db6cc..1bd33b6 100644
--- a/tools/perform/perf.c
+++ b/tools/perform/perf.c
@@ -391,9 +391,6 @@ die_jar_jar_die:
free(tmp);
if (opt_correct) free(tmp2);
- /* close HDF5 library */
- H5close();
-
MPI_Finalize();
return(0);
diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c
index 1828d6f..7d75a2d 100644
--- a/tools/perform/sio_perf.c
+++ b/tools/perform/sio_perf.c
@@ -68,7 +68,7 @@
#define SIO_HDF5 0x4
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes,t) (((t)==0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
+#define MB_PER_SEC(bytes,t) (((t)==0.0F) ? 0.0F : ((((double)bytes) / ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -451,14 +451,14 @@ run_test(iotype iot, parameters parms, struct options *opts)
minmax *read_mm_table=NULL;
minmax *read_gross_mm_table=NULL;
minmax *read_raw_mm_table=NULL;
- minmax write_sys_mm = {0.0, 0.0, 0.0, 0};
- minmax write_mm = {0.0, 0.0, 0.0, 0};
- minmax write_gross_mm = {0.0, 0.0, 0.0, 0};
- minmax write_raw_mm = {0.0, 0.0, 0.0, 0};
- minmax read_sys_mm = {0.0, 0.0, 0.0, 0};
- minmax read_mm = {0.0, 0.0, 0.0, 0};
- minmax read_gross_mm = {0.0, 0.0, 0.0, 0};
- minmax read_raw_mm = {0.0, 0.0, 0.0, 0};
+ minmax write_sys_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax write_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax write_gross_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax write_raw_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_sys_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_gross_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_raw_mm = {0.0F, 0.0F, 0.0F, 0};
raw_size = (off_t)parms.num_bytes;
parms.io_type = iot;
@@ -717,7 +717,7 @@ accumulate_minmax_stuff(minmax *mm, int count)
int i;
minmax total_mm;
- total_mm.sum = 0.0;
+ total_mm.sum = 0.0F;
total_mm.max = -DBL_MAX;
total_mm.min = DBL_MAX;
total_mm.num = count;
diff --git a/tools/perform/zip_perf.c b/tools/perform/zip_perf.c
index edd5b0f..f73ba40 100644
--- a/tools/perform/zip_perf.c
+++ b/tools/perform/zip_perf.c
@@ -43,10 +43,10 @@
#define ONE_MB (ONE_KB * ONE_KB)
#define ONE_GB (ONE_MB * ONE_KB)
-#define MICROSECOND 1000000.0
+#define MICROSECOND 1000000.0F
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes,t) ((fabs(t)<0.0000000001) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
+#define MB_PER_SEC(bytes,t) ((fabs(t)<0.0000000001F) ? 0.0F : ((((double)bytes) / ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -182,7 +182,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* destination buffer needs to be at least 0.1% larger than sourceLen
* plus 12 bytes */
- destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12;
+ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1F)) + 12;
dest = (Bytef *)HDmalloc(destLen);
if (!dest)
@@ -464,7 +464,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
error("out of memory");
}
- compression_time = 0.0;
+ compression_time = 0.0F;
if (random_test)
fill_with_random_data(src, src_len);