summaryrefslogtreecommitdiffstats
path: root/test/iopipe.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-04-08 21:43:02 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-04-08 21:43:02 (GMT)
commitc01750fa740943c0083711b353278143c79d50a3 (patch)
treefd475b7c7a3639c05b30625b43547850d687b948 /test/iopipe.c
parent68fa66bf8130d6a6e607e233da8cc61a154bf172 (diff)
downloadhdf5-c01750fa740943c0083711b353278143c79d50a3.zip
hdf5-c01750fa740943c0083711b353278143c79d50a3.tar.gz
hdf5-c01750fa740943c0083711b353278143c79d50a3.tar.bz2
[svn-r338] Changes since 19980407
---------------------- ./src/H5B.c ./src/H5D.c ./src/H5Dprivate.h ./src/H5Dpublic.h ./src/H5F.c ./src/H5Farray.c ./src/H5Fcore.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fprivate.h ./src/H5Fpublic.h ./src/H5Fsec2.c ./src/H5Fsplit.c ./src/H5Fstdio.c ./src/H5G.c ./src/H5Gent.c ./src/H5Gnode.c ./src/H5HG.c ./src/H5HL.c ./src/H5MF.c ./src/H5MFprivate.h ./src/H5O.c ./src/H5Ocont.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Olayout.c ./src/H5Oname.c ./src/H5Oprivate.h ./src/H5Osdspace.c ./src/H5Oshared.c ./src/H5Ostab.c ./src/H5P.c ./src/H5Ppublic.h ./src/H5S.c ./src/H5Sprivate.h ./src/H5Spublic.h ./src/H5Ssimp.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5V.c ./src/H5Vprivate.h ./src/H5private.h ./src/H5public.h ./src/h5ls.c ./test/cmpd_dset.c ./test/dsets.c ./test/extend.c ./test/external.c ./test/hyperslab.c ./test/iopipe.c ./test/istore.c ./test/shtype.c ./test/tfile.c ./test/th5s.c Anything having to do with the size of a dataset now uses the types `hsize_t' and `hssize_t' which must be the same size and at least as large as `size_t'. This isn't fully tested yet, so hsize_t and hssize_t are defined as size_t and ssize_t in H5public.h. Setting them to larger values will trip up gcc versions less than 2.8.1 on x86 platforms. Documented unused function formals with `__unused__' before the formal name. This also has the effect of supressing warning messages for gcc since it's defined to be `__attribute__((unused))' in the H5private.h file. ./src/debug.c ./src/h5ls.c If the file name contains a `%' then the file is opened as a file family with H5P_DEFAULT for the file member access property list. ./src/h5ls.c The group name is optional, defaulting to `/'. ./src/hdf5.h Added some missing public header files.
Diffstat (limited to 'test/iopipe.c')
-rw-r--r--test/iopipe.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/test/iopipe.c b/test/iopipe.c
index 640b2d3..ced3807 100644
--- a/test/iopipe.c
+++ b/test/iopipe.c
@@ -133,7 +133,7 @@ synchronize (void)
int
main (void)
{
- static size_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
+ static hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
static int nread=NREAD_REQUESTS, nwrite=NWRITE_REQUESTS;
unsigned char *the_data = NULL;
@@ -142,10 +142,10 @@ main (void)
struct rusage r_start, r_stop;
struct timeval t_start, t_stop;
int i, fd;
- ssize_t n;
+ hssize_t n;
off_t offset;
- int start[2];
- size_t count[2];
+ hssize_t start[2];
+ hsize_t count[2];
printf ("I/O request size is %1.1fMB\n",
((double)(size[0])*(double)(size[1]))/(1024.0*1024));
@@ -162,8 +162,9 @@ main (void)
assert (file_space>=0);
dset = H5Dcreate (file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT);
assert (dset>=0);
- the_data = malloc (size[0]*size[1]);
- memset (the_data, 0xAA, size[0]*size[1]); /*initial fill for lazy malloc*/
+ the_data = malloc ((size_t)(size[0]*size[1]));
+ /*initial fill for lazy malloc*/
+ memset (the_data, 0xAA, (size_t)(size[0]*size[1]));
/* Fill raw */
synchronize ();
@@ -173,14 +174,14 @@ main (void)
for (i=0; i<nwrite; i++) {
putc (PROGRESS, stderr);
fflush (stderr);
- memset (the_data, 0xAA, size[0]*size[1]);
+ memset (the_data, 0xAA, (size_t)(size[0]*size[1]));
}
getrusage (RUSAGE_SELF, &r_stop);
gettimeofday (&t_stop, NULL);
putc ('\n', stderr);
print_stats ("fill raw",
&r_start, &r_stop, &t_start, &t_stop,
- nread*size[0]*size[1]);
+ (size_t)(nread*size[0]*size[1]));
/* Fill hdf5 */
@@ -200,7 +201,7 @@ main (void)
putc ('\n', stderr);
print_stats ("fill hdf5",
&r_start, &r_stop, &t_start, &t_stop,
- nread*size[0]*size[1]);
+ (size_t)(nread*size[0]*size[1]));
/* Write the raw dataset */
synchronize ();
@@ -212,7 +213,7 @@ main (void)
fflush (stderr);
offset = lseek (fd, 0, SEEK_SET);
assert (0==offset);
- n = write (fd, the_data, size[0]*size[1]);
+ n = write (fd, the_data, (size_t)(size[0]*size[1]));
assert (n>=0 && (size_t)n==size[0]*size[1]);
}
getrusage (RUSAGE_SELF, &r_stop);
@@ -220,7 +221,7 @@ main (void)
putc ('\n', stderr);
print_stats ("out raw",
&r_start, &r_stop, &t_start, &t_stop,
- nread*size[0]*size[1]);
+ (size_t)(nread*size[0]*size[1]));
/* Write the hdf5 dataset */
synchronize ();
@@ -239,7 +240,7 @@ main (void)
putc ('\n', stderr);
print_stats ("out hdf5",
&r_start, &r_stop, &t_start, &t_stop,
- nread*size[0]*size[1]);
+ (size_t)(nread*size[0]*size[1]));
/* Read the raw dataset */
synchronize ();
@@ -251,7 +252,7 @@ main (void)
fflush (stderr);
offset = lseek (fd, 0, SEEK_SET);
assert (0==offset);
- n = read (fd, the_data, size[0]*size[1]);
+ n = read (fd, the_data, (size_t)(size[0]*size[1]));
assert (n>=0 && (size_t)n==size[0]*size[1]);
}
getrusage (RUSAGE_SELF, &r_stop);
@@ -259,7 +260,7 @@ main (void)
putc ('\n', stderr);
print_stats ("in raw",
&r_start, &r_stop, &t_start, &t_stop,
- nread*size[0]*size[1]);
+ (size_t)(nread*size[0]*size[1]));
/* Read the hdf5 dataset */
@@ -279,7 +280,7 @@ main (void)
putc ('\n', stderr);
print_stats ("in hdf5",
&r_start, &r_stop, &t_start, &t_stop,
- nread*size[0]*size[1]);
+ (size_t)(nread*size[0]*size[1]));
/* Read hyperslab */
assert (size[0]>20 && size[1]>20);
@@ -303,7 +304,7 @@ main (void)
putc ('\n', stderr);
print_stats ("in hdf5 partial",
&r_start, &r_stop, &t_start, &t_stop,
- nread*count[0]*count[1]);
+ (size_t)(nread*count[0]*count[1]));