TRIQS/h5 2.0.0
C++ interface to HDF5
Loading...
Searching...
No Matches
scalar.hpp
#include "./array_interface.hpp"
#include "./complex.hpp"
#include "./group.hpp"
#include "./macros.hpp"
#include "./object.hpp"
#include <cmath>
#include <string>
#include <type_traits>

Detailed Description

Provides a generic interface to read/write scalars from/to HDF5.

Definition in file scalar.hpp.

Go to the source code of this file.

Functions

template<typename T>
array_view h5::array_interface::array_view_from_scalar (T &x)
 Create an array view for a scalar.
template<typename T>
requires (std::is_arithmetic_v<T> or is_complex_v<T> or std::is_same_v<T, dcplx_t>)
void h5::h5_read (group g, std::string const &name, T &x)
 Read a scalar from an HDF5 dataset.
template<typename T>
requires (std::is_arithmetic_v<T> or is_complex_v<T>)
void h5::h5_read_attribute (object obj, std::string const &name, T &x)
 Read a scalar from an HDF5 attribute.
template<typename T>
requires (std::is_arithmetic_v<T> or is_complex_v<T> or std::is_same_v<T, dcplx_t>)
void h5::h5_write (group g, std::string const &name, T const &x)
 Write a scalar to an HDF5 dataset.
template<typename T>
requires (std::is_arithmetic_v<T> or is_complex_v<T>)
void h5::h5_write_attribute (object obj, std::string const &name, T const &x)
 Write a scalar to an HDF5 attribute.