summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.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 /src/H5Tconv.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 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index d1f8c6a..7aad1e1 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -1259,16 +1259,19 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
direction = 1;
olap = nelmts;
} else if (src->size>=dst->size) {
+ double olap_d = HDceil((double)(dst->size)/
+ (double)(src->size-dst->size));
+
+ olap = (size_t)olap_d;
sp = dp = (uint8_t*)buf;
direction = 1;
- olap = (size_t)(HDceil((double)(src->size)/
- (double)(src->size-dst->size))-1);
} else {
+ double olap_d = HDceil((double)(src->size)/
+ (double)(dst->size-src->size));
+ olap = (size_t)olap_d;
sp = (uint8_t*)buf + (nelmts-1) * src->size;
dp = (uint8_t*)buf + (nelmts-1) * dst->size;
direction = -1;
- olap = (size_t)(HDceil((double)(dst->size)/
- (double)(dst->size-src->size))-1);
}
/* The conversion loop */
@@ -1283,7 +1286,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
d = elmtno<olap ? dbuf : dp;
} else {
s = sp;
- d = elmtno >= nelmts-olap ? dbuf : dp;
+ d = elmtno+olap >= nelmts ? dbuf : dp;
}
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
@@ -1636,16 +1639,18 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
direction = 1;
olap = nelmts;
} else if (src_p->size>=dst_p->size) {
+ double olap_d = HDceil((double)(dst_p->size)/
+ (double)(src_p->size-dst_p->size));
+ olap = (size_t)olap_d;
sp = dp = (uint8_t*)buf;
direction = 1;
- olap = (size_t)(HDceil((double)(src_p->size)/
- (double)(src_p->size-dst_p->size))-1);
} else {
+ double olap_d = HDceil((double)(src_p->size)/
+ (double)(dst_p->size-src_p->size));
+ olap = (size_t)olap_d;
sp = (uint8_t*)buf + (nelmts-1) * src_p->size;
dp = (uint8_t*)buf + (nelmts-1) * dst_p->size;
direction = -1;
- olap = (size_t)(HDceil((double)(dst_p->size)/
- (double)(dst_p->size-src_p->size))-1);
}
/* The conversion loop */
@@ -1659,7 +1664,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
d = elmtno<olap ? dbuf : dp;
} else {
s = sp;
- d = elmtno >= nelmts-olap ? dbuf : dp;
+ d = elmtno+olap >= nelmts ? dbuf : dp;
}
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */