diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-03-13 17:50:38 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-03-13 17:50:38 (GMT) |
commit | 48e075110624e0039b1918a7187316366a20462b (patch) | |
tree | 84c8e7b6e38ad7965efe868aab91aebe23047cd5 /src/H5V.c | |
parent | d5b60eef9dbeaa0f9df7a8f28b300fb94b7d15f1 (diff) | |
download | hdf5-48e075110624e0039b1918a7187316366a20462b.zip hdf5-48e075110624e0039b1918a7187316366a20462b.tar.gz hdf5-48e075110624e0039b1918a7187316366a20462b.tar.bz2 |
[svn-r321] Changes since 19980306
----------------------
./MANIFEST
./src/H5D.c
./src/H5S.c
./src/H5Sprivate.h
./src/H5Ssimp.c
./src/H5Tpkg.h
./src/H5Tprivate.h
./src/H5V.c
./test/Makefile.in
./test/iopipe.c [NEW]
Optimizations to the I/O pipeline.
./src/H5Fistore.c
./src/H5Oefl.c
Fixed a few compiler warnings.
./MANIFEST
Added entries for ./config/{intel-osf1,irix5.3}
Diffstat (limited to 'src/H5V.c')
-rw-r--r-- | src/H5V.c | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -502,23 +502,30 @@ H5V_stride_copy(intn n, size_t elmt_size, const size_t *size, FUNC_ENTER(H5V_stride_copy, FAIL); - H5V_vector_cpy(n, idx, size); - nelmts = H5V_vector_reduce_product(n, size); - for (i = 0; i < nelmts; i++) { - /* Copy an element */ - HDmemcpy(dst, src, elmt_size); + if (n) { + H5V_vector_cpy(n, idx, size); + nelmts = H5V_vector_reduce_product(n, size); + for (i = 0; i < nelmts; i++) { - /* Decrement indices and advance pointers */ - for (j = n - 1, carry = TRUE; j >= 0 && carry; --j) { - src += src_stride[j]; - dst += dst_stride[j]; + /* Copy an element */ + HDmemcpy(dst, src, elmt_size); - if (--idx[j]) carry = FALSE; - else idx[j] = size[j]; + /* Decrement indices and advance pointers */ + for (j = n - 1, carry = TRUE; j >= 0 && carry; --j) { + src += src_stride[j]; + dst += dst_stride[j]; + + if (--idx[j]) carry = FALSE; + else idx[j] = size[j]; + } } + } else { + HDmemcpy (dst, src, elmt_size); + HRETURN (SUCCEED); } + FUNC_LEAVE(SUCCEED); } |