diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1999-04-23 21:11:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1999-04-23 21:11:27 (GMT) |
commit | acbad9533eb3bba58a9c33c27a7435ae33c72e36 (patch) | |
tree | 221d4eabf44876a065c406f7355936452164656d /src/H5Sprivate.h | |
parent | daf4ab55869c71b69a4764bd5947ba230d5da0da (diff) | |
download | hdf5-acbad9533eb3bba58a9c33c27a7435ae33c72e36.zip hdf5-acbad9533eb3bba58a9c33c27a7435ae33c72e36.tar.gz hdf5-acbad9533eb3bba58a9c33c27a7435ae33c72e36.tar.bz2 |
[svn-r1210] Changed parameters for function calls which figure out the buffer size for
H5Dread/H5Dwrite to use to allow the I/O calls to break up a user's buffer into
pieces that are at least as large as the sequence of bytes being written in the
fastest changing dimension.
Also fixed a hard-to-find bug in the hyperslab I/O routines which could cause
data to be corrupted when writing out fields to compound datatype data with
background preservation turned on and hyperslabs which were large enough to
require two I/O passes on a hyperslab block. A pretty obscure situation, but
it would be worthwhile for users to upgrade to this code in order to be certain
that correct data is being written.
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r-- | src/H5Sprivate.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index ff0a021..b01d9dc 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -78,11 +78,13 @@ typedef struct H5S_hyper_node_tag { hssize_t *end; /* Pointer to a corner of a hyperslab furthest from the origin */ struct { uintn cached; /* Flag to indicate that the block is cached (during I/O only) */ - size_t size; /* Size of cached block (in elements) */ - uintn left; /* Elements left to access in block */ + size_t size; /* Size of cached block (in elements) */ + uintn rleft; /* Read elements left to access in block */ + uintn wleft; /* Write elements left to access in block */ hid_t block_id; /* Temporary buffer ID */ uint8_t *block; /* Pointer into temporary buffer for cache */ - uint8_t *pos; /* Pointer to current location within block */ + uint8_t *rpos; /* Pointer to current read location within block */ + uint8_t *wpos; /* Pointer to current write location within block */ } cinfo; struct H5S_hyper_node_tag *next; /* pointer to next hyperslab in list */ } H5S_hyper_node_t; @@ -182,7 +184,7 @@ typedef struct H5S_fconv_t { /* Initialize file element numbering information */ herr_t (*init)(const struct H5O_layout_t *layout, const H5S_t *space, - H5S_sel_iter_t *iter); + H5S_sel_iter_t *iter, size_t *min_elem_out); /* Determine optimal number of elements to transfer */ size_t (*avail)(const H5S_t *file_space, const H5S_sel_iter_t *file_iter, @@ -214,7 +216,7 @@ typedef struct H5S_mconv_t { /* Initialize memory element numbering information */ herr_t (*init)(const struct H5O_layout_t *layout, const H5S_t *space, - H5S_sel_iter_t *iter); + H5S_sel_iter_t *iter, size_t *min_elem_out); /* Gather elements from app buffer to type conversion buffer */ size_t (*gath)(const void *buf, size_t elmt_size, |