summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-04-30 15:54:52 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-04-30 15:54:52 (GMT)
commitcc2184b6efd25633b8a27cb23d57380e2f28a5b4 (patch)
tree6b276ffc0f426d101a06c84d271e64e882fa66a9 /test/dtypes.c
parent2be6b9f63c53e20add431b497a13929d2df049a8 (diff)
downloadhdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.zip
hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.tar.gz
hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.tar.bz2
[svn-r1240] Changes since 19990427
---------------------- ./tools/h5ls.c Added a `--address' (`-a') switch which causes h5ls to display file addresses for raw data. For contiguous datasets it's just a nice simple number, but for chunked datasets it's a list of logical dataset coordinates, file addresses, filter masks, and storage sizes. Changed `--dump' switch to `--data'. ./src/H5D.c ./src/H5F.c ./src/H5Fprivate.h Enhanced the indexed-storage B-tree iterator so it can dump raw data addresses (and other info) to the standard error stream. Added H5Ddebug() so h5ls has a way to dump addresses for datasets. I'm not sure what else this API function should do, so I think we should discuss it before we document it. So far, h5ls is the only thing that uses it, and we can easily change that. ./src/H5Tconv.c ./test/dtypes.c Finally had a chance to verify Paul's H5T_conv_s_s (general string to string conversions) bug fixes and incorporate them into H5T_conv_f_f (general floating-point to floating-point conversions) and H5T_conv_i_i (general integer to integer conversons). Thanks Paul. ./src/H5D.c ./src/H5S.c ./src/H5Sprivate.h Added performance timers around data space read and write callbacks. They were already there for the gather/scatter callbacks. The timings for read/write callbacks are displayed along with gather/scatter when data space debugging is turned on. ./bin/iostats Updated to print totals. Added a `--fast' option that doesn't do any output except the totals and is much faster. ./bin/trace Changed __unused__ to UNUSED to match source code. ./config/gnu-flags Updated error message for pgcc. I've sent bug reports to the pgcc people but the new version still has the same bug. ./configure.in ./config/conclude.in ./config/depend.in Fixed dependencies for non-GNU makes when run in a directory other than the hdf5 source tree. Updated GNU `make dep' rules to copy the distributed dependencies for non-GNU makes into the source tree when run in some other directory.
Diffstat (limited to 'test/dtypes.c')
-rw-r--r--test/dtypes.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 0e164c7..1565888 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -2265,6 +2265,59 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
/*-------------------------------------------------------------------------
+ * Function: test_conv_int_2
+ *
+ * Purpose: Tests overlap calculates in H5T_conv_i_i(), which should be
+ * the same as for H5T_conv_f_f() and H5T_conv_s_s().
+ *
+ * Return: Success: 0
+ *
+ * Failure: number of errors
+ *
+ * Programmer: Robb Matzke
+ * Friday, April 30, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_conv_int_2(void)
+{
+ int i, j;
+ hid_t src_type, dst_type;
+ char buf[32*100];
+
+ printf("%-70s", "Testing overlap calculations");
+ fflush(stdout);
+
+ memset(buf, 0, sizeof buf);
+ for (i=1; i<=32; i++) {
+ for (j=1; j<=32; j++) {
+
+ /* Source type */
+ src_type = H5Tcopy(H5T_NATIVE_CHAR);
+ H5Tset_size(src_type, i);
+
+ /* Destination type */
+ dst_type = H5Tcopy(H5T_NATIVE_CHAR);
+ H5Tset_size(dst_type, j);
+
+ /*
+ * Conversion. If overlap calculations aren't right then an
+ * assertion will fail in H5T_conv_i_i()
+ */
+ H5Tconvert(src_type, dst_type, 100, buf, NULL);
+ H5Tclose(src_type);
+ H5Tclose(dst_type);
+ }
+ }
+ PASSED();
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
* Function: my_isnan
*
* Purpose: Determines whether VAL points to NaN.
@@ -2984,6 +3037,7 @@ main(void)
reset_hdf5();
/* Test software integer conversion functions */
+ nerrors += test_conv_int_2();
nerrors += run_integer_tests("sw");
/* Test software floating-point conversion functions */