diff options
Diffstat (limited to 'src/H5Pdxpl.c')
-rw-r--r-- | src/H5Pdxpl.c | 906 |
1 files changed, 446 insertions, 460 deletions
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index c5dac23..35b659e 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -26,21 +26,19 @@ /* Module Setup */ /****************/ -#include "H5Pmodule.h" /* This source code file is part of the H5P module */ - +#include "H5Pmodule.h" /* This source code file is part of the H5P module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Cache */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Ppkg.h" /* Property lists */ - +#include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Cache */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Ppkg.h" /* Property lists */ /****************/ /* Local Macros */ @@ -48,41 +46,44 @@ /* ======== Data transfer properties ======== */ /* Definitions for maximum temp buffer size property */ -#define H5D_XFER_MAX_TEMP_BUF_SIZE sizeof(size_t) -#define H5D_XFER_MAX_TEMP_BUF_DEF H5D_TEMP_BUF_SIZE -#define H5D_XFER_MAX_TEMP_BUF_ENC H5P__encode_size_t -#define H5D_XFER_MAX_TEMP_BUF_DEC H5P__decode_size_t +#define H5D_XFER_MAX_TEMP_BUF_SIZE sizeof(size_t) +#define H5D_XFER_MAX_TEMP_BUF_DEF H5D_TEMP_BUF_SIZE +#define H5D_XFER_MAX_TEMP_BUF_ENC H5P__encode_size_t +#define H5D_XFER_MAX_TEMP_BUF_DEC H5P__decode_size_t /* Definitions for type conversion buffer property */ -#define H5D_XFER_TCONV_BUF_SIZE sizeof(void *) -#define H5D_XFER_TCONV_BUF_DEF NULL +#define H5D_XFER_TCONV_BUF_SIZE sizeof(void *) +#define H5D_XFER_TCONV_BUF_DEF NULL /* Definitions for background buffer property */ -#define H5D_XFER_BKGR_BUF_SIZE sizeof(void *) -#define H5D_XFER_BKGR_BUF_DEF NULL +#define H5D_XFER_BKGR_BUF_SIZE sizeof(void *) +#define H5D_XFER_BKGR_BUF_DEF NULL /* Definitions for background buffer type property */ -#define H5D_XFER_BKGR_BUF_TYPE_SIZE sizeof(H5T_bkg_t) -#define H5D_XFER_BKGR_BUF_TYPE_DEF H5T_BKG_NO -#define H5D_XFER_BKGR_BUF_TYPE_ENC H5P__dxfr_bkgr_buf_type_enc -#define H5D_XFER_BKGR_BUF_TYPE_DEC H5P__dxfr_bkgr_buf_type_dec +#define H5D_XFER_BKGR_BUF_TYPE_SIZE sizeof(H5T_bkg_t) +#define H5D_XFER_BKGR_BUF_TYPE_DEF H5T_BKG_NO +#define H5D_XFER_BKGR_BUF_TYPE_ENC H5P__dxfr_bkgr_buf_type_enc +#define H5D_XFER_BKGR_BUF_TYPE_DEC H5P__dxfr_bkgr_buf_type_dec /* Definitions for B-tree node splitting ratio property */ /* (These default B-tree node splitting ratios are also used for splitting * group's B-trees as well as chunked dataset's B-trees - QAK) */ #define H5D_XFER_BTREE_SPLIT_RATIO_SIZE sizeof(double[3]) -#define H5D_XFER_BTREE_SPLIT_RATIO_DEF {0.1f, 0.5f, 0.9f} -#define H5D_XFER_BTREE_SPLIT_RATIO_ENC H5P__dxfr_btree_split_ratio_enc -#define H5D_XFER_BTREE_SPLIT_RATIO_DEC H5P__dxfr_btree_split_ratio_dec +#define H5D_XFER_BTREE_SPLIT_RATIO_DEF \ + { \ + 0.1f, 0.5f, 0.9f \ + } +#define H5D_XFER_BTREE_SPLIT_RATIO_ENC H5P__dxfr_btree_split_ratio_enc +#define H5D_XFER_BTREE_SPLIT_RATIO_DEC H5P__dxfr_btree_split_ratio_dec /* Definitions for vlen allocation function property */ -#define H5D_XFER_VLEN_ALLOC_SIZE sizeof(H5MM_allocate_t) -#define H5D_XFER_VLEN_ALLOC_DEF H5D_VLEN_ALLOC +#define H5D_XFER_VLEN_ALLOC_SIZE sizeof(H5MM_allocate_t) +#define H5D_XFER_VLEN_ALLOC_DEF H5D_VLEN_ALLOC /* Definitions for vlen allocation info property */ -#define H5D_XFER_VLEN_ALLOC_INFO_SIZE sizeof(void *) -#define H5D_XFER_VLEN_ALLOC_INFO_DEF H5D_VLEN_ALLOC_INFO +#define H5D_XFER_VLEN_ALLOC_INFO_SIZE sizeof(void *) +#define H5D_XFER_VLEN_ALLOC_INFO_DEF H5D_VLEN_ALLOC_INFO /* Definitions for vlen free function property */ -#define H5D_XFER_VLEN_FREE_SIZE sizeof(H5MM_free_t) -#define H5D_XFER_VLEN_FREE_DEF H5D_VLEN_FREE +#define H5D_XFER_VLEN_FREE_SIZE sizeof(H5MM_free_t) +#define H5D_XFER_VLEN_FREE_DEF H5D_VLEN_FREE /* Definitions for vlen free info property */ -#define H5D_XFER_VLEN_FREE_INFO_SIZE sizeof(void *) -#define H5D_XFER_VLEN_FREE_INFO_DEF H5D_VLEN_FREE_INFO +#define H5D_XFER_VLEN_FREE_INFO_SIZE sizeof(void *) +#define H5D_XFER_VLEN_FREE_INFO_DEF H5D_VLEN_FREE_INFO /* Definitions for hyperslab vector size property */ /* (Be cautious about increasing the default size, there are arrays allocated * on the stack which depend on it - QAK) @@ -99,71 +100,74 @@ */ /* Definitions for I/O transfer mode property */ -#define H5D_XFER_IO_XFER_MODE_SIZE sizeof(H5FD_mpio_xfer_t) -#define H5D_XFER_IO_XFER_MODE_DEF H5FD_MPIO_INDEPENDENT -#define H5D_XFER_IO_XFER_MODE_ENC H5P__dxfr_io_xfer_mode_enc -#define H5D_XFER_IO_XFER_MODE_DEC H5P__dxfr_io_xfer_mode_dec +#define H5D_XFER_IO_XFER_MODE_SIZE sizeof(H5FD_mpio_xfer_t) +#define H5D_XFER_IO_XFER_MODE_DEF H5FD_MPIO_INDEPENDENT +#define H5D_XFER_IO_XFER_MODE_ENC H5P__dxfr_io_xfer_mode_enc +#define H5D_XFER_IO_XFER_MODE_DEC H5P__dxfr_io_xfer_mode_dec /* Definitions for optimization of MPI-IO transfer mode property */ -#define H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE sizeof(H5FD_mpio_collective_opt_t) -#define H5D_XFER_MPIO_COLLECTIVE_OPT_DEF H5FD_MPIO_COLLECTIVE_IO -#define H5D_XFER_MPIO_COLLECTIVE_OPT_ENC H5P__dxfr_mpio_collective_opt_enc -#define H5D_XFER_MPIO_COLLECTIVE_OPT_DEC H5P__dxfr_mpio_collective_opt_dec -#define H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE sizeof(H5FD_mpio_chunk_opt_t) -#define H5D_XFER_MPIO_CHUNK_OPT_HARD_DEF H5FD_MPIO_CHUNK_DEFAULT -#define H5D_XFER_MPIO_CHUNK_OPT_HARD_ENC H5P__dxfr_mpio_chunk_opt_hard_enc -#define H5D_XFER_MPIO_CHUNK_OPT_HARD_DEC H5P__dxfr_mpio_chunk_opt_hard_dec -#define H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE sizeof(unsigned) -#define H5D_XFER_MPIO_CHUNK_OPT_NUM_DEF H5D_ONE_LINK_CHUNK_IO_THRESHOLD -#define H5D_XFER_MPIO_CHUNK_OPT_NUM_ENC H5P__encode_unsigned -#define H5D_XFER_MPIO_CHUNK_OPT_NUM_DEC H5P__decode_unsigned -#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE sizeof(unsigned) -#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF H5D_MULTI_CHUNK_IO_COL_THRESHOLD -#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_ENC H5P__encode_unsigned -#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEC H5P__decode_unsigned +#define H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE sizeof(H5FD_mpio_collective_opt_t) +#define H5D_XFER_MPIO_COLLECTIVE_OPT_DEF H5FD_MPIO_COLLECTIVE_IO +#define H5D_XFER_MPIO_COLLECTIVE_OPT_ENC H5P__dxfr_mpio_collective_opt_enc +#define H5D_XFER_MPIO_COLLECTIVE_OPT_DEC H5P__dxfr_mpio_collective_opt_dec +#define H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE sizeof(H5FD_mpio_chunk_opt_t) +#define H5D_XFER_MPIO_CHUNK_OPT_HARD_DEF H5FD_MPIO_CHUNK_DEFAULT +#define H5D_XFER_MPIO_CHUNK_OPT_HARD_ENC H5P__dxfr_mpio_chunk_opt_hard_enc +#define H5D_XFER_MPIO_CHUNK_OPT_HARD_DEC H5P__dxfr_mpio_chunk_opt_hard_dec +#define H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE sizeof(unsigned) +#define H5D_XFER_MPIO_CHUNK_OPT_NUM_DEF H5D_ONE_LINK_CHUNK_IO_THRESHOLD +#define H5D_XFER_MPIO_CHUNK_OPT_NUM_ENC H5P__encode_unsigned +#define H5D_XFER_MPIO_CHUNK_OPT_NUM_DEC H5P__decode_unsigned +#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE sizeof(unsigned) +#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF H5D_MULTI_CHUNK_IO_COL_THRESHOLD +#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_ENC H5P__encode_unsigned +#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEC H5P__decode_unsigned /* Definitions for chunk opt mode property. */ -#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE sizeof(H5D_mpio_actual_chunk_opt_mode_t) -#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF H5D_MPIO_NO_CHUNK_OPTIMIZATION +#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE sizeof(H5D_mpio_actual_chunk_opt_mode_t) +#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF H5D_MPIO_NO_CHUNK_OPTIMIZATION /* Definitions for chunk io mode property. */ -#define H5D_MPIO_ACTUAL_IO_MODE_SIZE sizeof(H5D_mpio_actual_io_mode_t) -#define H5D_MPIO_ACTUAL_IO_MODE_DEF H5D_MPIO_NO_COLLECTIVE +#define H5D_MPIO_ACTUAL_IO_MODE_SIZE sizeof(H5D_mpio_actual_io_mode_t) +#define H5D_MPIO_ACTUAL_IO_MODE_DEF H5D_MPIO_NO_COLLECTIVE /* Definitions for cause of broken collective io property */ -#define H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE sizeof(uint32_t) -#define H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF H5D_MPIO_COLLECTIVE +#define H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE sizeof(uint32_t) +#define H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF H5D_MPIO_COLLECTIVE /* Definitions for EDC property */ -#define H5D_XFER_EDC_SIZE sizeof(H5Z_EDC_t) -#define H5D_XFER_EDC_DEF H5Z_ENABLE_EDC -#define H5D_XFER_EDC_ENC H5P__dxfr_edc_enc -#define H5D_XFER_EDC_DEC H5P__dxfr_edc_dec +#define H5D_XFER_EDC_SIZE sizeof(H5Z_EDC_t) +#define H5D_XFER_EDC_DEF H5Z_ENABLE_EDC +#define H5D_XFER_EDC_ENC H5P__dxfr_edc_enc +#define H5D_XFER_EDC_DEC H5P__dxfr_edc_dec /* Definitions for filter callback function property */ -#define H5D_XFER_FILTER_CB_SIZE sizeof(H5Z_cb_t) -#define H5D_XFER_FILTER_CB_DEF {NULL,NULL} +#define H5D_XFER_FILTER_CB_SIZE sizeof(H5Z_cb_t) +#define H5D_XFER_FILTER_CB_DEF \ + { \ + NULL, NULL \ + } /* Definitions for type conversion callback function property */ -#define H5D_XFER_CONV_CB_SIZE sizeof(H5T_conv_cb_t) -#define H5D_XFER_CONV_CB_DEF {NULL,NULL} +#define H5D_XFER_CONV_CB_SIZE sizeof(H5T_conv_cb_t) +#define H5D_XFER_CONV_CB_DEF \ + { \ + NULL, NULL \ + } /* Definitions for data transform property */ -#define H5D_XFER_XFORM_SIZE sizeof(void *) -#define H5D_XFER_XFORM_DEF NULL -#define H5D_XFER_XFORM_SET H5P__dxfr_xform_set -#define H5D_XFER_XFORM_GET H5P__dxfr_xform_get -#define H5D_XFER_XFORM_ENC H5P__dxfr_xform_enc -#define H5D_XFER_XFORM_DEC H5P__dxfr_xform_dec -#define H5D_XFER_XFORM_DEL H5P__dxfr_xform_del -#define H5D_XFER_XFORM_COPY H5P__dxfr_xform_copy -#define H5D_XFER_XFORM_CMP H5P__dxfr_xform_cmp -#define H5D_XFER_XFORM_CLOSE H5P__dxfr_xform_close - +#define H5D_XFER_XFORM_SIZE sizeof(void *) +#define H5D_XFER_XFORM_DEF NULL +#define H5D_XFER_XFORM_SET H5P__dxfr_xform_set +#define H5D_XFER_XFORM_GET H5P__dxfr_xform_get +#define H5D_XFER_XFORM_ENC H5P__dxfr_xform_enc +#define H5D_XFER_XFORM_DEC H5P__dxfr_xform_dec +#define H5D_XFER_XFORM_DEL H5P__dxfr_xform_del +#define H5D_XFER_XFORM_COPY H5P__dxfr_xform_copy +#define H5D_XFER_XFORM_CMP H5P__dxfr_xform_cmp +#define H5D_XFER_XFORM_CLOSE H5P__dxfr_xform_close /******************/ /* Local Typedefs */ /******************/ - /********************/ /* Package Typedefs */ /********************/ - /********************/ /* Local Prototypes */ /********************/ @@ -184,15 +188,14 @@ static herr_t H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **pp, si static herr_t H5P__dxfr_mpio_chunk_opt_hard_dec(const void **pp, void *value); static herr_t H5P__dxfr_edc_enc(const void *value, void **pp, size_t *size); static herr_t H5P__dxfr_edc_dec(const void **pp, void *value); -static herr_t H5P__dxfr_xform_set(hid_t prop_id, const char* name, size_t size, void* value); -static herr_t H5P__dxfr_xform_get(hid_t prop_id, const char* name, size_t size, void* value); +static herr_t H5P__dxfr_xform_set(hid_t prop_id, const char *name, size_t size, void *value); +static herr_t H5P__dxfr_xform_get(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dxfr_xform_enc(const void *value, void **pp, size_t *size); static herr_t H5P__dxfr_xform_dec(const void **pp, void *value); -static herr_t H5P__dxfr_xform_del(hid_t prop_id, const char* name, size_t size, void* value); -static herr_t H5P__dxfr_xform_copy(const char* name, size_t size, void* value); -static int H5P__dxfr_xform_cmp(const void *value1, const void *value2, size_t size); -static herr_t H5P__dxfr_xform_close(const char* name, size_t size, void* value); - +static herr_t H5P__dxfr_xform_del(hid_t prop_id, const char *name, size_t size, void *value); +static herr_t H5P__dxfr_xform_copy(const char *name, size_t size, void *value); +static int H5P__dxfr_xform_cmp(const void *value1, const void *value2, size_t size); +static herr_t H5P__dxfr_xform_close(const char *name, size_t size, void *value); /*********************/ /* Package Variables */ @@ -200,58 +203,67 @@ static herr_t H5P__dxfr_xform_close(const char* name, size_t size, void* value); /* Data transfer property list class library initialization object */ const H5P_libclass_t H5P_CLS_DXFR[1] = {{ - "data transfer", /* Class name for debugging */ - H5P_TYPE_DATASET_XFER, /* Class type */ - - &H5P_CLS_ROOT_g, /* Parent class */ - &H5P_CLS_DATASET_XFER_g, /* Pointer to class */ - &H5P_CLS_DATASET_XFER_ID_g, /* Pointer to class ID */ - &H5P_LST_DATASET_XFER_ID_g, /* Pointer to default property list ID */ - H5P__dxfr_reg_prop, /* Default property registration routine */ - - NULL, /* Class creation callback */ - NULL, /* Class creation callback info */ - NULL, /* Class copy callback */ - NULL, /* Class copy callback info */ - NULL, /* Class close callback */ - NULL /* Class close callback info */ + "data transfer", /* Class name for debugging */ + H5P_TYPE_DATASET_XFER, /* Class type */ + + &H5P_CLS_ROOT_g, /* Parent class */ + &H5P_CLS_DATASET_XFER_g, /* Pointer to class */ + &H5P_CLS_DATASET_XFER_ID_g, /* Pointer to class ID */ + &H5P_LST_DATASET_XFER_ID_g, /* Pointer to default property list ID */ + H5P__dxfr_reg_prop, /* Default property registration routine */ + + NULL, /* Class creation callback */ + NULL, /* Class creation callback info */ + NULL, /* Class copy callback */ + NULL, /* Class copy callback info */ + NULL, /* Class close callback */ + NULL /* Class close callback info */ }}; - /*****************************/ /* Library Private Variables */ /*****************************/ - /***************************/ /* Local Private Variables */ /***************************/ /* Property value defaults */ -static const size_t H5D_def_max_temp_buf_g = H5D_XFER_MAX_TEMP_BUF_DEF; /* Default value for maximum temp buffer size */ -static const void *H5D_def_tconv_buf_g = H5D_XFER_TCONV_BUF_DEF; /* Default value for type conversion buffer */ -static const void *H5D_def_bkgr_buf_g = H5D_XFER_BKGR_BUF_DEF; /* Default value for background buffer */ +static const size_t H5D_def_max_temp_buf_g = + H5D_XFER_MAX_TEMP_BUF_DEF; /* Default value for maximum temp buffer size */ +static const void *H5D_def_tconv_buf_g = + H5D_XFER_TCONV_BUF_DEF; /* Default value for type conversion buffer */ +static const void * H5D_def_bkgr_buf_g = H5D_XFER_BKGR_BUF_DEF; /* Default value for background buffer */ static const H5T_bkg_t H5D_def_bkgr_buf_type_g = H5D_XFER_BKGR_BUF_TYPE_DEF; -static const double H5D_def_btree_split_ratio_g[3] = H5D_XFER_BTREE_SPLIT_RATIO_DEF; /* Default value for B-tree node split ratios */ -static const H5MM_allocate_t H5D_def_vlen_alloc_g = H5D_XFER_VLEN_ALLOC_DEF; /* Default value for vlen allocation function */ -static const void *H5D_def_vlen_alloc_info_g = H5D_XFER_VLEN_ALLOC_INFO_DEF; /* Default value for vlen allocation information */ -static const H5MM_free_t H5D_def_vlen_free_g = H5D_XFER_VLEN_FREE_DEF; /* Default value for vlen free function */ -static const void *H5D_def_vlen_free_info_g = H5D_XFER_VLEN_FREE_INFO_DEF; /* Default value for vlen free information */ -static const size_t H5D_def_hyp_vec_size_g = H5D_XFER_HYPER_VECTOR_SIZE_DEF; /* Default value for vector size */ -static const H5FD_mpio_xfer_t H5D_def_io_xfer_mode_g = H5D_XFER_IO_XFER_MODE_DEF; /* Default value for I/O transfer mode */ -static const H5FD_mpio_chunk_opt_t H5D_def_mpio_chunk_opt_mode_g = H5D_XFER_MPIO_CHUNK_OPT_HARD_DEF; +static const double H5D_def_btree_split_ratio_g[3] = + H5D_XFER_BTREE_SPLIT_RATIO_DEF; /* Default value for B-tree node split ratios */ +static const H5MM_allocate_t H5D_def_vlen_alloc_g = + H5D_XFER_VLEN_ALLOC_DEF; /* Default value for vlen allocation function */ +static const void *H5D_def_vlen_alloc_info_g = + H5D_XFER_VLEN_ALLOC_INFO_DEF; /* Default value for vlen allocation information */ +static const H5MM_free_t H5D_def_vlen_free_g = + H5D_XFER_VLEN_FREE_DEF; /* Default value for vlen free function */ +static const void *H5D_def_vlen_free_info_g = + H5D_XFER_VLEN_FREE_INFO_DEF; /* Default value for vlen free information */ +static const size_t H5D_def_hyp_vec_size_g = + H5D_XFER_HYPER_VECTOR_SIZE_DEF; /* Default value for vector size */ +static const H5FD_mpio_xfer_t H5D_def_io_xfer_mode_g = + H5D_XFER_IO_XFER_MODE_DEF; /* Default value for I/O transfer mode */ +static const H5FD_mpio_chunk_opt_t H5D_def_mpio_chunk_opt_mode_g = H5D_XFER_MPIO_CHUNK_OPT_HARD_DEF; static const H5FD_mpio_collective_opt_t H5D_def_mpio_collective_opt_mode_g = H5D_XFER_MPIO_COLLECTIVE_OPT_DEF; -static const unsigned H5D_def_mpio_chunk_opt_num_g = H5D_XFER_MPIO_CHUNK_OPT_NUM_DEF; -static const unsigned H5D_def_mpio_chunk_opt_ratio_g = H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF; -static const H5D_mpio_actual_chunk_opt_mode_t H5D_def_mpio_actual_chunk_opt_mode_g = H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF; -static const H5D_mpio_actual_io_mode_t H5D_def_mpio_actual_io_mode_g = H5D_MPIO_ACTUAL_IO_MODE_DEF; -static const H5D_mpio_no_collective_cause_t H5D_def_mpio_no_collective_cause_g = H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF; -static const H5Z_EDC_t H5D_def_enable_edc_g = H5D_XFER_EDC_DEF; /* Default value for EDC property */ -static const H5Z_cb_t H5D_def_filter_cb_g = H5D_XFER_FILTER_CB_DEF; /* Default value for filter callback */ -static const H5T_conv_cb_t H5D_def_conv_cb_g = H5D_XFER_CONV_CB_DEF; /* Default value for datatype conversion callback */ -static const void *H5D_def_xfer_xform_g = H5D_XFER_XFORM_DEF; /* Default value for data transform */ - - +static const unsigned H5D_def_mpio_chunk_opt_num_g = H5D_XFER_MPIO_CHUNK_OPT_NUM_DEF; +static const unsigned H5D_def_mpio_chunk_opt_ratio_g = H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF; +static const H5D_mpio_actual_chunk_opt_mode_t H5D_def_mpio_actual_chunk_opt_mode_g = + H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF; +static const H5D_mpio_actual_io_mode_t H5D_def_mpio_actual_io_mode_g = H5D_MPIO_ACTUAL_IO_MODE_DEF; +static const H5D_mpio_no_collective_cause_t H5D_def_mpio_no_collective_cause_g = + H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF; +static const H5Z_EDC_t H5D_def_enable_edc_g = H5D_XFER_EDC_DEF; /* Default value for EDC property */ +static const H5Z_cb_t H5D_def_filter_cb_g = H5D_XFER_FILTER_CB_DEF; /* Default value for filter callback */ +static const H5T_conv_cb_t H5D_def_conv_cb_g = + H5D_XFER_CONV_CB_DEF; /* Default value for datatype conversion callback */ +static const void *H5D_def_xfer_xform_g = H5D_XFER_XFORM_DEF; /* Default value for data transform */ + /*------------------------------------------------------------------------- * Function: H5P__dxfr_reg_prop * @@ -266,145 +278,152 @@ static const void *H5D_def_xfer_xform_g = H5D_XFER_XFORM_DEF; /* Defaul static herr_t H5P__dxfr_reg_prop(H5P_genclass_t *pclass) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Register the max. temp buffer size property */ - if(H5P__register_real(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE, &H5D_def_max_temp_buf_g, - NULL, NULL, NULL, H5D_XFER_MAX_TEMP_BUF_ENC, H5D_XFER_MAX_TEMP_BUF_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE, + &H5D_def_max_temp_buf_g, NULL, NULL, NULL, H5D_XFER_MAX_TEMP_BUF_ENC, + H5D_XFER_MAX_TEMP_BUF_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the type conversion buffer property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_TCONV_BUF_NAME, H5D_XFER_TCONV_BUF_SIZE, &H5D_def_tconv_buf_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_TCONV_BUF_NAME, H5D_XFER_TCONV_BUF_SIZE, &H5D_def_tconv_buf_g, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the background buffer property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_BKGR_BUF_NAME, H5D_XFER_BKGR_BUF_SIZE, &H5D_def_bkgr_buf_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_BKGR_BUF_NAME, H5D_XFER_BKGR_BUF_SIZE, &H5D_def_bkgr_buf_g, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the background buffer type property */ - if(H5P__register_real(pclass, H5D_XFER_BKGR_BUF_TYPE_NAME, H5D_XFER_BKGR_BUF_TYPE_SIZE, &H5D_def_bkgr_buf_type_g, - NULL, NULL, NULL, H5D_XFER_BKGR_BUF_TYPE_ENC, H5D_XFER_BKGR_BUF_TYPE_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_BKGR_BUF_TYPE_NAME, H5D_XFER_BKGR_BUF_TYPE_SIZE, + &H5D_def_bkgr_buf_type_g, NULL, NULL, NULL, H5D_XFER_BKGR_BUF_TYPE_ENC, + H5D_XFER_BKGR_BUF_TYPE_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the B-Tree node splitting ratios property */ - if(H5P__register_real(pclass, H5D_XFER_BTREE_SPLIT_RATIO_NAME, H5D_XFER_BTREE_SPLIT_RATIO_SIZE, H5D_def_btree_split_ratio_g, - NULL, NULL, NULL, H5D_XFER_BTREE_SPLIT_RATIO_ENC, H5D_XFER_BTREE_SPLIT_RATIO_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_BTREE_SPLIT_RATIO_NAME, H5D_XFER_BTREE_SPLIT_RATIO_SIZE, + H5D_def_btree_split_ratio_g, NULL, NULL, NULL, H5D_XFER_BTREE_SPLIT_RATIO_ENC, + H5D_XFER_BTREE_SPLIT_RATIO_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen allocation function property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_VLEN_ALLOC_NAME, H5D_XFER_VLEN_ALLOC_SIZE, &H5D_def_vlen_alloc_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_VLEN_ALLOC_NAME, H5D_XFER_VLEN_ALLOC_SIZE, &H5D_def_vlen_alloc_g, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen allocation information property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_VLEN_ALLOC_INFO_NAME, H5D_XFER_VLEN_ALLOC_INFO_SIZE, &H5D_def_vlen_alloc_info_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_VLEN_ALLOC_INFO_NAME, H5D_XFER_VLEN_ALLOC_INFO_SIZE, + &H5D_def_vlen_alloc_info_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen free function property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_VLEN_FREE_NAME, H5D_XFER_VLEN_FREE_SIZE, &H5D_def_vlen_free_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_VLEN_FREE_NAME, H5D_XFER_VLEN_FREE_SIZE, &H5D_def_vlen_free_g, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen free information property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_VLEN_FREE_INFO_NAME, H5D_XFER_VLEN_FREE_INFO_SIZE, &H5D_def_vlen_free_info_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_VLEN_FREE_INFO_NAME, H5D_XFER_VLEN_FREE_INFO_SIZE, + &H5D_def_vlen_free_info_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vector size property */ - if(H5P__register_real(pclass, H5D_XFER_HYPER_VECTOR_SIZE_NAME, H5D_XFER_HYPER_VECTOR_SIZE_SIZE, &H5D_def_hyp_vec_size_g, - NULL, NULL, NULL, H5D_XFER_HYPER_VECTOR_SIZE_ENC, H5D_XFER_HYPER_VECTOR_SIZE_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_HYPER_VECTOR_SIZE_NAME, H5D_XFER_HYPER_VECTOR_SIZE_SIZE, + &H5D_def_hyp_vec_size_g, NULL, NULL, NULL, H5D_XFER_HYPER_VECTOR_SIZE_ENC, + H5D_XFER_HYPER_VECTOR_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the I/O transfer mode properties */ - if(H5P__register_real(pclass, H5D_XFER_IO_XFER_MODE_NAME, H5D_XFER_IO_XFER_MODE_SIZE, &H5D_def_io_xfer_mode_g, - NULL, NULL, NULL, H5D_XFER_IO_XFER_MODE_ENC, H5D_XFER_IO_XFER_MODE_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_IO_XFER_MODE_NAME, H5D_XFER_IO_XFER_MODE_SIZE, + &H5D_def_io_xfer_mode_g, NULL, NULL, NULL, H5D_XFER_IO_XFER_MODE_ENC, + H5D_XFER_IO_XFER_MODE_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P__register_real(pclass, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE, &H5D_def_mpio_collective_opt_mode_g, - NULL, NULL, NULL, H5D_XFER_MPIO_COLLECTIVE_OPT_ENC, H5D_XFER_MPIO_COLLECTIVE_OPT_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE, + &H5D_def_mpio_collective_opt_mode_g, NULL, NULL, NULL, + H5D_XFER_MPIO_COLLECTIVE_OPT_ENC, H5D_XFER_MPIO_COLLECTIVE_OPT_DEC, NULL, NULL, + NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE, &H5D_def_mpio_chunk_opt_mode_g, - NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_HARD_ENC, H5D_XFER_MPIO_CHUNK_OPT_HARD_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE, + &H5D_def_mpio_chunk_opt_mode_g, NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_HARD_ENC, + H5D_XFER_MPIO_CHUNK_OPT_HARD_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE, &H5D_def_mpio_chunk_opt_num_g, - NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_NUM_ENC, H5D_XFER_MPIO_CHUNK_OPT_NUM_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE, + &H5D_def_mpio_chunk_opt_num_g, NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_NUM_ENC, + H5D_XFER_MPIO_CHUNK_OPT_NUM_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE, &H5D_def_mpio_chunk_opt_ratio_g, - NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_RATIO_ENC, H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE, + &H5D_def_mpio_chunk_opt_ratio_g, NULL, NULL, NULL, + H5D_XFER_MPIO_CHUNK_OPT_RATIO_ENC, H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEC, NULL, NULL, + NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the chunk optimization mode property. */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE, &H5D_def_mpio_actual_chunk_opt_mode_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE, + &H5D_def_mpio_actual_chunk_opt_mode_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the actual I/O mode property. */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_MPIO_ACTUAL_IO_MODE_NAME, H5D_MPIO_ACTUAL_IO_MODE_SIZE, &H5D_def_mpio_actual_io_mode_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_MPIO_ACTUAL_IO_MODE_NAME, H5D_MPIO_ACTUAL_IO_MODE_SIZE, + &H5D_def_mpio_actual_io_mode_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the local cause of broken collective I/O */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &H5D_def_mpio_no_collective_cause_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, + &H5D_def_mpio_no_collective_cause_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the global cause of broken collective I/O */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &H5D_def_mpio_no_collective_cause_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, + H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &H5D_def_mpio_no_collective_cause_g, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the EDC property */ - if(H5P__register_real(pclass, H5D_XFER_EDC_NAME, H5D_XFER_EDC_SIZE, &H5D_def_enable_edc_g, - NULL, NULL, NULL, H5D_XFER_EDC_ENC, H5D_XFER_EDC_DEC, - NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_EDC_NAME, H5D_XFER_EDC_SIZE, &H5D_def_enable_edc_g, NULL, NULL, + NULL, H5D_XFER_EDC_ENC, H5D_XFER_EDC_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the filter callback property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_FILTER_CB_NAME, H5D_XFER_FILTER_CB_SIZE, &H5D_def_filter_cb_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_FILTER_CB_NAME, H5D_XFER_FILTER_CB_SIZE, &H5D_def_filter_cb_g, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the type conversion callback property */ /* (Note: this property should not have an encode/decode callback -QAK) */ - if(H5P__register_real(pclass, H5D_XFER_CONV_CB_NAME, H5D_XFER_CONV_CB_SIZE, &H5D_def_conv_cb_g, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if (H5P__register_real(pclass, H5D_XFER_CONV_CB_NAME, H5D_XFER_CONV_CB_SIZE, &H5D_def_conv_cb_g, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the data transform property */ - if(H5P__register_real(pclass, H5D_XFER_XFORM_NAME, H5D_XFER_XFORM_SIZE, &H5D_def_xfer_xform_g, - NULL, H5D_XFER_XFORM_SET, H5D_XFER_XFORM_GET, H5D_XFER_XFORM_ENC, H5D_XFER_XFORM_DEC, - H5D_XFER_XFORM_DEL, H5D_XFER_XFORM_COPY, H5D_XFER_XFORM_CMP, H5D_XFER_XFORM_CLOSE) < 0) + if (H5P__register_real(pclass, H5D_XFER_XFORM_NAME, H5D_XFER_XFORM_SIZE, &H5D_def_xfer_xform_g, NULL, + H5D_XFER_XFORM_SET, H5D_XFER_XFORM_GET, H5D_XFER_XFORM_ENC, H5D_XFER_XFORM_DEC, + H5D_XFER_XFORM_DEL, H5D_XFER_XFORM_COPY, H5D_XFER_XFORM_CMP, + H5D_XFER_XFORM_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_reg_prop() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_bkgr_buf_type_enc * @@ -424,7 +443,7 @@ static herr_t H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size) { const H5T_bkg_t *bkgr_buf_type = (const H5T_bkg_t *)value; /* Create local alias for values */ - uint8_t **pp = (uint8_t **)_pp; + uint8_t ** pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -432,7 +451,7 @@ H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size) HDassert(bkgr_buf_type); HDassert(size); - if(NULL != *pp) + if (NULL != *pp) /* Encode background buffer type */ *(*pp)++ = (uint8_t)*bkgr_buf_type; @@ -442,7 +461,6 @@ H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_bkgr_buf_type_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_bkgr_buf_type_dec * @@ -461,8 +479,8 @@ H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size) static herr_t H5P__dxfr_bkgr_buf_type_dec(const void **_pp, void *_value) { - H5T_bkg_t *bkgr_buf_type = (H5T_bkg_t *)_value; /* Background buffer type */ - const uint8_t **pp = (const uint8_t **)_pp; + H5T_bkg_t * bkgr_buf_type = (H5T_bkg_t *)_value; /* Background buffer type */ + const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -472,12 +490,11 @@ H5P__dxfr_bkgr_buf_type_dec(const void **_pp, void *_value) HDassert(bkgr_buf_type); /* Decode background buffer type */ - *bkgr_buf_type = (H5T_bkg_t)*(*pp)++; + *bkgr_buf_type = (H5T_bkg_t) * (*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_bkgr_buf_type_dec() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_btree_split_ratio_enc * @@ -497,7 +514,7 @@ static herr_t H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size) { const double *btree_split_ratio = (const double *)value; /* Create local alias for values */ - uint8_t **pp = (uint8_t **)_pp; + uint8_t ** pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -505,7 +522,7 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size) HDassert(btree_split_ratio); HDassert(size); - if(NULL != *pp) { + if (NULL != *pp) { /* Encode the size of a double*/ *(*pp)++ = (uint8_t)sizeof(double); @@ -527,7 +544,6 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_btree_split_ratio_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_btree_split_ratio_dec * @@ -546,10 +562,10 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size) static herr_t H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value) { - double *btree_split_ratio = (double *)_value; /* B-tree split ratio */ - unsigned enc_size; /* Size of encoded property */ - const uint8_t **pp = (const uint8_t **)_pp; - herr_t ret_value = SUCCEED; /* Return value */ + double * btree_split_ratio = (double *)_value; /* B-tree split ratio */ + unsigned enc_size; /* Size of encoded property */ + const uint8_t **pp = (const uint8_t **)_pp; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -560,7 +576,7 @@ H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; - if(enc_size != sizeof(double)) + if (enc_size != sizeof(double)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded") /* Decode the left, middle & left B-tree split ratios */ @@ -572,7 +588,6 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_btree_split_ratio_dec() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_set * @@ -587,10 +602,10 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, - size_t H5_ATTR_UNUSED size, void *value) +H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, + void *value) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -598,14 +613,13 @@ H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam HDassert(value); /* Make copy of data transform */ - if(H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) + if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_set() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_get * @@ -620,10 +634,10 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, - size_t H5_ATTR_UNUSED size, void *value) +H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, + void *value) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -631,14 +645,13 @@ H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam HDassert(value); /* Make copy of data transform */ - if(H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) + if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_get() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_enc * @@ -657,11 +670,12 @@ done: static herr_t H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size) { - const H5Z_data_xform_t *data_xform_prop = *(const H5Z_data_xform_t * const *)value; /* Create local alias for values */ - const char *pexp = NULL; /* Pointer to transform expression */ - size_t len = 0; /* Length of transform expression */ - uint8_t **pp = (uint8_t **)_pp; - herr_t ret_value = SUCCEED; /* Return value */ + const H5Z_data_xform_t *data_xform_prop = + *(const H5Z_data_xform_t *const *)value; /* Create local alias for values */ + const char *pexp = NULL; /* Pointer to transform expression */ + size_t len = 0; /* Length of transform expression */ + uint8_t ** pp = (uint8_t **)_pp; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -670,27 +684,27 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size) HDassert(size); /* Check for data transform set */ - if(NULL != data_xform_prop) { + if (NULL != data_xform_prop) { /* Get the transform expression */ - if(NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) + if (NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") /* Get the transform string expression size */ len = HDstrlen(pexp) + 1; } /* end if */ - if(NULL != *pp) { + if (NULL != *pp) { uint64_t enc_value; unsigned enc_size; /* encode the length of the prefix */ enc_value = (uint64_t)len; - enc_size = H5VM_limit_enc_size(enc_value); + enc_size = H5VM_limit_enc_size(enc_value); HDassert(enc_size < 256); *(*pp)++ = (uint8_t)enc_size; UINT64ENCODE_VAR(*pp, enc_value, enc_size); - if(NULL != data_xform_prop) { + if (NULL != data_xform_prop) { /* Sanity check */ HDassert(pexp); @@ -699,18 +713,17 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size) *pp += len; *pp[0] = '\0'; } /* end if */ - } /* end if */ + } /* end if */ /* Size of encoded data transform */ *size += (1 + H5VM_limit_enc_size((uint64_t)len)); - if(NULL != pexp) + if (NULL != pexp) *size += len; done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_dec * @@ -729,12 +742,12 @@ done: static herr_t H5P__dxfr_xform_dec(const void **_pp, void *_value) { - H5Z_data_xform_t **data_xform_prop = (H5Z_data_xform_t **)_value; /* New data xform property */ - size_t len; /* Length of encoded string */ - const uint8_t **pp = (const uint8_t **)_pp; - unsigned enc_size; - uint64_t enc_value; - herr_t ret_value = SUCCEED; /* Return value */ + H5Z_data_xform_t **data_xform_prop = (H5Z_data_xform_t **)_value; /* New data xform property */ + size_t len; /* Length of encoded string */ + const uint8_t ** pp = (const uint8_t **)_pp; + unsigned enc_size; + uint64_t enc_value; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -750,8 +763,8 @@ H5P__dxfr_xform_dec(const void **_pp, void *_value) UINT64DECODE_VAR(*pp, enc_value, enc_size); len = (size_t)enc_value; - if(0 != len) { - if(NULL == (*data_xform_prop = H5Z_xform_create((const char *)*pp))) + if (0 != len) { + if (NULL == (*data_xform_prop = H5Z_xform_create((const char *)*pp))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create data transform info") *pp += len; } /* end if */ @@ -762,7 +775,6 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_dec() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_del * @@ -777,22 +789,22 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) +H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, + void *value) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC HDassert(value); - if(H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) + if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_del() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_copy * @@ -810,7 +822,7 @@ done: static herr_t H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -818,14 +830,13 @@ H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size HDassert(value); /* Make copy of data transform */ - if(H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) + if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_copy() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_cmp * @@ -842,10 +853,12 @@ done: static int H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNUSED size) { - const H5Z_data_xform_t * const *xform1 = (const H5Z_data_xform_t * const *)_xform1; /* Create local aliases for values */ - const H5Z_data_xform_t * const *xform2 = (const H5Z_data_xform_t * const *)_xform2; /* Create local aliases for values */ - const char *pexp1, *pexp2; /* Pointers to transform expressions */ - herr_t ret_value = 0; /* Return value */ + const H5Z_data_xform_t *const *xform1 = + (const H5Z_data_xform_t *const *)_xform1; /* Create local aliases for values */ + const H5Z_data_xform_t *const *xform2 = + (const H5Z_data_xform_t *const *)_xform2; /* Create local aliases for values */ + const char *pexp1, *pexp2; /* Pointers to transform expressions */ + herr_t ret_value = 0; /* Return value */ FUNC_ENTER_STATIC_NOERR @@ -855,10 +868,12 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU HDassert(size == sizeof(H5Z_data_xform_t *)); /* Check for a property being set */ - if(*xform1 == NULL && *xform2 != NULL) HGOTO_DONE(-1); - if(*xform1 != NULL && *xform2 == NULL) HGOTO_DONE(1); + if (*xform1 == NULL && *xform2 != NULL) + HGOTO_DONE(-1); + if (*xform1 != NULL && *xform2 == NULL) + HGOTO_DONE(1); - if(*xform1) { + if (*xform1) { HDassert(*xform2); /* Get the transform expressions */ @@ -866,20 +881,21 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU pexp2 = H5Z_xform_extract_xform_str(*xform2); /* Check for property expressions */ - if(pexp1 == NULL && pexp2 != NULL) HGOTO_DONE(-1); - if(pexp1 != NULL && pexp2 == NULL) HGOTO_DONE(1); + if (pexp1 == NULL && pexp2 != NULL) + HGOTO_DONE(-1); + if (pexp1 != NULL && pexp2 == NULL) + HGOTO_DONE(1); - if(pexp1) { + if (pexp1) { HDassert(pexp2); ret_value = HDstrcmp(pexp1, pexp2); } /* end if */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_copy() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_close * @@ -896,20 +912,19 @@ done: static herr_t H5P__dxfr_xform_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC HDassert(value); - if(H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) + if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_close() */ - /*------------------------------------------------------------------------- * Function: H5Pset_data_transform * @@ -925,46 +940,45 @@ done: herr_t H5Pset_data_transform(hid_t plist_id, const char *expression) { - H5P_genplist_t *plist; /* Property list pointer */ + H5P_genplist_t * plist; /* Property list pointer */ H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */ - herr_t ret_value = SUCCEED; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*s", plist_id, expression); /* Check arguments */ - if(expression == NULL) + if (expression == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "expression cannot be NULL") /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* See if a data transform is already set, and free it if it is */ - if(H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) + if (H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression") /* Destroy previous data transform property */ - if(H5Z_xform_destroy(data_xform_prop) < 0) + if (H5Z_xform_destroy(data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release data transform expression") /* Create data transform info from expression */ - if(NULL == (data_xform_prop = H5Z_xform_create(expression))) + if (NULL == (data_xform_prop = H5Z_xform_create(expression))) HGOTO_ERROR(H5E_PLINE, H5E_NOSPACE, FAIL, "unable to create data transform info") /* Update property list (takes ownership of transform) */ - if(H5P_poke(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) + if (H5P_poke(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Error setting data transform expression") done: - if(ret_value < 0) - if(data_xform_prop && H5Z_xform_destroy(data_xform_prop) < 0) + if (ret_value < 0) + if (data_xform_prop && H5Z_xform_destroy(data_xform_prop) < 0) HDONE_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "unable to release data transform expression") FUNC_LEAVE_API(ret_value) } /* end H5Pset_data_transform() */ - /*------------------------------------------------------------------------- * Function: H5Pget_data_transform * @@ -990,34 +1004,34 @@ done: ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size) { - H5P_genplist_t *plist; /* Property list pointer */ - H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */ - size_t len; - const char* pexp; - ssize_t ret_value; /* return value */ + H5P_genplist_t * plist; /* Property list pointer */ + H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */ + size_t len; + const char * pexp; + ssize_t ret_value; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("Zs", "ixz", plist_id, expression, size); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - if(H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) + if (H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression") - if(NULL == data_xform_prop) + if (NULL == data_xform_prop) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "data transform has not been set") /* Get the data transform string */ - if(NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") + if (NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") /* Copy into application buffer */ len = HDstrlen(pexp); - if(expression) { - HDstrncpy(expression, pexp, MIN(len + 1, size)); - if(len >= size) + if (expression) { + HDstrncpy(expression, pexp, MIN(len + 1, size)); + if (len >= size) expression[size - 1] = '\0'; } /* end if */ @@ -1027,7 +1041,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_data_transform() */ - /*------------------------------------------------------------------------- * Function: H5Pset_buffer * @@ -1052,33 +1065,32 @@ done: herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value = SUCCEED; /* return value */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "iz*x*x", plist_id, size, tconv, bkg); /* Check arguments */ - if(size == 0) + if (size == 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size must not be zero") /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ - if(H5P_set(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) + if (H5P_set(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer buffer size") - if(H5P_set(plist, H5D_XFER_TCONV_BUF_NAME, &tconv) < 0) + if (H5P_set(plist, H5D_XFER_TCONV_BUF_NAME, &tconv) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer type conversion buffer") - if(H5P_set(plist, H5D_XFER_BKGR_BUF_NAME, &bkg) < 0) + if (H5P_set(plist, H5D_XFER_BKGR_BUF_NAME, &bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set background type conversion buffer") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_buffer() */ - /*------------------------------------------------------------------------- * Function: H5Pget_buffer * @@ -1094,29 +1106,29 @@ done: *------------------------------------------------------------------------- */ size_t -H5Pget_buffer(hid_t plist_id, void **tconv/*out*/, void **bkg/*out*/) +H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/) { - H5P_genplist_t *plist; /* Property list pointer */ - size_t size; /* Type conversion buffer size */ - size_t ret_value; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + size_t size; /* Type conversion buffer size */ + size_t ret_value; /* Return value */ FUNC_ENTER_API(0) H5TRACE3("z", "ixx", plist_id, tconv, bkg); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, 0, "can't find object for ID") /* Return values */ - if(tconv) - if(H5P_get(plist, H5D_XFER_TCONV_BUF_NAME, tconv) < 0) + if (tconv) + if (H5P_get(plist, H5D_XFER_TCONV_BUF_NAME, tconv) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get transfer type conversion buffer") - if(bkg) - if(H5P_get(plist, H5D_XFER_BKGR_BUF_NAME, bkg) < 0) + if (bkg) + if (H5P_get(plist, H5D_XFER_BKGR_BUF_NAME, bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get background type conversion buffer") /* Get the size */ - if(H5P_get(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) + if (H5P_get(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, 0, "Can't set transfer buffer size") /* Set the return value */ @@ -1126,7 +1138,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_buffer() */ - /*------------------------------------------------------------------------- * Function: H5Pset_preserve * @@ -1146,27 +1157,26 @@ done: herr_t H5Pset_preserve(hid_t plist_id, hbool_t status) { - H5P_genplist_t *plist; /* Property list pointer */ - H5T_bkg_t need_bkg; /* Value for background buffer type */ - herr_t ret_value = SUCCEED; /* return value */ + H5P_genplist_t *plist; /* Property list pointer */ + H5T_bkg_t need_bkg; /* Value for background buffer type */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "ib", plist_id, status); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ need_bkg = status ? H5T_BKG_YES : H5T_BKG_NO; - if(H5P_set(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) + if (H5P_set(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_preserve() */ - /*------------------------------------------------------------------------- * Function: H5Pget_preserve * @@ -1184,19 +1194,19 @@ done: int H5Pget_preserve(hid_t plist_id) { - H5T_bkg_t need_bkg; /* Background value */ - H5P_genplist_t *plist; /* Property list pointer */ - int ret_value; /* return value */ + H5T_bkg_t need_bkg; /* Background value */ + H5P_genplist_t *plist; /* Property list pointer */ + int ret_value; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE1("Is", "i", plist_id); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get value */ - if(H5P_get(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) + if (H5P_get(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") /* Set return value */ @@ -1206,7 +1216,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_preserve() */ - /*------------------------------------------------------------------------- * Function: H5Pset_edc_check * @@ -1225,29 +1234,28 @@ done: herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value = SUCCEED; /* return value */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "iZe", plist_id, check); /* Check argument */ - if(check != H5Z_ENABLE_EDC && check != H5Z_DISABLE_EDC) + if (check != H5Z_ENABLE_EDC && check != H5Z_DISABLE_EDC) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid value") /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ - if(H5P_set(plist, H5D_XFER_EDC_NAME, &check) < 0) + if (H5P_set(plist, H5D_XFER_EDC_NAME, &check) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_edc_check() */ - /*------------------------------------------------------------------------- * Function: H5Pget_edc_check * @@ -1266,25 +1274,24 @@ done: H5Z_EDC_t H5Pget_edc_check(hid_t plist_id) { - H5P_genplist_t *plist; /* Property list pointer */ - H5Z_EDC_t ret_value; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + H5Z_EDC_t ret_value; /* Return value */ FUNC_ENTER_API(H5Z_ERROR_EDC) H5TRACE1("Ze", "i", plist_id); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5Z_ERROR_EDC, "can't find object for ID") /* Update property list */ - if(H5P_get(plist, H5D_XFER_EDC_NAME, &ret_value) < 0) + if (H5P_get(plist, H5D_XFER_EDC_NAME, &ret_value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5Z_ERROR_EDC, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_edc_check() */ - /*------------------------------------------------------------------------- * Function: H5Pset_filter_callback * @@ -1302,29 +1309,28 @@ done: herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value=SUCCEED; /* return value */ - H5Z_cb_t cb_struct; + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ + H5Z_cb_t cb_struct; FUNC_ENTER_API(FAIL) H5TRACE3("e", "ix*x", plist_id, func, op_data); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ - cb_struct.func = func; + cb_struct.func = func; cb_struct.op_data = op_data; - if (H5P_set(plist,H5D_XFER_FILTER_CB_NAME,&cb_struct)<0) + if (H5P_set(plist, H5D_XFER_FILTER_CB_NAME, &cb_struct) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } - /*------------------------------------------------------------------------- * Function: H5Pset_type_conv_cb * @@ -1342,29 +1348,28 @@ done: herr_t H5Pset_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t op, void *operate_data) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value=SUCCEED; /* return value */ - H5T_conv_cb_t cb_struct; + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ + H5T_conv_cb_t cb_struct; FUNC_ENTER_API(FAIL) H5TRACE3("e", "ix*x", plist_id, op, operate_data); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ - cb_struct.func = op; + cb_struct.func = op; cb_struct.user_data = operate_data; - if (H5P_set(plist,H5D_XFER_CONV_CB_NAME,&cb_struct)<0) + if (H5P_set(plist, H5D_XFER_CONV_CB_NAME, &cb_struct) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } - /*------------------------------------------------------------------------- * Function: H5Pget_type_conv_cb * @@ -1382,30 +1387,29 @@ done: herr_t H5Pget_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t *op, void **operate_data) { - H5P_genplist_t *plist; /* Property list pointer */ - H5T_conv_cb_t cb_struct; - herr_t ret_value=SUCCEED; /* return value */ + H5P_genplist_t *plist; /* Property list pointer */ + H5T_conv_cb_t cb_struct; + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "i*x**x", plist_id, op, operate_data); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get property */ - if (H5P_get(plist,H5D_XFER_CONV_CB_NAME,&cb_struct)<0) + if (H5P_get(plist, H5D_XFER_CONV_CB_NAME, &cb_struct) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") /* Assign return value */ - *op = cb_struct.func; + *op = cb_struct.func; *operate_data = cb_struct.user_data; done: FUNC_LEAVE_API(ret_value) } - /*------------------------------------------------------------------------- * Function: H5Pget_btree_ratios * @@ -1422,37 +1426,35 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/, double *middle/*out*/, - double *right/*out*/) +H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/, double *right /*out*/) { - H5P_genplist_t *plist; /* Property list pointer */ - double btree_split_ratio[3]; /* B-tree node split ratios */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + double btree_split_ratio[3]; /* B-tree node split ratios */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "ixxx", plist_id, left, middle, right); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get the split ratios */ - if(H5P_get(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &btree_split_ratio) < 0) + if (H5P_get(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &btree_split_ratio) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") /* Get values */ - if(left) + if (left) *left = btree_split_ratio[0]; - if(middle) + if (middle) *middle = btree_split_ratio[1]; - if(right) + if (right) *right = btree_split_ratio[2]; done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_btree_ratios() */ - /*------------------------------------------------------------------------- * Function: H5Pset_btree_ratios * @@ -1474,24 +1476,22 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pset_btree_ratios(hid_t plist_id, double left, double middle, - double right) +H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right) { - H5P_genplist_t *plist; /* Property list pointer */ - double split_ratio[3]; /* B-tree node split ratios */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + double split_ratio[3]; /* B-tree node split ratios */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "iddd", plist_id, left, middle, right); /* Check arguments */ - if(left < (double)0.0f || left > (double)1.0f - || middle < (double)0.0f || middle > (double)1.0f - || right < (double)0.0f || right > (double)1.0f) + if (left < (double)0.0f || left > (double)1.0f || middle < (double)0.0f || middle > (double)1.0f || + right < (double)0.0f || right > (double)1.0f) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0<=X<=1.0") /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ @@ -1500,14 +1500,13 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, split_ratio[2] = right; /* Set the split ratios */ - if(H5P_set(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &split_ratio) < 0) + if (H5P_set(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &split_ratio) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_btree_ratios() */ - /*------------------------------------------------------------------------- * Function: H5P_set_vlen_mem_manager * @@ -1528,30 +1527,29 @@ done: *------------------------------------------------------------------------- */ herr_t -H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, - void *alloc_info, H5MM_free_t free_func, void *free_info) +H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void *alloc_info, + H5MM_free_t free_func, void *free_info) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(plist); /* Update property list */ - if(H5P_set(plist, H5D_XFER_VLEN_ALLOC_NAME, &alloc_func) < 0) + if (H5P_set(plist, H5D_XFER_VLEN_ALLOC_NAME, &alloc_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") - if(H5P_set(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, &alloc_info) < 0) + if (H5P_set(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, &alloc_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") - if(H5P_set(plist, H5D_XFER_VLEN_FREE_NAME, &free_func) < 0) + if (H5P_set(plist, H5D_XFER_VLEN_FREE_NAME, &free_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") - if(H5P_set(plist, H5D_XFER_VLEN_FREE_INFO_NAME, &free_info) < 0) + if (H5P_set(plist, H5D_XFER_VLEN_FREE_INFO_NAME, &free_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_set_vlen_mem_manager() */ - /*------------------------------------------------------------------------- * Function: H5Pset_vlen_mem_manager * @@ -1572,29 +1570,27 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, - void *alloc_info, H5MM_free_t free_func, void *free_info) +H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, + void *free_info) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE5("e", "ix*xx*x", plist_id, alloc_func, alloc_info, free_func, - free_info); + H5TRACE5("e", "ix*xx*x", plist_id, alloc_func, alloc_info, free_func, free_info); /* Check arguments */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list") /* Update property list */ - if(H5P_set_vlen_mem_manager(plist, alloc_func, alloc_info, free_func, free_info) < 0) + if (H5P_set_vlen_mem_manager(plist, alloc_func, alloc_info, free_func, free_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set values") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_vlen_mem_manager() */ - /*------------------------------------------------------------------------- * Function: H5Pget_vlen_mem_manager * @@ -1608,37 +1604,36 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func/*out*/, - void **alloc_info/*out*/, H5MM_free_t *free_func/*out*/, void **free_info/*out*/) +H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func /*out*/, void **alloc_info /*out*/, + H5MM_free_t *free_func /*out*/, void **free_info /*out*/) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE5("e", "ixxxx", plist_id, alloc_func, alloc_info, free_func, free_info); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - if(alloc_func) - if(H5P_get(plist, H5D_XFER_VLEN_ALLOC_NAME, alloc_func) < 0) + if (alloc_func) + if (H5P_get(plist, H5D_XFER_VLEN_ALLOC_NAME, alloc_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") - if(alloc_info) - if(H5P_get(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, alloc_info) < 0) + if (alloc_info) + if (H5P_get(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, alloc_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") - if(free_func) - if(H5P_get(plist, H5D_XFER_VLEN_FREE_NAME, free_func) < 0) + if (free_func) + if (H5P_get(plist, H5D_XFER_VLEN_FREE_NAME, free_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") - if(free_info) - if(H5P_get(plist, H5D_XFER_VLEN_FREE_INFO_NAME, free_info) < 0) + if (free_info) + if (H5P_get(plist, H5D_XFER_VLEN_FREE_INFO_NAME, free_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_vlen_mem_manager() */ - /*------------------------------------------------------------------------- * Function: H5Pset_hyper_vector_size * @@ -1663,29 +1658,28 @@ done: herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "iz", plist_id, vector_size); /* Check arguments */ - if(vector_size < 1) + if (vector_size < 1) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "vector size too small") /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ - if(H5P_set(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &vector_size) < 0) + if (H5P_set(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &vector_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_hyper_vector_size() */ - /*------------------------------------------------------------------------- * Function: H5Pget_hyper_vector_size * @@ -1699,28 +1693,27 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size/*out*/) +H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size /*out*/) { - H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "ix", plist_id, vector_size); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ - if(vector_size) - if(H5P_get(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, vector_size) < 0) + if (vector_size) + if (H5P_get(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, vector_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_hyper_vector_size() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_io_xfer_mode_enc * @@ -1740,7 +1733,7 @@ static herr_t H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size) { const H5FD_mpio_xfer_t *xfer_mode = (const H5FD_mpio_xfer_t *)value; /* Create local alias for values */ - uint8_t **pp = (uint8_t **)_pp; + uint8_t ** pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -1748,7 +1741,7 @@ H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size) HDassert(xfer_mode); HDassert(size); - if(NULL != *pp) + if (NULL != *pp) /* Encode I/O transfer mode */ *(*pp)++ = (uint8_t)*xfer_mode; @@ -1758,7 +1751,6 @@ H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_io_xfer_mode_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_io_xfer_mode_dec * @@ -1777,8 +1769,8 @@ H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size) static herr_t H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value) { - H5FD_mpio_xfer_t *xfer_mode = (H5FD_mpio_xfer_t *)_value; /* I/O transfer mode */ - const uint8_t **pp = (const uint8_t **)_pp; + H5FD_mpio_xfer_t *xfer_mode = (H5FD_mpio_xfer_t *)_value; /* I/O transfer mode */ + const uint8_t ** pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -1788,12 +1780,11 @@ H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value) HDassert(xfer_mode); /* Decode I/O transfer mode */ - *xfer_mode = (H5FD_mpio_xfer_t)*(*pp)++; + *xfer_mode = (H5FD_mpio_xfer_t) * (*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_io_xfer_mode_dec() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_collective_opt_enc * @@ -1812,7 +1803,8 @@ H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value) static herr_t H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size) { - const H5FD_mpio_collective_opt_t *coll_opt = (const H5FD_mpio_collective_opt_t *)value; /* Create local alias for values */ + const H5FD_mpio_collective_opt_t *coll_opt = + (const H5FD_mpio_collective_opt_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -1821,7 +1813,7 @@ H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size) HDassert(coll_opt); HDassert(size); - if(NULL != *pp) + if (NULL != *pp) /* Encode MPI-I/O collective optimization property */ *(*pp)++ = (uint8_t)*coll_opt; @@ -1831,7 +1823,6 @@ H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_collective_opt_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_collective_opt_dec * @@ -1850,7 +1841,8 @@ H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size) static herr_t H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value) { - H5FD_mpio_collective_opt_t *coll_opt = (H5FD_mpio_collective_opt_t *)_value; /* MPI-I/O collective optimization mode */ + H5FD_mpio_collective_opt_t *coll_opt = + (H5FD_mpio_collective_opt_t *)_value; /* MPI-I/O collective optimization mode */ const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -1861,12 +1853,11 @@ H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value) HDassert(coll_opt); /* Decode MPI-I/O collective optimization mode */ - *coll_opt = (H5FD_mpio_collective_opt_t)*(*pp)++; + *coll_opt = (H5FD_mpio_collective_opt_t) * (*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_collective_opt_dec() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_chunk_opt_hard_enc * @@ -1885,7 +1876,8 @@ H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value) static herr_t H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size) { - const H5FD_mpio_chunk_opt_t *chunk_opt = (const H5FD_mpio_chunk_opt_t *)value; /* Create local alias for values */ + const H5FD_mpio_chunk_opt_t *chunk_opt = + (const H5FD_mpio_chunk_opt_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -1894,7 +1886,7 @@ H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size) HDassert(chunk_opt); HDassert(size); - if(NULL != *pp) + if (NULL != *pp) /* Encode MPI-I/O chunk optimization property */ *(*pp)++ = (uint8_t)*chunk_opt; @@ -1904,7 +1896,6 @@ H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_chunk_opt_hard_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_chunk_opt_hard_enc * @@ -1923,8 +1914,8 @@ H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size) static herr_t H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value) { - H5FD_mpio_chunk_opt_t *chunk_opt = (H5FD_mpio_chunk_opt_t *)_value; /* MPI-I/O chunk optimization mode */ - const uint8_t **pp = (const uint8_t **)_pp; + H5FD_mpio_chunk_opt_t *chunk_opt = (H5FD_mpio_chunk_opt_t *)_value; /* MPI-I/O chunk optimization mode */ + const uint8_t ** pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -1934,13 +1925,13 @@ H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value) HDassert(chunk_opt); /* Decode MPI-I/O chunk optimization mode */ - *chunk_opt = (H5FD_mpio_chunk_opt_t)*(*pp)++; + *chunk_opt = (H5FD_mpio_chunk_opt_t) * (*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_chunk_opt_hard_dec() */ #ifdef H5_HAVE_PARALLEL - + /*------------------------------------------------------------------------- * Function: H5Pget_mpio_actual_chunk_opt_mode * @@ -1956,26 +1947,25 @@ H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value) herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode) { - H5P_genplist_t *plist; - herr_t ret_value = SUCCEED; /* return value */ + H5P_genplist_t *plist; + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*Do", plist_id, actual_chunk_opt_mode); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ - if(actual_chunk_opt_mode) - if(H5P_get(plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, actual_chunk_opt_mode) < 0) + if (actual_chunk_opt_mode) + if (H5P_get(plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, actual_chunk_opt_mode) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mpio_actual_chunk_opt_mode() */ - /*------------------------------------------------------------------------- * Function: H5Pget_mpio_actual_io_mode * @@ -1992,26 +1982,25 @@ done: herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode) { - H5P_genplist_t *plist; - herr_t ret_value = SUCCEED; /* return value */ + H5P_genplist_t *plist; + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*Di", plist_id, actual_io_mode); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ - if(actual_io_mode) - if(H5P_get(plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, actual_io_mode) < 0) + if (actual_io_mode) + if (H5P_get(plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, actual_io_mode) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mpio_actual_io_mode() */ - /*------------------------------------------------------------------------- * Function: H5Pget_mpio_no_collective_cause * @@ -2024,25 +2013,25 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause) +H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, + uint32_t *global_no_collective_cause) { - H5P_genplist_t *plist; - herr_t ret_value = SUCCEED; /* return value */ + H5P_genplist_t *plist; + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("e", "i*Iu*Iu", plist_id, local_no_collective_cause, - global_no_collective_cause); + H5TRACE3("e", "i*Iu*Iu", plist_id, local_no_collective_cause, global_no_collective_cause); /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ - if(local_no_collective_cause) - if(H5P_get(plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, local_no_collective_cause) < 0) + if (local_no_collective_cause) + if (H5P_get(plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, local_no_collective_cause) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get local value") - if(global_no_collective_cause) - if(H5P_get(plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, global_no_collective_cause) < 0) + if (global_no_collective_cause) + if (H5P_get(plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, global_no_collective_cause) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get global value") done: @@ -2050,7 +2039,6 @@ done: } /* end H5Pget_mpio_no_collective_cause() */ #endif /* H5_HAVE_PARALLEL */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_edc_enc * @@ -2070,7 +2058,7 @@ static herr_t H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size) { const H5Z_EDC_t *check = (const H5Z_EDC_t *)value; /* Create local alias for values */ - uint8_t **pp = (uint8_t **)_pp; + uint8_t ** pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -2078,7 +2066,7 @@ H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size) HDassert(check); HDassert(size); - if(NULL != *pp) + if (NULL != *pp) /* Encode EDC property */ *(*pp)++ = (uint8_t)*check; @@ -2088,7 +2076,6 @@ H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_edc_enc() */ - /*------------------------------------------------------------------------- * Function: H5P__dxfr_edc_dec * @@ -2107,8 +2094,8 @@ H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size) static herr_t H5P__dxfr_edc_dec(const void **_pp, void *_value) { - H5Z_EDC_t *check = (H5Z_EDC_t *)_value; /* EDC property */ - const uint8_t **pp = (const uint8_t **)_pp; + H5Z_EDC_t * check = (H5Z_EDC_t *)_value; /* EDC property */ + const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -2118,8 +2105,7 @@ H5P__dxfr_edc_dec(const void **_pp, void *_value) HDassert(check); /* Decode EDC property */ - *check = (H5Z_EDC_t)*(*pp)++; + *check = (H5Z_EDC_t) * (*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_edc_dec() */ - |