ddn.lib.hdf5.h5d

HDF5 Dataset Binding

This module provides D bindings for HDF5 dataset operations (H5D API). These functions allow creating, opening, reading, writing, and managing datasets.

License

BSD-3-Clause

Types 11

enumH5D_layout_t : int

Dataset layout type.

Specifies how raw data is stored in the file.

LAYOUT_ERROR = - 1Error indicator
COMPACT = 0Raw data is small (< 64KB), stored in object header
CONTIGUOUS = 1Contiguous layout
CHUNKED = 2Chunked or tiled layout
VIRTUAL = 3Virtual dataset - actual data is stored in other datasets
NLAYOUTS = 4Number of layouts (must be last)

Dataset space allocation status.

Indicates how much space has been allocated for a dataset.

SPACE_STATUS_ERROR = - 1Error indicator
NOT_ALLOCATED = 0Space has not been allocated for this dataset
PART_ALLOCATED = 1Space has been partially allocated (chunked storage only)
ALLOCATED = 2Space has been fully allocated for this dataset

Dataset space allocation time.

Specifies when storage space for a dataset should be allocated.

ALLOC_TIME_ERROR = - 1Error indicator
DEFAULT = 0Default allocation time (layout dependent)
EARLY = 1Allocate on creation
LATE = 2Allocate on first write
INCR = 3Allocate incrementally (by chunk)
enumH5D_fill_time_t : int

Dataset fill time.

Specifies when fill values are written to a dataset.

FILL_TIME_ERROR = - 1Error indicator
ALLOC = 0Fill on allocation
NEVER = 1Never write fill values
IFSET = 2Fill if fill-value was set

Dataset fill value status.

Indicates the fill value status of a dataset.

FILL_VALUE_ERROR = - 1Error indicator
UNDEFINED = 0No fill value defined
DEFAULT = 1Default fill-value
USER_DEFINED = 2User-defined fill-value

Chunk index type.

Indicates the type of chunk indexing used for a dataset.

SINGLE = 0Single chunk index (for datasets with a single chunk)
NONE = 1Implicit index (no separate index structure)
FARRAY = 2Fixed array index
EARRAY = 3Extensible array index
BT2 = 4Version 2 B-tree index
aliasH5D_operator_t = herr_t function(void * elem, hid_t type_id, uint ndim, const hsize_t * point, void * operator_data)

Callback function type for H5Diterate.

Parameters

elemPointer to the current element
type_idDatatype identifier
ndimNumber of dimensions
pointCoordinates of the current element
operator_dataUser data passed to H5Diterate

Returns

Zero to continue, positive to short-circuit success, negative for failure.
aliasH5D_scatter_func_t = herr_t function(const(void *) * src_buf, size_t * src_buf_bytes_used, void * op_data)

Callback function type for H5Dscatter.

Parameters

src_bufPointer to receive the source buffer pointer
src_buf_bytes_usedPointer to receive the number of bytes to use
op_dataUser data passed to H5Dscatter

Returns

Non-negative on success, negative on failure.
aliasH5D_gather_func_t = herr_t function(const void * dst_buf, size_t dst_buf_bytes_used, void * op_data)

Callback function type for H5Dgather.

Parameters

dst_bufBuffer containing gathered data
dst_buf_bytes_usedNumber of bytes in the buffer
op_dataUser data passed to H5Dgather

Returns

Non-negative on success, negative on failure.
aliasH5D_chunk_iter_op_t = int function(const hsize_t * offset, uint filter_mask, haddr_t addr, hsize_t size, void * op_data)

Callback function type for H5Dchunk_iter.

Parameters

offsetLogical position of the chunk in the dataset
filter_maskBitmask indicating which filters are applied
addrAddress of the chunk in the file
sizeSize of the chunk in bytes
op_dataUser data passed to H5Dchunk_iter

Returns

Zero to continue iteration, positive to stop iteration successfully,

negative to stop iteration with an error.

aliashaddr_t = ulong

Address type for file offsets.

Represents an address/offset within an HDF5 file.

Functions 37

