HDF5  1.12.0
H5FAprivate.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  *
16  * Created: H5FAprivate.h
17  *
18  * Purpose: Private header for library accessible Fixed
19  * Array routines.
20  *
21  *-------------------------------------------------------------------------
22  */
23 
24 #ifndef _H5FAprivate_H
25 #define _H5FAprivate_H
26 
27 /* Include package's public header */
28 #ifdef NOT_YET
29 #include "H5FApublic.h"
30 #endif /* NOT_YET */
31 
32 /* Private headers needed by this file */
33 #include "H5ACprivate.h" /* Metadata cache */
34 #include "H5Fprivate.h" /* File access */
35 
36 
37 /**************************/
38 /* Library Private Macros */
39 /**************************/
40 
41 
42 /****************************/
43 /* Library Private Typedefs */
44 /****************************/
45 
46 /* Fixed Array class IDs */
47 typedef enum H5FA_cls_id_t {
48  H5FA_CLS_CHUNK_ID = 0, /* Fixed array is for indexing dataset chunks w/o filters */
49  H5FA_CLS_FILT_CHUNK_ID, /* Fixed array is for indexing dataset chunks w/filters */
50 
51  /* Start real class IDs at 0 -QAK */
52  /* (keep these last) */
53  H5FA_CLS_TEST_ID, /* Fixed array is for testing (do not use for actual data) */
54  H5FA_NUM_CLS_ID /* Number of Fixed Array class IDs (must be last) */
56 
57 /*
58  * Each type of element that can be stored in a Fixed Array has a
59  * variable of this type that contains class variables and methods.
60  */
61 typedef struct H5FA_class_t {
62  H5FA_cls_id_t id; /* ID of Fixed Array class, as found in file */
63  const char *name; /* Name of class (for debugging) */
64  size_t nat_elmt_size; /* Size of native (memory) element */
65 
66  /* Fixed array client callback methods */
67  void *(*crt_context)(void *udata); /* Create context for other callbacks */
68  herr_t (*dst_context)(void *ctx); /* Destroy context */
69  herr_t (*fill)(void *nat_blk, size_t nelmts); /* Fill array of elements with encoded form of "missing element" value */
70  herr_t (*encode)(void *raw, const void *elmt, size_t nelmts, void *ctx); /* Encode elements from native form to disk storage form */
71  herr_t (*decode)(const void *raw, void *elmt, size_t nelmts, void *ctx); /* Decode elements from disk storage form to native form */
72  herr_t (*debug)(FILE *stream, int indent, int fwidth, hsize_t idx, const void *elmt); /* Print an element for debugging */
73  void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */
74  herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
76 
77 /* Fixed array creation parameters */
78 typedef struct H5FA_create_t {
79  const H5FA_class_t *cls; /* Class of Fixed Array to create */
80  uint8_t raw_elmt_size; /* Element size in file (in bytes) */
81  uint8_t max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in a data block page) -
82  * i.e. # of bits needed to store max. # of elements
83  * in a data block page
84  */
85  hsize_t nelmts; /* # of elements in array */
87 
88 /* Fixed array metadata statistics info */
89 typedef struct H5FA_stat_t {
90  /* Non-stored (i.e. computed) fields */
91  hsize_t hdr_size; /* Size of header */
92  hsize_t dblk_size; /* Size of data block */
93 
94  /* Stored fields */
95  hsize_t nelmts; /* # of elements */
97 
98 /* Fixed Array info (forward decl - defined in H5FApkg.h) */
99 typedef struct H5FA_t H5FA_t;
100 
101 /* Define the operator callback function pointer for H5FA_iterate() */
102 typedef int (*H5FA_operator_t)(hsize_t idx, const void *_elmt, void *_udata);
103 
104 
105 /*****************************/
106 /* Library-private Variables */
107 /*****************************/
108 
109 /* The Fixed Array class for dataset chunks w/o filters*/
111 
112 /* The Fixed Array class for dataset chunks w/ filters*/
114 
115 
116 /***************************************/
117 /* Library-private Function Prototypes */
118 /***************************************/
119 
120 /* General routines */
122  void *ctx_udata);
123 H5_DLL H5FA_t *H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata);
126 H5_DLL herr_t H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt);
127 H5_DLL herr_t H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt);
131 H5_DLL herr_t H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata);
133 
134 /* Statistics routines */
136 
137 /* Debugging routines */
138 #ifdef H5FA_DEBUGGING
139 #endif /* H5FA_DEBUGGING */
140 
141 #endif /* _H5FAprivate_H */
142 
H5FA_create_t
Definition: H5FAprivate.h:78
f
hdr f
Definition: H5EA.c:755
H5FA_class_t::name
const char * name
Definition: H5FAprivate.h:63
H5FA_get_stats
H5_DLL herr_t H5FA_get_stats(const H5FA_t *ea, H5FA_stat_t *stats)
H5FA_get_nelmts
H5_DLL herr_t H5FA_get_nelmts(const H5FA_t *fa, hsize_t *nelmts)
H5FA_stat_t::nelmts
hsize_t nelmts
Definition: H5FAprivate.h:95
H5FA_create_t::nelmts
hsize_t nelmts
Definition: H5FAprivate.h:85
H5FA_NUM_CLS_ID
@ H5FA_NUM_CLS_ID
Definition: H5FAprivate.h:54
H5FA_patch_file
H5_DLL herr_t H5FA_patch_file(H5FA_t *fa, H5F_t *f)
haddr_t
CATCH haddr_t
Definition: H5EAdblock.c:162
indent
*s *s indent
Definition: H5HLdbg.c:111
H5FA_class_t::debug
herr_t(* debug)(FILE *stream, int indent, int fwidth, hsize_t idx, const void *elmt)
Definition: H5FAprivate.h:72
H5FA_open
H5_DLL H5FA_t * H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
H5FA_class_t::nat_elmt_size
size_t nat_elmt_size
Definition: H5FAprivate.h:64
H5_DLLVAR
#define H5_DLLVAR
Definition: H5api_adpt.h:235
ea
ea
Definition: H5EA.c:925
H5FA_get
H5_DLL herr_t H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
uint8_t
unsigned char uint8_t
Definition: H5private.h:429
H5AC_proxy_entry_t
Definition: H5ACprivate.h:203
H5FA_iterate
H5_DLL herr_t H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata)
H5FA_stat_t
Definition: H5FAprivate.h:89
H5FA_class_t::decode
herr_t(* decode)(const void *raw, void *elmt, size_t nelmts, void *ctx)
Definition: H5FAprivate.h:71
H5FA_stat_t
struct H5FA_stat_t H5FA_stat_t
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
H5ACprivate.h
H5FA_get_addr
H5_DLL herr_t H5FA_get_addr(const H5FA_t *fa, haddr_t *addr)
H5FA_CLS_CHUNK_ID
@ H5FA_CLS_CHUNK_ID
Definition: H5FAprivate.h:48
int
CATCH int
Definition: H5EA.c:1002
H5Fprivate.h
H5FA_stat_t::dblk_size
hsize_t dblk_size
Definition: H5FAprivate.h:92
H5FA_create
H5_DLL H5FA_t * H5FA_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
H5FA_class_t
Definition: H5FAprivate.h:61
H5FA_class_t::fill
herr_t(* fill)(void *nat_blk, size_t nelmts)
Definition: H5FAprivate.h:69
H5FA_class_t::id
H5FA_cls_id_t id
Definition: H5FAprivate.h:62
H5FA_class_t::dst_context
herr_t(* dst_context)(void *ctx)
Definition: H5FAprivate.h:68
H5FA_CLS_FILT_CHUNK_ID
@ H5FA_CLS_FILT_CHUNK_ID
Definition: H5FAprivate.h:49
fwidth
*s *s fwidth
Definition: H5HLdbg.c:111
H5FA_create_t
struct H5FA_create_t H5FA_create_t
H5FA_stat_t::hdr_size
hsize_t hdr_size
Definition: H5FAprivate.h:91
H5FA_set
H5_DLL herr_t H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
H5FA_class_t::encode
herr_t(* encode)(void *raw, const void *elmt, size_t nelmts, void *ctx)
Definition: H5FAprivate.h:70
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5FA_CLS_CHUNK
H5_DLLVAR const H5FA_class_t H5FA_CLS_CHUNK[1]
Definition: H5FAprivate.h:110
H5FA_create_t::max_dblk_page_nelmts_bits
uint8_t max_dblk_page_nelmts_bits
Definition: H5FAprivate.h:81
H5FA_delete
H5_DLL herr_t H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
H5F_t
Definition: H5Fpkg.h:374
H5FA_t
Definition: H5FApkg.h:217
nelmts
hdr stats stored nelmts
Definition: H5EAdblock.c:214
H5FA_operator_t
int(* H5FA_operator_t)(hsize_t idx, const void *_elmt, void *_udata)
Definition: H5FAprivate.h:102
H5FA_create_t::cls
const H5FA_class_t * cls
Definition: H5FAprivate.h:79
H5FA_class_t
struct H5FA_class_t H5FA_class_t
H5FA_class_t::dst_dbg_ctx
herr_t(* dst_dbg_ctx)(void *dbg_ctx)
Definition: H5FAprivate.h:74
herr_t
int herr_t
Definition: H5public.h:128
H5FA_cls_id_t
H5FA_cls_id_t
Definition: H5FAprivate.h:47
H5FA_CLS_TEST_ID
@ H5FA_CLS_TEST_ID
Definition: H5FAprivate.h:53
H5FA_CLS_FILT_CHUNK
H5_DLLVAR const H5FA_class_t H5FA_CLS_FILT_CHUNK[1]
Definition: H5FAprivate.h:113
hsize_t
hsize_t
Definition: H5overflow.txt:44
H5FA_depend
H5_DLL herr_t H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent)
H5FA_close
H5_DLL herr_t H5FA_close(H5FA_t *fa)
H5FA_create_t::raw_elmt_size
uint8_t raw_elmt_size
Definition: H5FAprivate.h:80