|
ritsuko
Helper utilities for ArtifactDB C++ code
|
Stream a 1-dimensional HDF5 numeric dataset into memory. More...
#include <Stream1dNumericDataset.hpp>
Public Member Functions | |
| Stream1dNumericDataset (DataSetPointer_ data_ptr, hsize_t length) | |
| hsize_t | chunk_size () const |
| hsize_t | load (Type_ *buffer) |
| hsize_t | start () const |
Stream a 1-dimensional HDF5 numeric dataset into memory.
| Type_ | Numeric type to represent the data in memory. |
| DataSetPointer_ | Class of a pointer to a H5::DataSet. This can be raw or smart depending on the caller's management of its lifetime. |
This streams in a 1-dimensional HDF5 numeric dataset in a chunk-wise manner. The aim is to enable inspection of the dataset contents while minimizing memory usage.
|
inline |
| data_ptr | Pointer to a HDF5 dataset. It is assumed that this dataset is 1-dimensional. It is also assumed that its datatype is an integer or float. |
If data_ptr is a raw pointer, it should not be deleted before the last call to any methods of this Stream1dNumericDataset instance.
| length | Length of the dataset, i.e., the extent of its sole dimension. |
|
inline |
|
inline |
Load the contents of the next chunk in the dataset.
| [out] | buffer | Pointer to an array of chunk_size(). On output, this contains the contents of the current chunk in its first ![]() ![]() |
|
inline |