HDF5
1.12.0
hdf5-1.12.0
src
H5Bpkg.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
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
16
* Thursday, May 15, 2003
17
*
18
* Purpose: This file contains declarations which are visible only within
19
* the H5B package. Source files outside the H5B package should
20
* include H5Bprivate.h instead.
21
*/
22
#if !(defined H5B_FRIEND || defined H5B_MODULE)
23
#error "Do not include this file outside the H5B package!"
24
#endif
25
26
#ifndef _H5Bpkg_H
27
#define _H5Bpkg_H
28
29
/* Get package's private header */
30
#include "
H5Bprivate.h
"
31
32
/* Other private headers needed by this file */
33
#include "
H5ACprivate.h
"
/* Metadata cache */
34
#include "
H5FLprivate.h
"
/* Free Lists */
35
36
37
/**************************/
38
/* Package Private Macros */
39
/**************************/
40
41
/* Get the native key at a given index */
42
#define H5B_NKEY(b, shared, idx) ((b)->native + (shared)->nkey[(idx)])
43
#define LEVEL_BITS 8
/* # of bits for node level: 1 byte */
44
45
46
/****************************/
47
/* Package Private Typedefs */
48
/****************************/
49
50
/* The B-tree node as stored in memory... */
51
typedef
struct
H5B_t
{
52
H5AC_info_t
cache_info
;
/* Information for H5AC cache functions */
53
/* _must_ be first field in structure */
54
H5UC_t
*
rc_shared
;
/*ref-counted shared info */
55
unsigned
level
;
/*node level */
56
unsigned
nchildren
;
/*number of child pointers */
57
haddr_t
left
;
/*address of left sibling */
58
haddr_t
right
;
/*address of right sibling */
59
uint8_t
*
native
;
/*array of keys in native format */
60
haddr_t
*
child
;
/*2k child pointers */
61
}
H5B_t
;
62
63
/* Callback info for loading a B-tree node into the cache */
64
typedef
struct
H5B_cache_ud_t
{
65
H5F_t
*
f
;
/* File that B-tree node is within */
66
const
struct
H5B_class_t
*
type
;
/* Type of tree */
67
H5UC_t
*
rc_shared
;
/* Ref-counted shared info */
68
}
H5B_cache_ud_t
;
69
70
/*****************************/
71
/* Package Private Variables */
72
/*****************************/
73
74
/* Declare a free list to manage the haddr_t sequence information */
75
H5FL_SEQ_EXTERN
(
haddr_t
);
76
77
/* Declare a PQ free list to manage the native block information */
78
H5FL_BLK_EXTERN
(native_block);
79
80
/* Declare a free list to manage the H5B_t struct */
81
H5FL_EXTERN
(
H5B_t
);
82
83
84
/******************************/
85
/* Package Private Prototypes */
86
/******************************/
87
H5_DLL
herr_t
H5B__node_dest
(
H5B_t
*bt);
88
#ifdef H5B_DEBUG
89
herr_t
H5B__assert(
H5F_t
*
f
,
haddr_t
addr,
const
H5B_class_t
*type,
void
*udata);
90
#endif
91
92
#endif
/*_H5Bpkg_H*/
93
H5B_t::left
haddr_t left
Definition:
H5Bpkg.h:57
H5B_t::cache_info
H5AC_info_t cache_info
Definition:
H5Bpkg.h:52
f
hdr f
Definition:
H5EA.c:755
H5B_t::native
uint8_t * native
Definition:
H5Bpkg.h:59
haddr_t
CATCH haddr_t
Definition:
H5EAdblock.c:162
H5B_t
struct H5B_t H5B_t
uint8_t
unsigned char uint8_t
Definition:
H5private.h:429
H5B_class_t
Definition:
H5Bprivate.h:111
H5B_cache_ud_t
Definition:
H5Bpkg.h:64
H5B_t::child
haddr_t * child
Definition:
H5Bpkg.h:60
H5B_cache_ud_t::rc_shared
H5UC_t * rc_shared
Definition:
H5Bpkg.h:67
H5UC_t
Definition:
H5UCprivate.h:43
H5FL_SEQ_EXTERN
H5FL_SEQ_EXTERN(haddr_t)
H5ACprivate.h
H5B_t::level
unsigned level
Definition:
H5Bpkg.h:55
H5B_cache_ud_t::type
const struct H5B_class_t * type
Definition:
H5Bpkg.h:66
H5FL_BLK_EXTERN
H5FL_BLK_EXTERN(native_block)
H5FL_EXTERN
H5FL_EXTERN(H5B_t)
H5_DLL
#define H5_DLL
Definition:
H5api_adpt.h:234
H5B_t::right
haddr_t right
Definition:
H5Bpkg.h:58
H5B_t::nchildren
unsigned nchildren
Definition:
H5Bpkg.h:56
H5F_t
Definition:
H5Fpkg.h:374
H5B_cache_ud_t::f
H5F_t * f
Definition:
H5Bpkg.h:65
H5FLprivate.h
herr_t
int herr_t
Definition:
H5public.h:128
H5C_cache_entry_t
Definition:
H5Cprivate.h:1597
H5B_t
Definition:
H5Bpkg.h:51
H5Bprivate.h
H5B__node_dest
H5_DLL herr_t H5B__node_dest(H5B_t *bt)
Definition:
H5B.c:2075
H5B_cache_ud_t
struct H5B_cache_ud_t H5B_cache_ud_t
H5B_t::rc_shared
H5UC_t * rc_shared
Definition:
H5Bpkg.h:54
Generated by
1.8.18