diff options
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r-- | src/H5Dcontig.c | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 2c2539f..b492548 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -22,8 +22,16 @@ * with the data sieve buffer from H5F_seq_read/write. */ +/****************/ +/* Module Setup */ +/****************/ + #define H5D_PACKAGE /*suppress error about including H5Dpkg */ + +/***********/ +/* Headers */ +/***********/ #include "H5private.h" /* Generic Functions */ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ @@ -36,10 +44,28 @@ #include "H5Sprivate.h" /* Dataspace functions */ #include "H5Vprivate.h" /* Vector and array functions */ -/* Private prototypes */ +/****************/ +/* Local Macros */ +/****************/ + +/******************/ +/* Local Typedefs */ +/******************/ + +/********************/ +/* Local Prototypes */ +/********************/ static herr_t H5D_contig_write(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, const H5D_storage_t *store, hsize_t offset, size_t size, const void *buf); +/*********************/ +/* Package Variables */ +/*********************/ + +/*******************/ +/* Local Variables */ +/*******************/ + /* Declare a PQ free list to manage the sieve buffer information */ H5FL_BLK_DEFINE(sieve_buf); @@ -60,8 +86,6 @@ H5FL_BLK_DEFINE_STATIC(zero_fill); * Programmer: Quincey Koziol * April 19, 2003 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -94,11 +118,6 @@ done: * Programmer: Quincey Koziol * August 22, 2002 * - * Modifications: - * Bill Wendling, February 20, 2003 - * Added support for getting the barrier COMM if you're using - * Flexible PHDF5. - * *------------------------------------------------------------------------- */ herr_t @@ -111,7 +130,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id) size_t npoints; /* Number of points in space */ size_t ptsperbuf; /* Maximum # of points which fit in the buffer */ size_t elmt_size; /* Size of each element */ - size_t bufsize=64*1024; /* Size of buffer to write */ + size_t bufsize=H5D_XFER_MAX_TEMP_BUF_DEF; /* Size of buffer to write */ size_t size; /* Current # of points to write */ hsize_t offset; /* Offset of dataset */ void *buf = NULL; /* Buffer for fill value writing */ @@ -286,8 +305,6 @@ done: * Programmer: Quincey Koziol * March 20, 2003 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -320,8 +337,6 @@ done: * Programmer: Quincey Koziol * June 2, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ haddr_t @@ -349,9 +364,6 @@ H5D_contig_get_addr(const H5D_t *dset) * Programmer: Quincey Koziol * Thursday, September 28, 2000 * - * Modifications: - * Re-written in terms of the new writevv call, QAK, 5/7/03 - * *------------------------------------------------------------------------- */ static herr_t @@ -401,8 +413,6 @@ done: * Notes: * Offsets in the sequences must be monotonically increasing * - * Modifications: - * *------------------------------------------------------------------------- */ ssize_t @@ -668,8 +678,6 @@ done: * Notes: * Offsets in the sequences must be monotonically increasing * - * Modifications: - * *------------------------------------------------------------------------- */ ssize_t @@ -742,6 +750,10 @@ H5D_contig_writevv(const H5D_io_info_t *io_info, /* Allocate room for the data sieve buffer */ if (NULL==(dset_contig->sieve_buf=H5FL_BLK_MALLOC(sieve_buf,dset_contig->sieve_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") +#ifdef H5_USING_PURIFY +if(dset_contig->sieve_size > size) + HDmemset(dset_contig->sieve_buf + size, 0, (dset_contig->sieve_size - size)); +#endif /* H5_USING_PURIFY */ /* Determine the new sieve buffer size & location */ dset_contig->sieve_loc=addr; |