summaryrefslogtreecommitdiffstats
path: root/perform/chunk.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-12-12 18:40:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-12-12 18:40:09 (GMT)
commit47d88766dbee3c631c842639d44c362c2b7b8e44 (patch)
tree77058751c8bcb0260593674f609cb5df1224198c /perform/chunk.c
parent6e9c0514fb45ddb358d36832237a3beace6ffb6b (diff)
downloadhdf5-47d88766dbee3c631c842639d44c362c2b7b8e44.zip
hdf5-47d88766dbee3c631c842639d44c362c2b7b8e44.tar.gz
hdf5-47d88766dbee3c631c842639d44c362c2b7b8e44.tar.bz2
[svn-r4706] Purpose:
Code cleanup Description: Tweaked internal error handling macros to reduce the size of the library's object code by about 10-20%. Also cleaned up some compiler warnings... Platforms tested: FreeBSD 4.4 (sleipnir)
Diffstat (limited to 'perform/chunk.c')
-rw-r--r--perform/chunk.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/perform/chunk.c b/perform/chunk.c
index 0b915c8..9366c98 100644
--- a/perform/chunk.c
+++ b/perform/chunk.c
@@ -162,7 +162,7 @@ create_dataset (void)
*-------------------------------------------------------------------------
*/
static double
-test_rowmaj (int op, size_t cache_size, hsize_t io_size)
+test_rowmaj (int op, size_t cache_size, size_t io_size)
{
hid_t file, dset, mem_space, file_space;
signed char *buf = calloc (1, SQUARE(io_size));
@@ -242,7 +242,7 @@ test_rowmaj (int op, size_t cache_size, hsize_t io_size)
*-------------------------------------------------------------------------
*/
static double
-test_diag (int op, size_t cache_size, hsize_t io_size, hsize_t offset)
+test_diag (int op, size_t cache_size, size_t io_size, size_t offset)
{
hid_t file, dset, mem_space, file_space;
hsize_t i, hs_size[2];
@@ -322,7 +322,7 @@ test_diag (int op, size_t cache_size, hsize_t io_size, hsize_t offset)
int
main (void)
{
- hsize_t io_size;
+ size_t io_size;
double effic, io_percent;
FILE *f, *d;
size_t cache_size;
@@ -370,7 +370,7 @@ main (void)
cache_size<=RM_CACHE_END;
cache_size+=RM_CACHE_DELT) {
for (io_percent=RM_START; io_percent<=RM_END; io_percent+=RM_DELTA) {
- io_size = MAX (1, (int)(CH_SIZE*io_percent));
+ io_size = MAX (1, (size_t)(CH_SIZE*io_percent));
printf ("Rowmaj-rd %8d %8.2f", cache_size, io_percent);
fflush (stdout);
effic = test_rowmaj (READ, cache_size, io_size);
@@ -416,7 +416,7 @@ main (void)
cache_size<=RM_CACHE_END;
cache_size+=RM_CACHE_DELT) {
for (io_percent=RM_START; io_percent<=RM_END; io_percent+=RM_DELTA) {
- io_size = MAX (1, (int)(CH_SIZE*io_percent));
+ io_size = MAX (1, (size_t)(CH_SIZE*io_percent));
printf ("Rowmaj-wr %8d %8.2f", cache_size, io_percent);
fflush (stdout);
effic = test_rowmaj (WRITE, cache_size, io_size);
@@ -461,7 +461,7 @@ main (void)
for (io_percent=DIAG_START;
io_percent<=DIAG_END;
io_percent+=DIAG_DELTA) {
- io_size = MAX (1, (int)(CH_SIZE*io_percent));
+ io_size = MAX (1, (size_t)(CH_SIZE*io_percent));
printf ("Diag-rd %8d %8.2f", cache_size, io_percent);
fflush (stdout);
effic = test_diag (READ, cache_size, io_size, MAX (1, io_size/2));
@@ -506,7 +506,7 @@ main (void)
for (io_percent=DIAG_START;
io_percent<=DIAG_END;
io_percent+=DIAG_DELTA) {
- io_size = MAX (1, (int)(CH_SIZE*io_percent));
+ io_size = MAX (1, (size_t)(CH_SIZE*io_percent));
printf ("Diag-wr %8d %8.2f", cache_size, io_percent);
fflush (stdout);
effic = test_diag (WRITE, cache_size, io_size, MAX (1, io_size/2));