summaryrefslogtreecommitdiffstats
path: root/test/hyperslab.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-02-09 19:37:40 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-02-09 19:37:40 (GMT)
commit7e8e3eec42254a6988b2739b621b1412963d590c (patch)
treecc7d01adda3675d67d35c8cb2edaf7a1dc469f40 /test/hyperslab.c
parent35e7a062e26c1a65e571202a6fda0b475e42da00 (diff)
downloadhdf5-7e8e3eec42254a6988b2739b621b1412963d590c.zip
hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.tar.gz
hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.tar.bz2
[svn-r230] Changes were actually made by Robb. I am commiting them for him
while he is visiting LLNL. I changed the default creation template offset and length to 4. Will fix the problem later. Changes since 19980205 ---------------------- ./src/H5H.c ./src/H5Hprivate.h ./src/H5O.c ./src/H5Ocont.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Olayout.c ./src/H5Oname.c ./src/H5Onull.c ./src/H5Oprivate.h ./src/H5Odspace.c ./src/H5Ostab.c ./src/debug.c ./html/H5.format.html Added an extra 4-byte field after the heap magic number for alignment on the DEC alpha. Changed object header message alignment to 8-bytes. ./src/H5F.c ./src/H5Farray.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fprivate.h ./src/H5Fsec2.c ./src/H5Fstdio.c ./src/H5Gnode.c ./src/H5O.c ./src/H5Odtype.c ./src/H5P.c ./src/H5Pprivate.h ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tpublic.h ./src/H5V.c ./src/H5detect.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/hyperslab.c ./test/istore.c ./test/th5p.c ./test/theap.c Fixed a few irix64 warnings regarding size_t vs. int, variables set but not used, printf formats ./config/irix64 Added `-woff 1196' to get rid of errors about __vfork() being implicitly defined in a system header file. ./src/H5B.c Fixed a stack alignment problem.
Diffstat (limited to 'test/hyperslab.c')
-rw-r--r--test/hyperslab.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 82f78c4..2cc7660 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -16,6 +16,7 @@
#include <H5Vprivate.h>
#ifndef HAVE_FUNCTION
+#undef __FUNCTION__
#define __FUNCTION__ ""
#endif
#define AT() printf (" at %s:%d in %s()\n",__FILE__,__LINE__,__FUNCTION__);
@@ -147,16 +148,17 @@ test_fill(size_t nx, size_t ny, size_t nz,
size_t di, size_t dj, size_t dk,
size_t ddx, size_t ddy, size_t ddz)
{
- uint8 *dst = NULL; /*destination array */
- size_t hs_size[3]; /*hyperslab size */
- size_t dst_size[3]; /*destination total size */
- size_t dst_offset[3]; /*offset of hyperslab in dest */
- uintn ref_value; /*reference value */
- uintn acc; /*accumulator */
- int i, j, k, dx, dy, dz, u, v, w; /*counters */
- int ndims; /*hyperslab dimensionality */
- char dim[64], s[256]; /*temp string */
- uintn fill_value; /*fill value */
+ uint8 *dst = NULL; /*destination array */
+ size_t hs_size[3]; /*hyperslab size */
+ size_t dst_size[3]; /*destination total size */
+ size_t dst_offset[3]; /*offset of hyperslab in dest */
+ uintn ref_value; /*reference value */
+ uintn acc; /*accumulator */
+ int i, j, k, dx, dy, dz; /*counters */
+ size_t u, v, w;
+ int ndims; /*hyperslab dimensionality */
+ char dim[64], s[256]; /*temp string */
+ uintn fill_value; /*fill value */
/*
* Dimensionality.
@@ -311,7 +313,8 @@ test_copy(int mode,
size_t src_offset[3]; /*offset of hyperslab in source */
uintn ref_value; /*reference value */
uintn acc; /*accumulator */
- int i, j, k, dx, dy, dz, u, v, w; /*counters */
+ int i, j, k, dx, dy, dz; /*counters */
+ size_t u, v, w;
int ndims; /*hyperslab dimensionality */
char dim[64], s[256]; /*temp string */
const char *sub;
@@ -761,7 +764,7 @@ test_transpose(size_t nx, size_t ny)
src = H5MM_xmalloc(nx * ny * sizeof(*src));
for (i = 0; i < nx; i++) {
for (j = 0; j < ny; j++) {
- src[i * ny + j] = i * ny + j;
+ src[i * ny + j] = (intn)(i * ny + j);
}
}
dst = H5MM_xcalloc(nx * ny, sizeof(*dst));
@@ -771,8 +774,8 @@ test_transpose(size_t nx, size_t ny)
size[1] = ny;
src_stride[0] = 0;
src_stride[1] = sizeof(*src);
- dst_stride[0] = (1 - nx * ny) * sizeof(*src);
- dst_stride[1] = nx * sizeof(*src);
+ dst_stride[0] = (intn)((1 - nx * ny) * sizeof(*src));
+ dst_stride[1] = (intn)(nx * sizeof(*src));
/* Copy and transpose */
if (nx == ny) {
@@ -872,7 +875,7 @@ test_sub_super(size_t nx, size_t ny)
/* Setup */
size[0] = nx;
size[1] = ny;
- src_stride[0] = 2 * ny;
+ src_stride[0] = (intn)(2 * ny);
src_stride[1] = 2;
dst_stride[0] = 0;
dst_stride[1] = 1;
@@ -919,9 +922,9 @@ test_sub_super(size_t nx, size_t ny)
src_stride[1] = 1;
src_stride[2] = 0;
src_stride[3] = 0;
- dst_stride[0] = 2 * ny;
- dst_stride[1] = 2 * sizeof(uint8) - 4 * ny;
- dst_stride[2] = 2 * ny - 2 * sizeof(uint8);
+ dst_stride[0] = (intn)(2 * ny);
+ dst_stride[1] = (intn)(2 * sizeof(uint8) - 4 * ny);
+ dst_stride[2] = (intn)(2 * ny - 2 * sizeof(uint8));
dst_stride[3] = sizeof(uint8);
/* Copy */
@@ -1161,5 +1164,5 @@ main(int argc, char *argv[])
exit(1);
}
printf("All hyperslab tests passed.\n");
- exit(0);
+ return 0;
}