diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-03 17:07:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-03 17:07:14 (GMT) |
commit | 7ae00db7a4a4e8330245b15aa1e2fa1659cb9b1b (patch) | |
tree | a01c9d03f52334938852b8f509bbe6bc8bcdac36 /src/H5Sprivate.h | |
parent | ad641fa7b617c8ca2ec11602cde0f72fa12696cd (diff) | |
download | hdf5-7ae00db7a4a4e8330245b15aa1e2fa1659cb9b1b.zip hdf5-7ae00db7a4a4e8330245b15aa1e2fa1659cb9b1b.tar.gz hdf5-7ae00db7a4a4e8330245b15aa1e2fa1659cb9b1b.tar.bz2 |
[svn-r5138] Purpose:
Bug Fix & Code Cleanup
Description:
The MPI-IO optimized transfer routines
(H5S_mpio_spaces_read/H5S_mpio_space_write) are not being invoked in all
the cases where they could be used.
Additionally, the code for determining if an optimized transfer is wrapped
into the actual I/O transfer routine in a very confusing way.
Solution:
Re-enabled MPI-IO optimized transfer routines in all the cases where they
should work.
Extracted all the pre-conditions for optimized transfers into separate
routines from the transfer routines.
Platforms tested:
FreeBSD 4.5 (sleipnir) & IRIX64 6.5 (modi4)
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r-- | src/H5Sprivate.h | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 713d52f..5af635d 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -32,6 +32,12 @@ /* Flags for H5S_find */ #define H5S_CONV_PAR_IO_POSSIBLE 0x0001 +/* The storage options are mutually exclusive */ +/* (2-bits reserved for storage type currently) */ +#define H5S_CONV_STORAGE_COMPACT 0x0000 /* i.e. '0' */ +#define H5S_CONV_STORAGE_CONTIGUOUS 0x0002 /* i.e. '1' */ +#define H5S_CONV_STORAGE_CHUNKED 0x0004 /* i.e. '2' */ +#define H5S_CONV_STORAGE_MASK 0x0006 /* Forward references of common typedefs */ typedef struct H5S_t H5S_t; @@ -129,17 +135,6 @@ typedef struct H5S_conv_t { * If there is no data type conversion then it might be possible to * transfer data points between application memory and the file in one * step without going through the data type conversion buffer. - * - * rky 980918 - * If the direct read or write function determines that the transfer - * must be done indirectly, i.e., through the conversion buffer or - * (in the case of parallel MPI-IO) in block-by-block transfers - * then the function returns with the value of must_convert!=0, - * the function's return value is SUCCEED, - * and no transfer of data is attempted. - * Otherwise the direct read or write function returns must_convert 0, - * with the function's return value being SUCCEED or FAIL - * depending on whether or not the transfer of data was successful. */ /* Read from file to application w/o intermediate scratch buffer */ @@ -148,8 +143,7 @@ typedef struct H5S_conv_t { const struct H5O_fill_t *fill, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, const H5S_t *mem_space, - hid_t dxpl_id, void *buf/*out*/, - hbool_t *must_convert/*out*/); + hid_t dxpl_id, void *buf/*out*/); /* Write directly from app buffer to file */ @@ -158,8 +152,7 @@ typedef struct H5S_conv_t { const struct H5O_fill_t *fill, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, const H5S_t *mem_space, - hid_t dxpl_id, const void *buf, - hbool_t *must_convert/*out*/); + hid_t dxpl_id, const void *buf); #ifdef H5S_DEBUG struct { @@ -224,12 +217,19 @@ __DLL__ herr_t H5S_select_serialize(const H5S_t *space, uint8_t *buf); __DLL__ herr_t H5S_select_deserialize(H5S_t *space, const uint8_t *buf); __DLL__ htri_t H5S_select_contiguous(const H5S_t *space); __DLL__ htri_t H5S_select_single(const H5S_t *space); +__DLL__ htri_t H5S_select_regular(const H5S_t *space); +__DLL__ htri_t H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2); __DLL__ herr_t H5S_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op, void *operator_data); __DLL__ herr_t H5S_sel_iter_release(const H5S_t *space, H5S_sel_iter_t *sel_iter); #ifdef H5_HAVE_PARALLEL + +/* MPI-IO function to check whether its possible to transfer directly from app buffer to file */ +__DLL__ htri_t H5S_all_opt_possible(const H5S_t *mem_space, + const H5S_t *file_space, const unsigned flags); + /* MPI-IO function to read directly from app buffer to file rky980813 */ __DLL__ herr_t H5S_mpio_spaces_read(H5F_t *f, const struct H5O_layout_t *layout, @@ -238,8 +238,7 @@ __DLL__ herr_t H5S_mpio_spaces_read(H5F_t *f, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, const H5S_t *mem_space, hid_t dxpl_id, - void *buf/*out*/, - hbool_t *must_convert /*out*/ ); + void *buf/*out*/); /* MPI-IO function to write directly from app buffer to file rky980813 */ __DLL__ herr_t H5S_mpio_spaces_write(H5F_t *f, @@ -249,8 +248,7 @@ __DLL__ herr_t H5S_mpio_spaces_write(H5F_t *f, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, const H5S_t *mem_space, hid_t dxpl_id, - const void *buf, - hbool_t *must_convert /*out*/ ); + const void *buf); #ifndef _H5S_IN_H5S_C /* Global var whose value comes from environment variable */ __DLLVAR__ hbool_t H5_mpi_opt_types_g; |