ddn.lib.hdf5.h5f

HDF5 File Operations Binding

This module provides D bindings for HDF5 file operations (H5F API). These functions allow creating, opening, closing, and managing HDF5 files.

License

BSD-3-Clause

Types 8

enumH5F_scope_t : int

Scope for file flushing operations.

Determines which files are flushed when H5Fflush is called.

LOCAL = 0Flush only the specified file handle
GLOBAL = 1Flush the entire virtual file
enumH5F_OBJ : uint

Object type flags for H5Fget_obj_count and H5Fget_obj_ids.

These flags can be combined with bitwise OR to select multiple object types.

FILE = 0x0001File objects
DATASET = 0x0002Dataset objects
GROUP = 0x0004Group objects
DATATYPE = 0x0008Datatype objects
ATTR = 0x0010Attribute objects
ALL = 0x001FAll object types
LOCAL = 0x0020Restrict to objects opened through the specified file handle

File information structure (version 2).

Contains comprehensive information about an HDF5 file including superblock version, free space info, and shared object header info.

Fields
Super super_Superblock information
Free freeFree space information
Sohm sohmShared object header message information
Nested Templates
SuperSuperblock extension information.
FreeFree space manager information.
SohmShared object header message information.

Index heap information structure.

Contains size information for index heaps used by shared object headers.

Fields
hsize_t index_sizeSize of the index
hsize_t heap_sizeSize of the heap

Metadata cache configuration structure.

Used to configure the metadata cache behavior for HDF5 files. This is a simplified version suitable for most use cases.

Fields
int version_Version number of this configuration structure (use 1)
hbool_t rpt_fcn_enabledEnable reporting of cache statistics
hbool_t open_trace_fileEnable automatic cache size adjustment
hbool_t close_trace_fileEnable automatic cache size adjustment
char[1025] trace_file_nameTrace file name (unused in most cases)
hbool_t evictions_enabledEnable evictions from cache when full
hbool_t set_initial_sizeUse adaptive cache resizing policy
size_t initial_sizeInitial cache size in bytes
double min_clean_fractionMinimum fraction of cache to keep free
size_t max_sizeMaximum cache size in bytes
size_t min_sizeMinimum cache size in bytes
long epoch_lengthEpoch length in accesses for cache statistics
int incr_modeIncrement mode for adaptive resizing
double lower_hr_thresholdLower threshold for cache hit rate triggering size increase
double incrementFactor by which to increase cache size
hbool_t apply_max_incrementApply maximum increment limit
size_t max_incrementMaximum size increment
int flash_incr_modeFlash incr mode
double flash_multipleFlash multiple
double flash_thresholdFlash threshold
int decr_modeDecrement mode for adaptive resizing
double upper_hr_thresholdUpper threshold for cache hit rate triggering size decrease
double decrementFactor by which to decrease cache size
hbool_t apply_max_decrementApply maximum decrement limit
size_t max_decrementMaximum size decrement
int epochs_before_evictionNumber of epochs before evicting an entry
hbool_t apply_empty_reserveApply empty reserve
double empty_reserveEmpty reserve fraction
size_t dirty_bytes_thresholdDirty bytes threshold for flush
int metadata_write_strategyMetadata write strategy
enumH5F_mem_t : int

Memory allocation types for file driver operations.

Used to specify the type of data being allocated or freed in file driver operations and free space tracking.

NOLIST = - 1Data should not appear in the free list (must be negative)
DEFAULT = 0Value not yet set, or default allocation type (must be zero)
SUPER = 1Superblock data
BTREE = 2B-tree data
DRAW = 3Raw data (content of datasets, etc.)
GHEAP = 4Global heap data
LHEAP = 5Local heap data
OHDR = 6Object header data
NTYPES = 7Number of memory types (must be last)

Free space section information structure.

Contains information about a free space section in an HDF5 file. Used by H5Fget_free_sections() to report free space information.

Fields
haddr_t addrAddress of free space section
hsize_t sizeSize of free space section

Metadata read retry information structure.

Data structure to report the collection of read retries for metadata items with checksum. Used by H5Fget_metadata_read_retry_info().

Fields
uint nbinsNumber of bins for each retry type
uint *[H5F_NUM_METADATA_READ_RETRY_TYPES] retriesArray of retry counts for each metadata type

Functions 45

