mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
[svn-r5886] Purpose:
Bug fix Description: Correctly apply filters (like compression) to fill values in chunks that are pre-allocated. This is OK in parallel also, since all the chunks are identical at this point and any chunk may be written by any process. Platforms tested: FreeBSD 4.6 (sleipnir) w/parallel
This commit is contained in:
parent
b7b36d7d06
commit
a2567e36f0
@ -2431,6 +2431,20 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
|
||||
*/
|
||||
HDmemset (chunk, 0, (size_t)chunk_size);
|
||||
} /* end else */
|
||||
|
||||
/* Check if there are filters which need to be applied to the chunk */
|
||||
if (pline.nfilters>0) {
|
||||
unsigned filter_mask=0;
|
||||
size_t buf_size=chunk_size;
|
||||
size_t nbytes=(size_t)chunk_size;
|
||||
|
||||
/* Push the chunk through the filters */
|
||||
if (H5Z_pipeline(f, &pline, 0, &filter_mask, &nbytes, &buf_size, &chunk)<0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed");
|
||||
|
||||
/* Keep the number of bytes the chunk turned in to */
|
||||
chunk_size=nbytes;
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
||||
/* Loop over all chunks */
|
||||
|
@ -2431,6 +2431,20 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
|
||||
*/
|
||||
HDmemset (chunk, 0, (size_t)chunk_size);
|
||||
} /* end else */
|
||||
|
||||
/* Check if there are filters which need to be applied to the chunk */
|
||||
if (pline.nfilters>0) {
|
||||
unsigned filter_mask=0;
|
||||
size_t buf_size=chunk_size;
|
||||
size_t nbytes=(size_t)chunk_size;
|
||||
|
||||
/* Push the chunk through the filters */
|
||||
if (H5Z_pipeline(f, &pline, 0, &filter_mask, &nbytes, &buf_size, &chunk)<0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed");
|
||||
|
||||
/* Keep the number of bytes the chunk turned in to */
|
||||
chunk_size=nbytes;
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
||||
/* Loop over all chunks */
|
||||
|
Loading…
x
Reference in New Issue
Block a user