fnhid_t H5Dcreate2(hid_t loc_id, const char * name, hid_t type_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id)Creates a new dataset.
fnhid_t H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id)Creates an anonymous dataset.
fnhid_t H5Dopen2(hid_t loc_id, const char * name, hid_t dapl_id)Opens an existing dataset.
fnherr_t H5Dclose(hid_t dset_id)Closes a dataset.
fnhid_t H5Dget_space(hid_t dset_id)Gets the dataspace of a dataset.
fnherr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t * allocation)Gets the space allocation status of a dataset.
fnhid_t H5Dget_type(hid_t dset_id)Gets the datatype of a dataset.
fnhid_t H5Dget_create_plist(hid_t dset_id)Gets the dataset creation property list.
fnhid_t H5Dget_access_plist(hid_t dset_id)Gets the dataset access property list.
fnhsize_t H5Dget_storage_size(hid_t dset_id)Gets the amount of storage required for a dataset.
fnhaddr_t H5Dget_offset(hid_t dset_id)Gets the offset of a dataset in the file.
fnherr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, void * buf)Reads data from a dataset.
fnherr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, const void * buf)Writes data to a dataset.
fnherr_t H5Dset_extent(hid_t dset_id, const hsize_t * size)Changes the dimensions of a dataset.
fnherr_t H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint filters, const hsize_t * offset, size_t data_size, const void * buf)Writes a raw data chunk directly to a dataset.
fnherr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t * offset, uint * filters, void * buf)Reads a raw data chunk directly from a dataset.
fnherr_t H5Dflush(hid_t dset_id)Flushes all buffers associated with a dataset to disk.
fnherr_t H5Drefresh(hid_t dset_id)Refreshes all buffers associated with a dataset.
fnherr_t H5Diterate(void * buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void * operator_data)Iterates over all elements in a dataset.
fnherr_t H5Dfill(const void * fill, hid_t fill_type_id, void * buf, hid_t buf_type_id, hid_t space_id)Fills a selection in memory with a value.
fnherr_t H5Dscatter(H5D_scatter_func_t op, void * op_data, hid_t type_id, hid_t dst_space_id, void * dst_buf)Scatters data into a selection in a memory buffer.
fnherr_t H5Dgather(hid_t src_space_id, const void * src_buf, hid_t type_id, size_t dst_buf_size, void * dst_buf, H5D_gather_func_t op, void * op_data)Gathers data from a selection in a memory buffer.
fnherr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t * offset, hsize_t * chunk_bytes)Returns the amount of storage required for a chunk.
fnherr_t H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t * nchunks)Returns the number of chunks in a dataset.
fnherr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t * offset, uint * filter_mask, haddr_t * addr, hsize_t * size)Retrieves information about a chunk by its index.
fnherr_t H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t * offset, uint * filter_mask, haddr_t * addr, hsize_t * size)Retrieves information about a chunk by its coordinates.
fnherr_t H5Dvlen_get_buf_size(hid_t dset_id, hid_t type_id, hid_t space_id, hsize_t * size)Determines the number of bytes required to store variable-length data.
fnherr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void * buf)Reclaims memory used by variable-length datatype data.
fnherr_t H5Dchunk_iter(hid_t dset_id, hid_t dxpl_id, H5D_chunk_iter_op_t cb, void * op_data)Iterates over all chunks in a dataset.
fnhid_t H5Dcreate1(hid_t loc_id, const char * name, hid_t type_id, hid_t space_id, hid_t dcpl_id)Creates a dataset (version 1, deprecated).
fnhid_t H5Dopen1(hid_t loc_id, const char * name)Opens a dataset (version 1, deprecated).
fnherr_t H5Dextend(hid_t dset_id, const hsize_t * size)Extends a dataset (deprecated, use H5Dset_extent).
fnherr_t H5Ddebug(hid_t dset_id)Prints debug information about a dataset.
fnherr_t H5Dformat_convert(hid_t dset_id)Converts a dataset's format.
fnherr_t H5Dget_chunk_index_type(hid_t dset_id, H5D_chunk_index_type_t * idx_type)Gets the chunk indexing type for a dataset.
fnherr_t H5Dread_multi(size_t count, hid_t * dset_id, hid_t * mem_type_id, hid_t * mem_space_id, hid_t * file_space_id, hid_t dxpl_id, void * * buf)Reads data from multiple datasets.
fnherr_t H5Dwrite_multi(size_t count, hid_t * dset_id, hid_t * mem_type_id, hid_t * mem_space_id, hid_t * file_space_id, hid_t dxpl_id, const(void *) * buf)Writes data to multiple datasets.

Variables 2

enumvarHADDR_UNDEF = haddr_t.max

Undefined address constant

enumvarH5S_ALL = 0

Select all elements in dataspace