|
hops
|
HighFive is a modern header-only C++11 friendly interface for libhdf5.
HighFive supports STL vector/string, Boost::UBLAS, Boost::Multi-array, Eigen and Xtensor. It handles C++ from/to HDF5 with automatic type mapping. HighFive does not require additional libraries (see dependencies) and supports both HDF5 thread safety and Parallel HDF5 (contrary to the official hdf5 cpp)
It integrates nicely with other CMake projects by defining (and exporting) a HighFive target.
std::vector and nested std::vector from/to any dataset with basic typesstd::string to/from variable length string datasetNote: H5File.hpp is the top-level header of HighFive core which should be always included.
Note: If you can use DataSpace::From on your data, you can combine the create and write into one statement. Such shortcut syntax is available for both createDataSet and createAttribute.
See select_partial_dataset_cpp11.cpp
See create_attribute_string_integer.cpp
See src/examples/ subdirectory for more info.
For several 'standard' use cases the highfive/H5Easy.hpp interface is available. It allows:
HIGHFIVE_USE_EIGEN),HIGHFIVE_USE_XTENSOR).HIGHFIVE_USE_OPENCV).whereby the int type of this example can be replaced by any of the above types. See easy_load_dump.cpp for more details.
Note: Classes such as H5Easy::File are just short for the regular HighFive classes (in this case HighFive::File). They can thus be used interchangeably.
HighFive can easily be used by other C++ CMake projects.
You may use HighFive from a folder in your project (typically a git submodule).
Alternativelly you can install HighFive once and use it in several projects via find_package().
A HighFive target will bring the compilation settings to find HighFive headers and all chosen dependencies.
Note: Like with other libraries you may need to provide CMake the location to find highfive: CMAKE_PREFIX_PATH=<highfive_install_dir>
Note: find_package(HighFive) will search dependencies as well (e.g. Boost if requested). In order to use the same dependencies found at HighFive install time (e.g. for system deployments) you may set HIGHFIVE_USE_INSTALL_DEPS=YES
When installing via CMake, besides the headers, a HighFiveConfig.cmake is generated which provides the HighFive target, as seen before. Note: You may need to set CMAKE_INSTALL_PREFIX: ```bash mkdir build && cd build
cmake .. -DHIGHFIVE_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX="<highfive_install_dir>" make install
Note: Unit tests require Boost. In case it's unavailable you may use -DHIGHFIVE_USE_BOOST=OFF. HighFive with disable support for Boost types as well as unit tests (though most examples will build).
See the list of contributors on GitHub
Originally created by Adrien Devresse adrien.devresse@epfl.ch - Blue Brain Project
Maintained by the Computing/HPC team, Blue Brain Project - EPFL
Boost Software License 1.0
1.8.17