-
-
Notifications
You must be signed in to change notification settings - Fork 244
/
H5Ppublic.h
9932 lines (9866 loc) · 400 KB
/
H5Ppublic.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* 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://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This file contains function prototypes for each exported function in the
* H5P module.
*/
#ifndef H5Ppublic_H
#define H5Ppublic_H
/* System headers needed by this file */
/* Public headers needed by this file */
#include "H5public.h"
#include "H5ACpublic.h" /* Metadata cache */
#include "H5Dpublic.h" /* Datasets */
#include "H5Fpublic.h" /* Files */
#include "H5FDpublic.h" /* File drivers */
#include "H5Ipublic.h" /* ID management */
#include "H5Lpublic.h" /* Links */
#include "H5MMpublic.h" /* Memory management */
#include "H5Opublic.h" /* Object headers */
#include "H5Spublic.h" /* Dataspaces */
#include "H5Tpublic.h" /* Datatypes */
#include "H5Zpublic.h" /* Data filters */
/*****************/
/* Public Macros */
/*****************/
/* When this header is included from a private HDF5 header, don't make calls to H5open() */
#undef H5OPEN
#ifndef H5private_H
#define H5OPEN H5open(),
#else /* H5private_H */
#define H5OPEN
#endif /* H5private_H */
/*
* The library's property list classes
*/
#define H5P_ROOT (H5OPEN H5P_CLS_ROOT_ID_g)
#define H5P_OBJECT_CREATE (H5OPEN H5P_CLS_OBJECT_CREATE_ID_g)
#define H5P_FILE_CREATE (H5OPEN H5P_CLS_FILE_CREATE_ID_g)
#define H5P_FILE_ACCESS (H5OPEN H5P_CLS_FILE_ACCESS_ID_g)
#define H5P_DATASET_CREATE (H5OPEN H5P_CLS_DATASET_CREATE_ID_g)
#define H5P_DATASET_ACCESS (H5OPEN H5P_CLS_DATASET_ACCESS_ID_g)
#define H5P_DATASET_XFER (H5OPEN H5P_CLS_DATASET_XFER_ID_g)
#define H5P_FILE_MOUNT (H5OPEN H5P_CLS_FILE_MOUNT_ID_g)
#define H5P_GROUP_CREATE (H5OPEN H5P_CLS_GROUP_CREATE_ID_g)
#define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_ID_g)
#define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_ID_g)
#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_ID_g)
#define H5P_MAP_CREATE (H5OPEN H5P_CLS_MAP_CREATE_ID_g)
#define H5P_MAP_ACCESS (H5OPEN H5P_CLS_MAP_ACCESS_ID_g)
#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_ID_g)
#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_ID_g)
#define H5P_ATTRIBUTE_ACCESS (H5OPEN H5P_CLS_ATTRIBUTE_ACCESS_ID_g)
#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_ID_g)
#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_ID_g)
#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_ID_g)
#define H5P_VOL_INITIALIZE (H5OPEN H5P_CLS_VOL_INITIALIZE_ID_g)
#define H5P_REFERENCE_ACCESS (H5OPEN H5P_CLS_REFERENCE_ACCESS_ID_g)
/*
* The library's default property lists
*/
#define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_ID_g)
#define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_ID_g)
#define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_ID_g)
#define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_ID_g)
#define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_ID_g)
#define H5P_FILE_MOUNT_DEFAULT (H5OPEN H5P_LST_FILE_MOUNT_ID_g)
#define H5P_GROUP_CREATE_DEFAULT (H5OPEN H5P_LST_GROUP_CREATE_ID_g)
#define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_ID_g)
#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_ID_g)
#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_ID_g)
#define H5P_MAP_CREATE_DEFAULT (H5OPEN H5P_LST_MAP_CREATE_ID_g)
#define H5P_MAP_ACCESS_DEFAULT (H5OPEN H5P_LST_MAP_ACCESS_ID_g)
#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_ID_g)
#define H5P_ATTRIBUTE_ACCESS_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_ACCESS_ID_g)
#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g)
#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_ID_g)
#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_ID_g)
#define H5P_VOL_INITIALIZE_DEFAULT (H5OPEN H5P_LST_VOL_INITIALIZE_ID_g)
#define H5P_REFERENCE_ACCESS_DEFAULT (H5OPEN H5P_LST_REFERENCE_ACCESS_ID_g)
/* Common creation order flags (for links in groups and attributes on objects) */
#define H5P_CRT_ORDER_TRACKED 0x0001
#define H5P_CRT_ORDER_INDEXED 0x0002
/**
* Default value of type \ref hid_t for all property list classes
*/
#define H5P_DEFAULT 0 /* (hid_t) */
#ifdef __cplusplus
extern "C" {
#endif
/*******************/
/* Public Typedefs */
/*******************/
/* Define property list class callback function pointer types */
//! <!-- [H5P_cls_create_func_t_snip] -->
/**
* \brief Callback function for H5Pcreate_class()
*
* \param[in] prop_id The identifier of the property list class being created
* \param[in] create_data User pointer to any class creation data required
* \return \herr_t
*
* \details This function is called when a new property list of the class
* with which this function was registered is being created. The
* function is called after any registered parent create function is
* called for each property value.
*
* If the create function returns a negative value, the new list is not
* returned to the user and the property list creation routine returns
* an error value.
*
* \since 1.4.0
*
*/
typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data);
//! <!-- [H5P_cls_create_func_t_snip] -->
//! <!-- [H5P_cls_copy_func_t_snip] -->
/**
* \brief Callback function for H5Pcreate_class()
*
* \param[in] new_prop_id The identifier of the property list copy
* \param[in] old_prop_id The identifier of the property list being copied
* \param[in] copy_data User pointer to any copy data required
* \return \herr_t
*
* \details This function is called when an existing property list of this
* class is copied. The copy callback function is called after any
* registered parent copy callback function is called for each property
* value.
*
* If the copy routine returns a negative value, the new list is not
* returned to the user and the property list copy function returns an
* error value.
*
* \since 1.4.0
*
*/
typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id, void *copy_data);
//! <!-- [H5P_cls_copy_func_t_snip] -->
//! <!-- [H5P_cls_close_func_t_snip] -->
/**
* \brief Callback function for H5Pcreate_class()
*
* \param[in] prop_id The identifier of the property list class being created
* \param[in] close_data User pointer to any close data required
* \return \herr_t
*
* \details This function is called when a property list of the class
* with which this function was registered is being closed. The
* function is called after any registered parent close function is
* called for each property value.
*
* If the close function returns a negative value, the new list is not
* returned to the user and the property list close routine returns
* an error value.
*
* \since 1.4.0
*
*/
typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data);
//! <!-- [H5P_cls_close_func_t_snip] -->
/* Define property list callback function pointer types */
//! <!-- [H5P_prp_cb1_t_snip] -->
/**
* \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1()
*
* \param[in] name The name of the property
* \param[in] size The size of the property in bytes
* \param[in,out] value The value for the property
* \return \herr_t
*
* \details The H5P_prp_cb1_t() function describes the parameters used by the
* property create, copy and close callback functions.
*/
typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value);
//! <!-- [H5P_prp_cb1_t_snip] -->
//! <!-- [H5P_prp_cb2_t_snip] -->
/**
* \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1()
*
* \plist_id{prop_id}
* \param[in] name The name of the property
* \param[in] size The size of the property in bytes
* \param[in] value The value for the property
* \return \herr_t
*
* \details The H5P_prp_cb2_t() function describes the parameters used by the
* property set, copy and delete callback functions.
*/
typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, void *value);
//! <!-- [H5P_prp_cb2_t_snip] -->
typedef H5P_prp_cb1_t H5P_prp_create_func_t;
typedef H5P_prp_cb2_t H5P_prp_set_func_t;
typedef H5P_prp_cb2_t H5P_prp_get_func_t;
//! <!-- [H5P_prp_encode_func_t_snip] -->
/**
* \brief Callback function for encoding property values
*
* \param[in] value The property value to be encoded
* \param[out] buf The encoded property value
* \param[out] size The size of \p buf
* \return \herr_t
*
* \note There is currently no public API which exposes a callback of this type.
*
*/
typedef herr_t (*H5P_prp_encode_func_t)(const void *value, void **buf, size_t *size);
//! <!-- [H5P_prp_encode_func_t_snip] -->
//! <!-- [H5P_prp_decode_func_t_snip] -->
/**
* \brief Callback function for decoding property values
*
* \param[in] buf A buffer containing an encoded property value
* \param[out] value The decoded property value
* \return \herr_t
*
* \note There is currently no public API which exposes a callback of this type.
*
*/
typedef herr_t (*H5P_prp_decode_func_t)(const void **buf, void *value);
//! <!-- [H5P_prp_decode_func_t_snip] -->
typedef H5P_prp_cb2_t H5P_prp_delete_func_t;
typedef H5P_prp_cb1_t H5P_prp_copy_func_t;
//! <!-- [H5P_prp_compare_func_t_snip] -->
/**
* \brief Callback function for comparing property values
*
* \param[in] value1 A property value
* \param[in] value2 A property value
* \param[in] size The size of the \p value1 and \p value2 buffers
* \return Returns a positive value if \c value1 is greater than \c value2, a
* negative value if \c value2 is greater than \c value1 and zero if
* \c value1 and \c value2 are equal.
*
* \see H5Pregister(), H5Pinsert()
*/
typedef int (*H5P_prp_compare_func_t)(const void *value1, const void *value2, size_t size);
//! <!-- [H5P_prp_compare_func_t_snip] -->
typedef H5P_prp_cb1_t H5P_prp_close_func_t;
/* Define property list iteration function type */
//! <!-- [H5P_iterate_t_snip] -->
/**
* \brief Callback function for H5Piterate()
*
* \param[in] id The identifier of a property list or property list class
* \param[in] name The name of the current property
* \param[in,out] iter_data The user context passed to H5Piterate()
* \return \herr_t_iter
*
* \details This function is called for each property encountered when
* iterating over a property list or property list class
* via H5Piterate().
*
* \since 1.4.0
*
*/
typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data);
//! <!-- [H5P_iterate_t_snip] -->
//! <!--[H5D_mpio_actual_chunk_opt_mode_t_snip] -->
/**
* Actual IO mode property
*
* \details The default value, #H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all
* I/O operations that do not use chunk optimizations, including
* non-collective I/O and contiguous collective I/O.
*/
typedef enum H5D_mpio_actual_chunk_opt_mode_t {
H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0,
/**< No chunk optimization was performed. Either no collective I/O was
attempted or the dataset wasn't chunked. */
H5D_MPIO_LINK_CHUNK,
/**< Collective I/O is performed on all chunks simultaneously. */
H5D_MPIO_MULTI_CHUNK
/**< Each chunk was individually assigned collective or independent I/O based
on what fraction of processes access the chunk. If the fraction is greater
than the multi chunk ratio threshold, collective I/O is performed on that
chunk. The multi chunk ratio threshold can be set using
H5Pset_dxpl_mpio_chunk_opt_ratio(). The default value is 60%. */
} H5D_mpio_actual_chunk_opt_mode_t;
//! <!--[H5D_mpio_actual_chunk_opt_mode_t_snip] -->
//! <!-- [H5D_mpio_actual_io_mode_t_snip] -->
/**
* The following values are conveniently defined as a bit field so that
* we can switch from the default to independent or collective and then to
* mixed without having to check the original value.
*/
typedef enum H5D_mpio_actual_io_mode_t {
H5D_MPIO_NO_COLLECTIVE = 0x0,
/**< No collective I/O was performed. Collective I/O was not requested or
collective I/O isn't possible on this dataset */
H5D_MPIO_CHUNK_INDEPENDENT = 0x1,
/**< HDF5 performed one the chunk collective optimization schemes and each
chunk was accessed independently */
H5D_MPIO_CHUNK_COLLECTIVE = 0x2,
/**< HDF5 performed one the chunk collective optimization schemes and each
chunk was accessed collectively */
H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2,
/**< HDF5 performed one the chunk collective optimization schemes and some
chunks were accessed independently, some collectively. */
/** \internal The contiguous case is separate from the bit field. */
H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4
/**< Collective I/O was performed on a contiguous dataset */
} H5D_mpio_actual_io_mode_t;
//! <!-- [H5D_mpio_actual_io_mode_t_snip] -->
//! <!-- [H5D_mpio_no_collective_cause_t_snip] -->
/**
* Broken collective IO property
*/
typedef enum H5D_mpio_no_collective_cause_t {
H5D_MPIO_COLLECTIVE = 0x00,
/**< Collective I/O was performed successfully */
H5D_MPIO_SET_INDEPENDENT = 0x01,
/**< Collective I/O was not performed because independent I/O was requested */
H5D_MPIO_DATATYPE_CONVERSION = 0x02,
/**< Collective I/O was not performed because datatype conversions were required */
H5D_MPIO_DATA_TRANSFORMS = 0x04,
/**< Collective I/O was not performed because data transforms needed to be applied */
H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08,
/**< Collective I/O was disabled by environment variable (\Code{HDF5_MPI_OPT_TYPES}) */
H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10,
/**< Collective I/O was not performed because one of the dataspaces was neither simple nor scalar */
H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20,
/**< Collective I/O was not performed because the dataset was neither contiguous nor chunked */
H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40,
/**< Collective I/O was not performed because parallel filtered writes are disabled */
H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE = 0x80,
/**< Error */
H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x100
/**< Sentinel */
} H5D_mpio_no_collective_cause_t;
//! <!-- [H5D_mpio_no_collective_cause_t_snip] -->
/********************/
/* Public Variables */
/********************/
/* Property list class IDs */
/* (Internal to library, do not use! Use macros above) */
H5_DLLVAR hid_t H5P_CLS_ROOT_ID_g;
H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_ID_g;
H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_ID_g;
H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_MAP_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_MAP_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_ID_g;
H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_VOL_INITIALIZE_ID_g;
H5_DLLVAR hid_t H5P_CLS_REFERENCE_ACCESS_ID_g;
/* Default roperty list IDs */
/* (Internal to library, do not use! Use macros above) */
H5_DLLVAR hid_t H5P_LST_FILE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_DATASET_XFER_ID_g;
H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_ID_g;
H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_MAP_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_MAP_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g;
H5_DLLVAR hid_t H5P_LST_LINK_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_VOL_INITIALIZE_ID_g;
H5_DLLVAR hid_t H5P_LST_REFERENCE_ACCESS_ID_g;
/*********************/
/* Public Prototypes */
/*********************/
/* Generic property list routines */
/**
* \ingroup GPLO
*
* \brief Terminates access to a property list
*
* \plist_id
*
* \return \herr_t
*
* \details H5Pclose() terminates access to a property list. All property
* lists should be closed when the application is finished
* accessing them. This frees resources used by the property
* list.
*
* \since 1.0.0
*
*/
H5_DLL herr_t H5Pclose(hid_t plist_id);
/**
* \ingroup GPLOA
*
* \brief Closes an existing property list class
*
* \plistcls_id{plist_id}
*
* \return \herr_t
*
* \details H5Pclose_class() removes a property list class from the library.
* Existing property lists of this class will continue to exist,
* but new ones are not able to be created.
*
* \since 1.4.0
*
*/
H5_DLL herr_t H5Pclose_class(hid_t plist_id);
/**
* \ingroup GPLO
*
* \brief Copies an existing property list to create a new property list
*
* \plist_id
*
* \return \hid_t{property list}
*
* \details H5Pcopy() copies an existing property list to create a new
* property list. The new property list has the same properties
* and values as the original property list.
*
* \since 1.0.0
*
*/
H5_DLL hid_t H5Pcopy(hid_t plist_id);
/**
* \ingroup GPLOA
*
* \brief Copies a property from one list or class to another
*
* \param[in] dst_id Identifier of the destination property list or class
* \param[in] src_id Identifier of the source property list or class
* \param[in] name Name of the property to copy
*
* \return \herr_t
*
* \details H5Pcopy_prop() copies a property from one property list or
* class to another.
*
* If a property is copied from one class to another, all the
* property information will be first deleted from the destination
* class and then the property information will be copied from the
* source class into the destination class.
*
* If a property is copied from one list to another, the property
* will be first deleted from the destination list (generating a
* call to the close callback for the property, if one exists)
* and then the property is copied from the source list to the
* destination list (generating a call to the copy callback for
* the property, if one exists).
*
* If the property does not exist in the class or list, this
* call is equivalent to calling H5Pregister() or H5Pinsert() (for
* a class or list, as appropriate) and the create callback will
* be called in the case of the property being copied into a list
* (if such a callback exists for the property).
*
* \since 1.6.0
*
*/
H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name);
/**
* \ingroup GPLO
*
* \brief Creates a new property list as an instance of a property list class
*
* \plistcls_id{cls_id}
*
* \return \hid_t{property list}
*
* \details H5Pcreate() creates a new property list as an instance of
* some property list class. The new property list is initialized
* with default values for the specified class. The classes are as
* follows:
*
* <table>
* <tr>
* <th>Class Identifier</th>
* <th>Class Name</th>
* <th>Comments</th>
* </tr>
* <tr>
* <td>#H5P_ATTRIBUTE_CREATE</td>
* <td>attribute create</td>
* <td>Properties for attribute creation</td>
* </tr>
* <tr>
* <td>#H5P_DATASET_ACCESS</td>
* <td>dataset access</td>
* <td>Properties for dataset access</td>
* </tr>
* <tr>
* <td>#H5P_DATASET_CREATE</td>
* <td>dataset create</td>
* <td>Properties for dataset creation</td>
* </tr>
* <tr>
* <td>#H5P_DATASET_XFER</td>
* <td>data transfer</td>
* <td>Properties for raw data transfer</td>
* </tr>
* <tr>
* <td>#H5P_DATATYPE_ACCESS</td>
* <td>datatype access</td>
* <td>Properties for datatype access</td>
* </tr>
* <tr>
* <td>#H5P_DATATYPE_CREATE</td>
* <td>datatype create</td>
* <td>Properties for datatype creation</td>
* </tr>
* <tr>
* <td>#H5P_FILE_ACCESS</td>
* <td>file access</td>
* <td>Properties for file access</td>
* </tr>
* <tr>
* <td>#H5P_FILE_CREATE</td>
* <td>file create</td>
* <td>Properties for file creation</td>
* </tr>
* <tr>
* <td>#H5P_FILE_MOUNT</td>
* <td>file mount</td>
* <td>Properties for file mounting</td>
* </tr>
* <tr valign="top">
* <td>#H5P_GROUP_ACCESS</td>
* <td>group access</td>
* <td>Properties for group access</td>
* </tr>
* <tr>
* <td>#H5P_GROUP_CREATE</td>
* <td>group create</td>
* <td>Properties for group creation</td>
* </tr>
* <tr>
* <td>#H5P_LINK_ACCESS</td>
* <td>link access</td>
* <td>Properties governing link traversal when accessing objects</td>
* </tr>
* <tr>
* <td>#H5P_LINK_CREATE</td>
* <td>link create</td>
* <td>Properties governing link creation</td>
* </tr>
* <tr>
* <td>#H5P_OBJECT_COPY</td>
* <td>object copy</td>
* <td>Properties governing the object copying process</td>
* </tr>
* <tr>
* <td>#H5P_OBJECT_CREATE</td>
* <td>object create</td>
* <td>Properties for object creation</td>
* </tr>
* <tr>
* <td>#H5P_STRING_CREATE</td>
* <td>string create</td>
* <td>Properties for character encoding when encoding strings or
* object names</td>
* </tr>
* <tr>
* <td>#H5P_VOL_INITIALIZE</td>
* <td>vol initialize</td>
* <td>Properties for VOL initialization</td>
* </tr>
* </table>
*
* This property list must eventually be closed with H5Pclose();
* otherwise, errors are likely to occur.
*
* \version 1.12.0 The #H5P_VOL_INITIALIZE property list class was added
* \version 1.8.15 For each class, the class name returned by
* H5Pget_class_name() was added.
* The list of possible Fortran values was updated.
* \version 1.8.0 The following property list classes were added at this
* release: #H5P_DATASET_ACCESS, #H5P_GROUP_CREATE,
* #H5P_GROUP_ACCESS, #H5P_DATATYPE_CREATE,
* #H5P_DATATYPE_ACCESS, #H5P_ATTRIBUTE_CREATE
*
* \since 1.0.0
*
*/
H5_DLL hid_t H5Pcreate(hid_t cls_id);
/**
* \ingroup GPLOA
*
* \brief Creates a new property list class
*
* \plistcls_id{parent}
* \param[in] name Name of property list class to register
* \param[in] create Callback routine called when a property list is
* created
* \param[in] create_data Pointer to user-defined class create data, to be
* passed along to class create callback
* \param[in] copy Callback routine called when a property list is
* copied
* \param[in] copy_data Pointer to user-defined class copy data, to be
* passed along to class copy callback
* \param[in] close Callback routine called when a property list is
* being closed
* \param[in] close_data Pointer to user-defined class close data, to be
* passed along to class close callback
*
* \return \hid_t{property list class}
*
* \details H5Pcreate_class() registers a new property list class with the
* library. The new property list class can inherit from an
* existing property list class, \p parent, or may be derived
* from the default “empty” class, NULL. New classes with
* inherited properties from existing classes may not remove
* those existing properties, only add or remove their own class
* properties. Property list classes defined and supported in the
* HDF5 library distribution are listed and briefly described in
* H5Pcreate(). The \p create, \p copy, \p close functions are called
* when a property list of the new class is created, copied, or closed,
* respectively.
*
* H5Pclose_class() must be used to release the property list class
* identifier returned by this function.
*
* \since 1.4.0
*
*/
H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t create, void *create_data,
H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close,
void *close_data);
/**
* \ingroup GPLO
*
* \brief Decodes property list received in a binary object buffer and
* returns a new property list identifier
*
* \param[in] buf Buffer holding the encoded property list
*
* \return \hid_tv{object}
*
* \details Given a binary property list description in a buffer, H5Pdecode()
* reconstructs the HDF5 property list and returns an identifier
* for the new property list. The binary description of the property
* list is encoded by H5Pencode().
*
* The user is responsible for passing in the correct buffer.
*
* The property list identifier returned by this function should be
* released with H5Pclose() when the identifier is no longer needed
* so that resource leaks will not develop.
*
* \note Some properties cannot be encoded and therefore will not be available
* in the decoded property list. These properties are discussed in
* H5Pencode().
*
* \since 1.10.0
*
*/
H5_DLL hid_t H5Pdecode(const void *buf);
/**
* \ingroup GPLO
*
* \brief Encodes the property values in a property list into a binary
* buffer
*
* \plist_id
* \param[out] buf Buffer into which the property list will be encoded.
* If the provided buffer is NULL, the size of the
* buffer required is returned through \p nalloc; the
* function does nothing more.
* \param[out] nalloc The size of the required buffer
* \fapl_id
*
* \return \herr_t
*
* \details H5Pencode2() encodes the property list \p plist_id into the
* binary buffer \p buf, according to the file format setting
* specified by the file access property list \p fapl_id.
*
* If the required buffer size is unknown, \p buf can be passed
* in as NULL and the function will set the required buffer size
* in \p nalloc. The buffer can then be created and the property
* list encoded with a subsequent H5Pencode2() call.
*
* If the buffer passed in is not big enough to hold the encoded
* properties, the H5Pencode2() call can be expected to fail with
* a segmentation fault.
*
* The file access property list \p fapl_id is used to
* control the encoding via the \a libver_bounds property
* (see H5Pset_libver_bounds()). If the \a libver_bounds
* property is missing, H5Pencode2() proceeds as if the \a
* libver_bounds property were set to (#H5F_LIBVER_EARLIEST,
* #H5F_LIBVER_LATEST). (Functionally, H5Pencode1() is identical to
* H5Pencode2() with \a libver_bounds set to (#H5F_LIBVER_EARLIEST,
* #H5F_LIBVER_LATEST).)
* Properties that do not have encode callbacks will be skipped.
* There is currently no mechanism to register an encode callback for
* a user-defined property, so user-defined properties cannot currently
* be encoded.
*
* Some properties cannot be encoded, particularly properties that are
* reliant on local context.
*
* \b Motivation:
* This function was introduced in HDF5-1.12 as part of the \a H5Sencode
* format change to enable 64-bit selection encodings and a dataspace
* selection that is tied to a file.
*
* \since 1.12.0
*
*/
H5_DLL herr_t H5Pencode2(hid_t plist_id, void *buf, size_t *nalloc, hid_t fapl_id);
/**
* \ingroup GPLOA
*
* \brief Compares two property lists or classes for equality
*
* \param[in] id1 First property object to be compared
* \param[in] id2 Second property object to be compared
*
* \return \htri_t
*
* \details H5Pequal() compares two property lists or classes to determine
* whether they are equal to one another.
*
* Either both \p id1 and \p id2 must be property lists or both
* must be classes; comparing a list to a class is an error.
*
* \since 1.4.0
*
*/
H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2);
/**
* \ingroup GPLOA
*
* \brief Queries whether a property name exists in a property list or
* class
*
* \param[in] plist_id Identifier for the property list or class to query
* \param[in] name Name of property to check for
*
* \return \htri_t
*
* \details H5Pexist() determines whether a property exists within a
* property list or class.
*
* \since 1.4.0
*
*/
H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name);
/**
* \ingroup GPLOA
*
* \brief Queries the value of a property
*
* \plist_id
* \param[in] name Name of property to query
* \param[out] value Pointer to a location to which to copy the value of
* the property
*
* \return \herr_t
*
* \details H5Pget() retrieves a copy of the value for a property in a
* property list. If there is a \p get callback routine registered
* for this property, the copy of the value of the property will
* first be passed to that routine and any changes to the copy of
* the value will be used when returning the property value from
* this routine.
*
* This routine may be called for zero-sized properties with the
* \p value set to NULL. The \p get routine will be called with
* a NULL value if the callback exists.
*
* The property name must exist or this routine will fail.
*
* If the \p get callback routine returns an error, \ value will
* not be modified.
*
* \since 1.4.0
*
*/
H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value);
/**
*\ingroup GPLO
*
* \brief Returns the property list class identifier for a property list
*
* \plist_id
*
* \return \hid_t{property list class}
*
* \details H5Pget_class() returns the property list class identifier for
* the property list identified by the \p plist_id parameter.
*
* Note that H5Pget_class() returns a value of #hid_t type, an
* internal HDF5 identifier, rather than directly returning a
* property list class. That identifier can then be used with
* either H5Pequal() or H5Pget_class_name() to determine which
* predefined HDF5 property list class H5Pget_class() has returned.
*
* A full list of valid predefined property list classes appears
* in the description of H5Pcreate().
*
* Determining the HDF5 property list class name with H5Pequal()
* requires a series of H5Pequal() calls in an if-else sequence.
* An iterative sequence of H5Pequal() calls can compare the
* identifier returned by H5Pget_class() to members of the list of
* valid property list class names. A pseudo-code snippet might
* read as follows:
*
* \code
* plist_class_id = H5Pget_class (dsetA_plist);
*
* if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = TRUE;
* [ H5P_OBJECT_CREATE is the property list class ]
* [ returned by H5Pget_class. ]
*
* else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = TRUE;
* [ H5P_DATASET_CREATE is the property list class. ]
*
* else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = TRUE;
* [ H5P_DATASET_XFER is the property list class. ]
*
* .
* . [ Continuing the iteration until a match is found. ]
* .
* \endcode
*
* H5Pget_class_name() returns the property list class name directly
* as a string:
*
* \code
* plist_class_id = H5Pget_class (dsetA_plist);
* plist_class_name = H5Pget_class_name (plist_class_id)
* \endcode
*
* Note that frequent use of H5Pget_class_name() can become a
* performance problem in a high-performance environment. The
* H5Pequal() approach is generally much faster.
*
* \version 1.6.0 Return type changed in this release.
* \since 1.0.0
*
*/
H5_DLL hid_t H5Pget_class(hid_t plist_id);
/**
* \ingroup GPLOA
*
* \brief Retrieves the name of a class
*
* \plistcls_id{pclass_id}
*
* \return Returns a pointer to an allocated string containing the class
* name if successful, and NULL if not successful.
*
* \details H5Pget_class_name() retrieves the name of a generic property
* list class. The pointer to the name must be freed by the user
* with a call to H5free_memory() after each successful call.
*
* <table>
* <tr>
* <th>Class Name (class identifier) Returned</th>
* <th>Property List Class</th>
* <th>Expanded Name of the Property List Class</th>
* <th>The Class Identifier Used with H5Pcreate</th>
* <th>Comments</th>
* </tr>
* <tr>
* <td>attribute create</td>
* <td>acpl</td>
* <td>Attribute Creation Property List</td>
* <td>H5P_ATTRIBUTE_CREATE</td>
* <td> </td>
* </tr>
* <tr>
* <td>dataset access</td>
* <td>dapl</td>
* <td>Dataset Access Property List</td>
* <td>H5P_DATASET_ACCESS</td>
* <td> </td>
* </tr>
* <tr>
* <td>dataset create</td>
* <td>dcpl</td>
* <td>Dataset Creation Property List</td>
* <td>H5P_DATASET_CREATE</td>
* <td> </td>
* </tr>
* <tr>
* <td>data transfer</td>
* <td>dxpl</td>
* <td>Data Transfer Property List</td>
* <td>H5P_DATASET_XFER</td>
* <td> </td>
* </tr>
* <tr>
* <td>datatype access</td>
* <td> </td>
* <td> </td>
* <td>H5P_DATATYPE_ACCESS</td>
* <td>This class can be created, but there are no properties
* in the class currently.
* </td>
* </tr>
* <tr>
* <td>datatype create</td>
* <td> </td>
* <td> </td>
* <td>H5P_DATATYPE_CREATE</td>
* <td>This class can be created, but there
* are no properties in the class currently.</td>
* </tr>
* <tr>
* <td>file access</td>
* <td>fapl</td>
* <td>File Access Property List</td>
* <td>H5P_FILE_ACCESS</td>
* <td> </td>
* </tr>
* <tr>
* <td>file create</td>
* <td>fcpl</td>
* <td>File Creation Property List</td>
* <td>H5P_FILE_CREATE</td>
* <td> </td>
* </tr>
* <tr>
* <td>file mount</td>
* <td>fmpl</td>
* <td>File Mount Property List</td>
* <td>H5P_FILE_MOUNT</td>
* <td> </td>
* </tr>
* <tr>
* <td>group access</td>
* <td> </td>
* <td> </td>
* <td>H5P_GROUP_ACCESS</td>
* <td>This class can be created, but there
* are no properties in the class currently.</td>
* </tr>
* <tr>
* <td>group create</td>
* <td>gcpl</td>
* <td>Group Creation Property List</td>
* <td>H5P_GROUP_CREATE</td>
* <td> </td>
* </tr>
* <tr>
* <td>link access</td>
* <td>lapl</td>
* <td>Link Access Property List</td>