1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group.                                               *
3  * All rights reserved.                                                      *
4  *                                                                           *
5  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
6  * terms governing use, modification, and redistribution, is contained in    *
7  * the COPYING file, which can be found at the root of the source code       *
8  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
9  * If you do not have access to either file, you may request a copy from     *
10  * help@hdfgroup.org.                                                        *
11  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12 
13 /*
14  *  Header file for API contexts, etc.
15  */
16 #ifndef _H5CXprivate_H
17 #define _H5CXprivate_H
18 
19 /* Include package's public header */
20 #ifdef NOT_YET
21 #include "H5CXpublic.h"
22 #endif /* NOT_YET */
23 
24 /* Private headers needed by this file */
25 #include "H5private.h"          /* Generic Functions                    */
26 #include "H5ACprivate.h"        /* Metadata cache                       */
27 #ifdef H5_HAVE_PARALLEL
28 #include "H5FDprivate.h"        /* File drivers                         */
29 #endif /* H5_HAVE_PARALLEL */
30 #include "H5Zprivate.h"         /* Data filters                         */
31 
32 
33 /**************************/
34 /* Library Private Macros */
35 /**************************/
36 
37 
38 /****************************/
39 /* Library Private Typedefs */
40 /****************************/
41 
42 
43 /*****************************/
44 /* Library-private Variables */
45 /*****************************/
46 
47 
48 /***************************************/
49 /* Library-private Function Prototypes */
50 /***************************************/
51 
52 /* Library private routines */
53 #ifndef _H5private_H
54 H5_DLL herr_t H5CX_push(void);
55 H5_DLL herr_t H5CX_pop(void);
56 #endif  /* _H5private_H */
57 H5_DLL void H5CX_push_special(void);
58 H5_DLL hbool_t H5CX_is_def_dxpl(void);
59 
60 /* "Setter" routines for API context info */
61 H5_DLL void H5CX_set_dxpl(hid_t dxpl_id);
62 H5_DLL void H5CX_set_lcpl(hid_t lcpl_id);
63 H5_DLL void H5CX_set_lapl(hid_t lapl_id);
64 H5_DLL void H5CX_set_dcpl(hid_t dcpl_id);
65 H5_DLL herr_t H5CX_set_libver_bounds(H5F_t *f);
66 H5_DLL herr_t H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
67     hid_t loc_id, hbool_t is_collective);
68 H5_DLL herr_t H5CX_set_loc(hid_t loc_id);
69 
70 /* "Getter" routines for API context info */
71 H5_DLL hid_t H5CX_get_dxpl(void);
72 H5_DLL hid_t H5CX_get_lapl(void);
73 H5_DLL haddr_t H5CX_get_tag(void);
74 H5_DLL H5AC_ring_t H5CX_get_ring(void);
75 #ifdef H5_HAVE_PARALLEL
76 H5_DLL hbool_t H5CX_get_coll_metadata_read(void);
77 H5_DLL herr_t H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype);
78 H5_DLL hbool_t H5CX_get_mpi_file_flushing(void);
79 H5_DLL hbool_t H5CX_get_mpio_rank0_bcast(void);
80 #endif /* H5_HAVE_PARALLEL */
81 
82 /* "Getter" routines for DXPL properties cached in API context */
83 H5_DLL herr_t H5CX_get_btree_split_ratios(double split_ratio[3]);
84 H5_DLL herr_t H5CX_get_max_temp_buf(size_t *max_temp_buf);
85 H5_DLL herr_t H5CX_get_tconv_buf(void **tconv_buf);
86 H5_DLL herr_t H5CX_get_bkgr_buf(void **bkgr_buf);
87 H5_DLL herr_t H5CX_get_bkgr_buf_type(H5T_bkg_t *bkgr_buf_type);
88 H5_DLL herr_t H5CX_get_vec_size(size_t *vec_size);
89 #ifdef H5_HAVE_PARALLEL
90 H5_DLL herr_t H5CX_get_io_xfer_mode(H5FD_mpio_xfer_t *io_xfer_mode);
91 H5_DLL herr_t H5CX_get_mpio_coll_opt(H5FD_mpio_collective_opt_t *mpio_coll_opt);
92 H5_DLL herr_t H5CX_get_mpio_local_no_coll_cause(uint32_t *mpio_local_no_coll_cause);
93 H5_DLL herr_t H5CX_get_mpio_global_no_coll_cause(uint32_t *mpio_global_no_coll_cause);
94 H5_DLL herr_t H5CX_get_mpio_chunk_opt_mode(H5FD_mpio_chunk_opt_t *mpio_chunk_opt_mode);
95 H5_DLL herr_t H5CX_get_mpio_chunk_opt_num(unsigned *mpio_chunk_opt_num);
96 H5_DLL herr_t H5CX_get_mpio_chunk_opt_ratio(unsigned *mpio_chunk_opt_ratio);
97 #endif /* H5_HAVE_PARALLEL */
98 H5_DLL herr_t H5CX_get_err_detect(H5Z_EDC_t *err_detect);
99 H5_DLL herr_t H5CX_get_filter_cb(H5Z_cb_t *filter_cb);
100 H5_DLL herr_t H5CX_get_data_transform(H5Z_data_xform_t **data_transform);
101 H5_DLL herr_t H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info);
102 H5_DLL herr_t H5CX_get_dt_conv_cb(H5T_conv_cb_t *cb_struct);
103 
104 /* "Getter" routines for LCPL properties cached in API context */
105 H5_DLL herr_t H5CX_get_encoding(H5T_cset_t* encoding);
106 H5_DLL herr_t H5CX_get_intermediate_group(unsigned* crt_intermed_group);
107 
108 /* "Getter" routines for LAPL properties cached in API context */
109 H5_DLL herr_t H5CX_get_nlinks(size_t *nlinks);
110 
111 /* "Getter" routines for DCPL properties cached in API context */
112 H5_DLL herr_t H5CX_get_dset_min_ohdr_flag(hbool_t *dset_min_ohdr_flag);
113 H5_DLL herr_t H5CX_get_ohdr_flags(uint8_t *ohdr_flags);
114 
115 /* "Getter" routines for DAPL properties cached in API context */
116 H5_DLL herr_t H5CX_get_ext_file_prefix(char **prefix_extfile);
117 H5_DLL herr_t H5CX_get_vds_prefix(char **prefix_vds);
118 
119 /* "Getter" routines for FAPL properties cached in API context */
120 H5_DLL herr_t H5CX_get_libver_bounds(H5F_libver_t *low_bound, H5F_libver_t *high_bound);
121 
122 /* "Setter" routines for API context info */
123 H5_DLL void H5CX_set_tag(haddr_t tag);
124 H5_DLL void H5CX_set_ring(H5AC_ring_t ring);
125 #ifdef H5_HAVE_PARALLEL
126 H5_DLL void H5CX_set_coll_metadata_read(hbool_t cmdr);
127 H5_DLL herr_t H5CX_set_mpi_coll_datatypes(MPI_Datatype btype, MPI_Datatype ftype);
128 H5_DLL herr_t H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt);
129 H5_DLL void H5CX_set_mpi_file_flushing(hbool_t flushing);
130 H5_DLL void H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast);
131 #endif /* H5_HAVE_PARALLEL */
132 
133 /* "Setter" routines for DXPL properties cached in API context */
134 #ifdef H5_HAVE_PARALLEL
135 H5_DLL herr_t H5CX_set_io_xfer_mode(H5FD_mpio_xfer_t io_xfer_mode);
136 #endif /* H5_HAVE_PARALLEL */
137 H5_DLL herr_t H5CX_set_vlen_alloc_info(H5MM_allocate_t alloc_func,
138     void *alloc_info, H5MM_free_t free_func, void *free_info);
139 
140 /* "Setter" routines for LAPL properties cached in API context */
141 H5_DLL herr_t H5CX_set_nlinks(size_t nlinks);
142 
143 /* "Setter" routines for cached DXPL properties that must be returned to application */
144 #ifdef H5_HAVE_PARALLEL
145 H5_DLL void H5CX_set_mpio_actual_chunk_opt(H5D_mpio_actual_chunk_opt_mode_t chunk_opt);
146 H5_DLL void H5CX_set_mpio_actual_io_mode(H5D_mpio_actual_io_mode_t actual_io_mode);
147 H5_DLL void H5CX_set_mpio_local_no_coll_cause(uint32_t mpio_local_no_coll_cause);
148 H5_DLL void H5CX_set_mpio_global_no_coll_cause(uint32_t mpio_global_no_coll_cause);
149 #ifdef H5_HAVE_INSTRUMENTED_LIBRARY
150 H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_link_hard(int mpio_coll_chunk_link_hard);
151 H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_multi_hard(int mpio_coll_chunk_multi_hard);
152 H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_link_num_true(int mpio_coll_chunk_link_num_true);
153 H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_link_num_false(int mpio_coll_chunk_link_num_false);
154 H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(int mpio_coll_chunk_multi_ratio_coll);
155 H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(int mpio_coll_chunk_multi_ratio_ind);
156 H5_DLL herr_t H5CX_test_set_mpio_coll_rank0_bcast(hbool_t rank0_bcast);
157 #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
158 #endif /* H5_HAVE_PARALLEL */
159 
160 #endif /* _H5CXprivate_H */
161 
162