fnhid_t H5Fcreate(const char * filename, uint flags, hid_t fcpl_id, hid_t fapl_id)Creates an HDF5 file.
fnhid_t H5Fopen(const char * filename, uint flags, hid_t fapl_id)Opens an existing HDF5 file.
fnherr_t H5Fclose(hid_t file_id)Closes an HDF5 file.
fnherr_t H5Fflush(hid_t object_id, H5F_scope_t scope_)Flushes all buffers associated with a file to disk.
fnherr_t H5Fget_filesize(hid_t file_id, hsize_t * size)Returns the size of an HDF5 file in bytes.
fnssize_t H5Fget_name(hid_t obj_id, char * name, size_t size)Retrieves the name of the file to which an object belongs.
fnssize_t H5Fget_obj_count(hid_t file_id, uint types)Returns the number of open objects in an HDF5 file.
fnssize_t H5Fget_obj_ids(hid_t file_id, uint types, size_t max_objs, hid_t * obj_id_list)Returns a list of open object identifiers.
fnhtri_t H5Fis_hdf5(const char * file_name)Determines whether a file is in the HDF5 format.
fnhtri_t H5Fis_accessible(const char * container_name, hid_t fapl_id)Checks if a file can be opened with a given file access property list.
fnherr_t H5Fmount(hid_t loc_id, const char * name, hid_t child, hid_t plist)Mounts an HDF5 file as a group within another file.
fnherr_t H5Funmount(hid_t loc_id, const char * name)Unmounts a file that was mounted as a group.
fnhid_t H5Fget_create_plist(hid_t file_id)Returns the file creation property list identifier.
fnhid_t H5Fget_access_plist(hid_t file_id)Returns the file access property list identifier.
fnherr_t H5Fget_intent(hid_t file_id, uint * intent)Retrieves the intent flags used to open the file.
fnhssize_t H5Fget_freespace(hid_t file_id)Returns the amount of free space in the file.
fnherr_t H5Fget_info2(hid_t file_id, H5F_info2_t * finfo)Retrieves global information about the file.
fnhid_t H5Freopen(hid_t file_id)Reopens an HDF5 file.
fnherr_t H5Fset_libver_bounds(hid_t file_id, int low, int high)Sets the library version bounds for objects created in a file.
fnherr_t H5Fstart_swmr_write(hid_t file_id)Enables SWMR (Single Writer Multiple Reader) write mode for the file.
fnherr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr)Retrieves the current metadata cache configuration.
fnherr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr)Sets the metadata cache configuration.
fnherr_t H5Fclear_elink_file_cache(hid_t file_id)Clears the external link file cache.
fnherr_t H5Fdelete(const char * filename, hid_t fapl_id)Deletes an HDF5 file.
fnherr_t H5Fformat_convert(hid_t fid)Converts file format to latest version.
fnherr_t H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t * minimize)Gets the dataset no attributes hint setting.
fnherr_t H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize)Sets the dataset no attributes hint setting.
fnherr_t H5Fget_eoa(hid_t file_id, haddr_t * eoa)Gets the current end-of-address marker.
fnssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len)Gets a copy of the file image.
fnherr_t H5Fget_fileno(hid_t file_id, ulong * fileno)Gets the file number.
fnherr_t H5Fget_info1(hid_t obj_id, H5F_info2_t * finfo)Gets information about file v1 (deprecated).
fnherr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate)Gets the metadata cache hit rate.
fnherr_t H5Fget_mdc_size(hid_t file_id, size_t * max_size, size_t * min_clean_size, size_t * cur_size, int * cur_num_entries)Gets metadata cache size information.
fnherr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void * * file_handle)Gets the VFD handle for a file.
fnherr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment)Increments the file size.
fnherr_t H5Freset_mdc_hit_rate_stats(hid_t file_id)Resets metadata cache hit rate statistics.
fnherr_t H5Fstart_mdc_logging(hid_t file_id)Starts metadata cache logging.
fnherr_t H5Fstop_mdc_logging(hid_t file_id)Stops metadata cache logging.
fnherr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t * is_enabled, hbool_t * is_currently_logging)Gets metadata cache logging status.
fnssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t * sect_info)Retrieves free-space section information for a file.
fnherr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t * image_addr, hsize_t * image_size)Gets metadata cache image information.
fnherr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t * info)Gets metadata read retry information.
fnherr_t H5Fget_page_buffering_stats(hid_t file_id, uint * accesses, uint * hits, uint * misses, uint * evictions, uint * bypasses)Gets page buffering statistics.
fnherr_t H5Freset_page_buffering_stats(hid_t file_id)Resets page buffering statistics.
fnherr_t H5Fset_latest_format(hid_t file_id, hbool_t latest_format)Sets the latest file format for a file.

Variables 1

enumvarH5F_NUM_METADATA_READ_RETRY_TYPES = 21

Total number of metadata read retry types.

Used with H5F_retry_info_t structure for H5Fget_metadata_read_retry_info().