In case it's unavailable you may use -DHIGHFIVE_USE_BOOST=OFF. See src/examples/ subdirectory for more info. See create_attribute_string_integer.cpp And others See select_partial_dataset_cpp11.cpp Create, write and list HDF5 attributes See boost_ublas_double.cpp Write and read a subset of a 2D double dataset See create_dataset_double.cpp Write and read a matrix of double float (boost::ublas) to a 2D HDF5 dataset Write a 2 dimensional C double float array to a 2D HDF5 dataset This is common in MPI-IO related patterns, or when growing aĭataset over the course of a simulation. Note: For advanced usecases the dataset can be created without immediately Note: H5File.hpp is the top-level header of HighFive core which should be always included. Because `data` has the correct size, this will // not cause `data` to be reallocated: Read back, with allocating: auto data = dataset. We create an empty HDF55 file, by truncating an existing // file if required:Īuto dataset = file. Std::string filename = "/tmp/new_file.h5 " The support of fixed length strings isn't ideal.Įxamples Write a std::vector to 1D HDF5 dataset and read it back.Eigen support in core HighFive is broken.Users have reported that HighFive is not thread-safe even when using the threadsafe HDF5 library, e.g., #675. However, HighFive objects modify their members without protecting these writes. At best it has the same limitations as the HDF5 library. half (optional, opt-in with -D HIGHFIVE_USE_HALF_FLOAT=ON).xtensor (optional, opt-in with -D HIGHFIVE_USE_XTENSOR=ON).eigen3 (optional, opt-in with -D HIGHFIVE_USE_EIGEN=ON).boost >= 1.41 (recommended, opt-out with -D HIGHFIVE_USE_BOOST=OFF).hdf5-mpi (optional, opt-in with -D HIGHFIVE_PARALLEL_HDF5=ON).std::byte in C++17 mode (with -DCMAKE_CXX_STANDARD=17 or higher).half-precision (16-bit) floating-point datasets.Advanced types: Compound, Enum, Arrays of Fixed-length strings, References.parallel Read/Write operations from several nodes with Parallel HDF5.automatic conversion of std::string to/from variable length string dataset.automatic conversion of std::vector and nested std::vector from/to any dataset with basic types.automatic memory management / ref counting.create/read/write files, datasets, attributes, groups, dataspaces. ![]() It integrates nicely with other CMake projects by defining (and exporting) a HighFive target. HighFive does not require additional libraries (see dependencies). It handles C++ from/to HDF5 with automatic type mapping. HighFive supports STL vector/string, Boost::UBLAS, Boost::Multi-array and Xtensor. HighFive is a modern header-only C++11 friendly interface for libhdf5.
0 Comments
Leave a Reply. |