HDF5  1.12.0
H5Dprivate.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * This file contains private information about the H5D module
16  */
17 #ifndef _H5Dprivate_H
18 #define _H5Dprivate_H
19 
20 /* Include package's public header */
21 #include "H5Dpublic.h"
22 
23 /* Private headers needed by this file */
24 #include "H5FDprivate.h" /* File drivers */
25 #include "H5Oprivate.h" /* Object headers */
26 #include "H5Sprivate.h" /* Dataspaces */
27 #include "H5Zprivate.h" /* Data filters */
28 
29 
30 /**************************/
31 /* Library Private Macros */
32 /**************************/
33 
34 /*
35  * Feature: Define H5D_DEBUG on the compiler command line if you want to
36  * debug dataset I/O. NDEBUG must not be defined in order for this
37  * to have any effect.
38  */
39 #ifdef NDEBUG
40 # undef H5D_DEBUG
41 #endif
42 
43 /* ======== Dataset creation property names ======== */
44 #define H5D_CRT_LAYOUT_NAME "layout" /* Storage layout */
45 #define H5D_CRT_FILL_VALUE_NAME "fill_value" /* Fill value */
46 #define H5D_CRT_ALLOC_TIME_STATE_NAME "alloc_time_state" /* Space allocation time state */
47 #define H5D_CRT_EXT_FILE_LIST_NAME "efl" /* External file list */
48 #define H5D_CRT_MIN_DSET_HDR_SIZE_NAME "dset_oh_minimize"/* Minimize object header */
49 
50 /* ======== Dataset access property names ======== */
51 #define H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */
52 #define H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */
53 #define H5D_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */
54 #define H5D_ACS_VDS_VIEW_NAME "vds_view" /* VDS view option */
55 #define H5D_ACS_VDS_PRINTF_GAP_NAME "vds_printf_gap" /* VDS printf gap size */
56 #define H5D_ACS_VDS_PREFIX_NAME "vds_prefix" /* VDS file prefix */
57 #define H5D_ACS_APPEND_FLUSH_NAME "append_flush" /* Append flush actions */
58 #define H5D_ACS_EFILE_PREFIX_NAME "external file prefix" /* External file prefix */
59 
60 /* ======== Data transfer properties ======== */
61 #define H5D_XFER_MAX_TEMP_BUF_NAME "max_temp_buf" /* Maximum temp buffer size */
62 #define H5D_XFER_TCONV_BUF_NAME "tconv_buf" /* Type conversion buffer */
63 #define H5D_XFER_BKGR_BUF_NAME "bkgr_buf" /* Background buffer */
64 #define H5D_XFER_BKGR_BUF_TYPE_NAME "bkgr_buf_type" /* Background buffer type */
65 #define H5D_XFER_BTREE_SPLIT_RATIO_NAME "btree_split_ratio" /* B-tree node splitting ratio */
66 #define H5D_XFER_VLEN_ALLOC_NAME "vlen_alloc" /* Vlen allocation function */
67 #define H5D_XFER_VLEN_ALLOC_INFO_NAME "vlen_alloc_info" /* Vlen allocation info */
68 #define H5D_XFER_VLEN_FREE_NAME "vlen_free" /* Vlen free function */
69 #define H5D_XFER_VLEN_FREE_INFO_NAME "vlen_free_info" /* Vlen free info */
70 #define H5D_XFER_VFL_ID_NAME "vfl_id" /* File driver ID */
71 #define H5D_XFER_VFL_INFO_NAME "vfl_info" /* File driver info */
72 #define H5D_XFER_HYPER_VECTOR_SIZE_NAME "vec_size" /* Hyperslab vector size */
73 #define H5D_XFER_IO_XFER_MODE_NAME "io_xfer_mode" /* I/O transfer mode */
74 #define H5D_XFER_MPIO_COLLECTIVE_OPT_NAME "mpio_collective_opt" /* Optimization of MPI-IO transfer mode */
75 #define H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME "mpio_chunk_opt_hard"
76 #define H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME "mpio_chunk_opt_num"
77 #define H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME "mpio_chunk_opt_ratio"
78 #define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME "actual_chunk_opt_mode"
79 #define H5D_MPIO_ACTUAL_IO_MODE_NAME "actual_io_mode"
80 #define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME "local_no_collective_cause" /* cause of broken collective I/O in each process */
81 #define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME "global_no_collective_cause" /* cause of broken collective I/O in all processes */
82 #define H5D_XFER_EDC_NAME "err_detect" /* EDC */
83 #define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
84 #define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
85 #define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
86 #ifdef H5_HAVE_INSTRUMENTED_LIBRARY
87 /* Collective chunk instrumentation properties */
88 #define H5D_XFER_COLL_CHUNK_LINK_HARD_NAME "coll_chunk_link_hard"
89 #define H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME "coll_chunk_multi_hard"
90 #define H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME "coll_chunk_link_true"
91 #define H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME "coll_chunk_link_false"
92 #define H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME "coll_chunk_multi_coll"
93 #define H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME "coll_chunk_multi_ind"
94 
95 /* Definitions for all collective chunk instrumentation properties */
96 #define H5D_XFER_COLL_CHUNK_SIZE sizeof(unsigned)
97 #define H5D_XFER_COLL_CHUNK_DEF 1
98 
99 /* General collective I/O instrumentation properties */
100 #define H5D_XFER_COLL_RANK0_BCAST_NAME "coll_rank0_bcast"
101 
102 /* Definitions for general collective I/O instrumentation properties */
103 #define H5D_XFER_COLL_RANK0_BCAST_SIZE sizeof(hbool_t)
104 #define H5D_XFER_COLL_RANK0_BCAST_DEF FALSE
105 #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
106 
107 /* Default temporary buffer size */
108 #define H5D_TEMP_BUF_SIZE (1024 * 1024)
109 
110 /* Default I/O vector size */
111 #define H5D_IO_VECTOR_SIZE 1024
112 
113 /* Default VL allocation & free info */
114 #define H5D_VLEN_ALLOC NULL
115 #define H5D_VLEN_ALLOC_INFO NULL
116 #define H5D_VLEN_FREE NULL
117 #define H5D_VLEN_FREE_INFO NULL
118 
119 /* Default virtual dataset list size */
120 #define H5D_VIRTUAL_DEF_LIST_SIZE 8
121 
122 
123 /****************************/
124 /* Library Private Typedefs */
125 /****************************/
126 
127 /* Typedef for dataset in memory (defined in H5Dpkg.h) */
128 typedef struct H5D_t H5D_t;
129 
130 /* Typedef for cached dataset creation property list information */
131 typedef struct H5D_dcpl_cache_t {
132  H5O_fill_t fill; /* Fill value info (H5D_CRT_FILL_VALUE_NAME) */
133  H5O_pline_t pline; /* I/O pipeline info (H5O_CRT_PIPELINE_NAME) */
134  H5O_efl_t efl; /* External file list info (H5D_CRT_EXT_FILE_LIST_NAME) */
136 
137 /* Callback information for copying datasets */
138 typedef struct H5D_copy_file_ud_t {
139  H5O_copy_file_ud_common_t common; /* Shared information (must be first) */
140  struct H5S_extent_t *src_space_extent; /* Copy of dataspace extent for dataset */
141  H5T_t *src_dtype; /* Copy of datatype for dataset */
143 
144 /* Structure for dataset append flush property (H5Pset_append_flush) */
145 typedef struct H5D_append_flush_t {
146  unsigned ndims; /* The # of dimensions for "boundary" */
147  hsize_t boundary[H5S_MAX_RANK]; /* The dimension sizes for determining boundary */
148  H5D_append_cb_t func; /* The callback function */
149  void *udata; /* User data */
151 
152 
153 /*****************************/
154 /* Library Private Variables */
155 /*****************************/
156 
157 
158 /******************************/
159 /* Library Private Prototypes */
160 /******************************/
161 
162 H5_DLL herr_t H5D_init(void);
163 H5_DLL H5D_t *H5D_open(const H5G_loc_t *loc, hid_t dapl_id);
164 H5_DLL herr_t H5D_close(H5D_t *dataset);
167 H5_DLL H5O_loc_t *H5D_oloc(H5D_t *dataset);
168 H5_DLL H5G_name_t *H5D_nameof(const H5D_t *dataset);
172 
173 /* Functions that operate on chunked storage */
175 
176 /* Functions that operate on virtual storage */
178  const H5S_t *src_space, H5O_virtual_space_status_t space_status);
180  const H5O_storage_virtual_ent_t *ent);
183 H5_DLL herr_t H5D_virtual_parse_source_name(const char *source_name,
184  H5O_storage_virtual_name_seg_t **parsed_name, size_t *static_strlen,
185  size_t *nsubs);
187 
188 /* Functions that operate on indexed storage */
189 H5_DLL herr_t H5D_btree_debug(H5F_t *f, haddr_t addr, FILE * stream,
190  int indent, int fwidth, unsigned ndims, const uint32_t *dim);
191 
192 #endif /* _H5Dprivate_H */
193 
H5O_efl_t
Definition: H5Oprivate.h:381
H5D_append_flush_t
struct H5D_append_flush_t H5D_append_flush_t
H5D_virtual_check_min_dims
H5_DLL herr_t H5D_virtual_check_min_dims(const H5D_t *dset)
Definition: H5Dvirtual.c:371
H5O_loc_t
Definition: H5Oprivate.h:152
H5D_t
Definition: H5Dpkg.h:472
f
hdr f
Definition: H5EA.c:755
H5S_extent_t
Definition: H5Spkg.h:109
H5D_nameof
H5_DLL H5G_name_t * H5D_nameof(const H5D_t *dataset)
Definition: H5Dint.c:2248
H5D_init
H5_DLL herr_t H5D_init(void)
Definition: H5Dint.c:169
H5S_MAX_RANK
#define H5S_MAX_RANK
Definition: H5Spublic.h:29
H5D_dcpl_cache_t
Definition: H5Dprivate.h:131
H5D_get_access_plist
H5_DLL hid_t H5D_get_access_plist(const H5D_t *dset)
Definition: H5Dint.c:3735
H5D_virtual_update_min_dims
H5_DLL herr_t H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx)
Definition: H5Dvirtual.c:314
H5D_mult_refresh_reopen
H5_DLL herr_t H5D_mult_refresh_reopen(H5D_t *dataset)
Definition: H5Dint.c:2182
H5Sprivate.h
uint32_t
uint32_t
Definition: H5overflow.txt:38
H5D_copy_file_ud_t::common
H5O_copy_file_ud_common_t common
Definition: H5Dprivate.h:139
H5D_append_flush_t
Definition: H5Dprivate.h:145
H5D_copy_file_ud_t::src_space_extent
struct H5S_extent_t * src_space_extent
Definition: H5Dprivate.h:140
H5O_storage_virtual_name_seg_t
Definition: H5Oprivate.h:514
haddr_t
CATCH haddr_t
Definition: H5EAdblock.c:162
indent
*s *s indent
Definition: H5HLdbg.c:111
H5D_append_flush_t::udata
void * udata
Definition: H5Dprivate.h:149
H5O_pline_t
Definition: H5Oprivate.h:701
H5D_get_create_plist
H5_DLL hid_t H5D_get_create_plist(const H5D_t *dset)
Definition: H5Dint.c:3559
H5G_loc_t
Definition: H5Gprivate.h:144
H5D_copy_file_ud_t::src_dtype
H5T_t * src_dtype
Definition: H5Dprivate.h:141
H5D_virtual_check_mapping_pre
H5_DLL herr_t H5D_virtual_check_mapping_pre(const H5S_t *vspace, const H5S_t *src_space, H5O_virtual_space_status_t space_status)
Definition: H5Dvirtual.c:175
H5D_mult_refresh_close
H5_DLL herr_t H5D_mult_refresh_close(hid_t dset_id)
Definition: H5Dint.c:2102
H5D_copy_file_ud_t
struct H5D_copy_file_ud_t H5D_copy_file_ud_t
H5D_open
H5_DLL H5D_t * H5D_open(const H5G_loc_t *loc, hid_t dapl_id)
Definition: H5Dint.c:1519
H5D_oloc
H5_DLL H5O_loc_t * H5D_oloc(H5D_t *dataset)
Definition: H5Dint.c:2229
H5D_append_flush_t::ndims
unsigned ndims
Definition: H5Dprivate.h:146
H5D_dcpl_cache_t::fill
H5O_fill_t fill
Definition: H5Dprivate.h:132
hid_t
int64_t hid_t
Definition: H5Ipublic.h:55
H5O_copy_file_ud_common_t
Definition: H5private.h:621
H5D_dcpl_cache_t
struct H5D_dcpl_cache_t H5D_dcpl_cache_t
H5T_t
Definition: H5Tpkg.h:350
H5D_virtual_check_mapping_post
H5_DLL herr_t H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent)
Definition: H5Dvirtual.c:244
FILE
Invalid arguments to routine Resource unavailable Internal File accessibility Low level I O Function entry exit Object atom Object cache Links B Tree node Symbol table Heap Object header Datatype Dataspace Dataset Data storage Property lists Attribute Data filters External file list References Virtual File Layer Virtual Object Layer Ternary Search Trees Reference Counted Strings Error API Skip Lists Free Space Manager Shared Object Header Messages Extensible Array Fixed Array Plugin for dynamically loaded library Page Buffering API Context Map No error Argument errors Resource errors File accessibility errors FILE
Definition: H5err.txt:88
H5Oprivate.h
H5S_t
Definition: H5Spkg.h:317
H5D_append_flush_t::func
H5D_append_cb_t func
Definition: H5Dprivate.h:148
fwidth
*s *s fwidth
Definition: H5HLdbg.c:111
H5D_virtual_parse_source_name
H5_DLL herr_t H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_seg_t **parsed_name, size_t *static_strlen, size_t *nsubs)
Definition: H5Dvirtual.c:1149
H5D_flush_all
H5_DLL herr_t H5D_flush_all(H5F_t *f)
Definition: H5Dint.c:3529
H5G_name_t
Definition: H5Gprivate.h:130
H5D_copy_file_ud_t
Definition: H5Dprivate.h:138
H5FDprivate.h
H5D_dcpl_cache_t::efl
H5O_efl_t efl
Definition: H5Dprivate.h:134
H5O_storage_chunk_t
Definition: H5Oprivate.h:479
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5D_append_flush_t::boundary
hsize_t boundary[H5S_MAX_RANK]
Definition: H5Dprivate.h:147
H5O_fill_t
Definition: H5Oprivate.h:325
H5Zprivate.h
H5O_storage_virtual_ent_t
Definition: H5Oprivate.h:526
H5Dpublic.h
H5D_dcpl_cache_t::pline
H5O_pline_t pline
Definition: H5Dprivate.h:133
H5F_t
Definition: H5Fpkg.h:374
H5D_close
H5_DLL herr_t H5D_close(H5D_t *dataset)
Definition: H5Dint.c:1898
H5O_virtual_space_status_t
H5O_virtual_space_status_t
Definition: H5Oprivate.h:519
herr_t
int herr_t
Definition: H5public.h:128
hbool_t
bool hbool_t
Definition: H5public.h:159
hsize_t
hsize_t
Definition: H5overflow.txt:44
H5D_virtual_free_parsed_name
H5_DLL herr_t H5D_virtual_free_parsed_name(H5O_storage_virtual_name_seg_t *name_seg)
Definition: H5Dvirtual.c:1322
H5O_layout_t
Definition: H5Oprivate.h:637
H5D_btree_debug
H5_DLL herr_t H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, unsigned ndims, const uint32_t *dim)
Definition: H5Dbtree.c:1479
H5D_append_cb_t
herr_t(* H5D_append_cb_t)(hid_t dataset_id, hsize_t *cur_dims, void *op_data)
Definition: H5Dpublic.h:105
H5D_chunk_idx_reset
H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
Definition: H5Dchunk.c:2958