diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2021-10-29 22:10:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 22:10:31 (GMT) |
commit | 111c7ae9ac2efc29e8b399e6951253af9110b81a (patch) | |
tree | f69fa03253bdab97d7cf3615baff02cd936323f9 /src/H5PBprivate.h | |
parent | db30c2da68ece4a155e9e50c28ec16d6057509b2 (diff) | |
download | hdf5-111c7ae9ac2efc29e8b399e6951253af9110b81a.zip hdf5-111c7ae9ac2efc29e8b399e6951253af9110b81a.tar.gz hdf5-111c7ae9ac2efc29e8b399e6951253af9110b81a.tar.bz2 |
Merge hdf5 1 10 8 (#1154)hdf5-1_10_8
Merge HDF5 1.10.8 release files to 1.10/master
Diffstat (limited to 'src/H5PBprivate.h')
-rw-r--r-- | src/H5PBprivate.h | 67 |
1 files changed, 32 insertions, 35 deletions
diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h index 82d010d..e0197bf 100644 --- a/src/H5PBprivate.h +++ b/src/H5PBprivate.h @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -20,8 +20,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5PBprivate_H -#define _H5PBprivate_H +#ifndef H5PBprivate_H +#define H5PBprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -29,17 +29,15 @@ #endif /* NOT_YET */ /* Private headers needed by this header */ -#include "H5private.h" /* Generic Functions */ -#include "H5Fprivate.h" /* File access */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5SLprivate.h" /* Skip List */ - +#include "H5private.h" /* Generic Functions */ +#include "H5Fprivate.h" /* File access */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5SLprivate.h" /* Skip List */ /**************************/ /* Library Private Macros */ /**************************/ - /****************************/ /* Library Private Typedefs */ /****************************/ @@ -49,56 +47,55 @@ struct H5PB_entry_t; /* Typedef for the main structure for the page buffer */ typedef struct H5PB_t { - size_t max_size; /* The total page buffer size */ - size_t page_size; /* Size of a single page */ - unsigned min_meta_perc; /* Minimum ratio of metadata entries required before evicting meta entries */ - unsigned min_raw_perc; /* Minimum ratio of raw data entries required before evicting raw entries */ - unsigned meta_count; /* Number of entries for metadata */ - unsigned raw_count; /* Number of entries for raw data */ - unsigned min_meta_count; /* Minimum # of entries for metadata */ - unsigned min_raw_count; /* Minimum # of entries for raw data */ + size_t max_size; /* The total page buffer size */ + size_t page_size; /* Size of a single page */ + unsigned min_meta_perc; /* Minimum ratio of metadata entries required before evicting meta entries */ + unsigned min_raw_perc; /* Minimum ratio of raw data entries required before evicting raw entries */ + unsigned meta_count; /* Number of entries for metadata */ + unsigned raw_count; /* Number of entries for raw data */ + unsigned min_meta_count; /* Minimum # of entries for metadata */ + unsigned min_raw_count; /* Minimum # of entries for raw data */ - H5SL_t *slist_ptr; /* Skip list with all the active page entries */ - H5SL_t *mf_slist_ptr; /* Skip list containing newly allocated page entries inserted from the MF layer */ + H5SL_t *slist_ptr; /* Skip list with all the active page entries */ + H5SL_t *mf_slist_ptr; /* Skip list containing newly allocated page entries inserted from the MF layer */ - size_t LRU_list_len; /* Number of entries in the LRU (identical to slist_ptr count) */ - struct H5PB_entry_t *LRU_head_ptr; /* Head pointer of the LRU */ - struct H5PB_entry_t *LRU_tail_ptr; /* Tail pointer of the LRU */ + size_t LRU_list_len; /* Number of entries in the LRU (identical to slist_ptr count) */ + struct H5PB_entry_t *LRU_head_ptr; /* Head pointer of the LRU */ + struct H5PB_entry_t *LRU_tail_ptr; /* Tail pointer of the LRU */ - H5FL_fac_head_t *page_fac; /* Factory for allocating pages */ + H5FL_fac_head_t *page_fac; /* Factory for allocating pages */ /* Statistics */ - unsigned accesses[2]; - unsigned hits[2]; - unsigned misses[2]; - unsigned evictions[2]; - unsigned bypasses[2]; + unsigned accesses[2]; + unsigned hits[2]; + unsigned misses[2]; + unsigned evictions[2]; + unsigned bypasses[2]; } H5PB_t; /*****************************/ /* Library-private Variables */ /*****************************/ - /***************************************/ /* Library-private Function Prototypes */ /***************************************/ /* General routines */ -H5_DLL herr_t H5PB_create(H5F_shared_t *f_sh, size_t page_buffer_size, unsigned page_buf_min_meta_perc, unsigned page_buf_min_raw_perc); +H5_DLL herr_t H5PB_create(H5F_shared_t *f_sh, size_t page_buffer_size, unsigned page_buf_min_meta_perc, + unsigned page_buf_min_raw_perc); H5_DLL herr_t H5PB_flush(H5F_shared_t *f_sh); H5_DLL herr_t H5PB_dest(H5F_shared_t *f_sh); H5_DLL herr_t H5PB_add_new_page(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t page_addr); H5_DLL herr_t H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf); H5_DLL herr_t H5PB_remove_entry(const H5F_shared_t *f_sh, haddr_t addr); -H5_DLL herr_t H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/); +H5_DLL herr_t H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*out*/); H5_DLL herr_t H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf); /* Statistics routines */ H5_DLL herr_t H5PB_reset_stats(H5PB_t *page_buf); -H5_DLL herr_t H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], - unsigned hits[2], unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); +H5_DLL herr_t H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2], + unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); H5_DLL herr_t H5PB_print_stats(const H5PB_t *page_buf); -#endif /* !_H5PBprivate_H */ - +#endif /* H5PBprivate_H */ |