Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
HDF5::internal Namespace Reference

Namespaces

namespace  HDF5ObjectImplementation
 

Functions

template<typename number >
std::shared_ptr< hid_t > get_hdf5_datatype ()
 
template<typename number >
std::vector< hsize_t > get_container_dimensions (const std::vector< number > &data)
 
template<typename number >
std::vector< hsize_t > get_container_dimensions (const Vector< number > &data)
 
template<typename number >
std::vector< hsize_t > get_container_dimensions (const FullMatrix< number > &data)
 
template<typename number >
unsigned int get_container_size (const std::vector< number > &data)
 
template<typename number >
unsigned int get_container_size (const Vector< number > &data)
 
template<typename number >
unsigned int get_container_size (const FullMatrix< number > &data)
 
template<typename Container >
std::enable_if_t< std::is_same_v< Container, std::vector< typename Container::value_type > >, Container > initialize_container (const std::vector< hsize_t > &dimensions)
 
template<typename Container >
std::enable_if_t< std::is_same_v< Container, Vector< typename Container::value_type > >, Container > initialize_container (const std::vector< hsize_t > &dimensions)
 
template<typename Container >
std::enable_if_t< std::is_same_v< Container, FullMatrix< typename Container::value_type > >, Container > initialize_container (const std::vector< hsize_t > &dimensions)
 
void set_plist (hid_t &plist, const bool mpi)
 
void release_plist (hid_t &plist, H5D_mpio_actual_io_mode_t &io_mode, std::uint32_t &local_no_collective_cause, std::uint32_t &global_no_collective_cause, const bool mpi, const bool query_io_mode)
 
std::string no_collective_cause_to_string (const std::uint32_t no_collective_cause)
 

Function Documentation

◆ get_hdf5_datatype()

template<typename number >
std::shared_ptr< hid_t > HDF5::internal::get_hdf5_datatype ( )

This function returns the HDF5 datatype corresponding to the C++ type. In the case of std::complex types the HDF5 handlers are automatically freed using the destructor of std::shared_ptr. std::shared_ptr is used instead of std::unique_ptr because the destructor of std::shared_ptr doesn't have to be defined in the template argument. In the other hand, the destructor of std::unique has to be defined in the template argument. Native types such as H5T_NATIVE_DOUBLE do not require a destructor, but compound types such as std::complex<double> require a destructor to free the HDF5 resources.

Definition at line 1275 of file hdf5.h.

◆ get_container_dimensions() [1/3]

template<typename number >
std::vector< hsize_t > HDF5::internal::get_container_dimensions ( const std::vector< number > & data)

Return the dimensions of data. For a std::vector this function returns std::vector<hsize_t>{vector_size}.

Several HDF5 functions such as H5Screate_simple() require a one-dimensional array that specifies the size of each dimension of the container, see: https://support.hdfgroup.org/HDF5/doc1.8/RM/RM_H5S.html#Dataspace-CreateSimple

Definition at line 1362 of file hdf5.h.

◆ get_container_dimensions() [2/3]

template<typename number >
std::vector< hsize_t > HDF5::internal::get_container_dimensions ( const Vector< number > & data)

Return the dimensions of data. For a Vector this function returns std::vector<hsize_t>{vector_size}.

Definition at line 1372 of file hdf5.h.

◆ get_container_dimensions() [3/3]

template<typename number >
std::vector< hsize_t > HDF5::internal::get_container_dimensions ( const FullMatrix< number > & data)

Return the dimensions of data. For a FullMatrix the function returns std::vector<hsize_t>{rows, columns}.

Definition at line 1382 of file hdf5.h.

◆ get_container_size() [1/3]

template<typename number >
unsigned int HDF5::internal::get_container_size ( const std::vector< number > & data)

This function returns the total size of the container. For a std::vector the function returns int(vector_size).

Definition at line 1392 of file hdf5.h.

◆ get_container_size() [2/3]

template<typename number >
unsigned int HDF5::internal::get_container_size ( const Vector< number > & data)

This function returns the total size of the container. For a Vector the function returns int(vector_size).

Definition at line 1401 of file hdf5.h.

◆ get_container_size() [3/3]

template<typename number >
unsigned int HDF5::internal::get_container_size ( const FullMatrix< number > & data)

This function returns the total size of the container. For a FullMatrix the function returns int(rows*columns).

Definition at line 1410 of file hdf5.h.

◆ initialize_container() [1/3]

template<typename Container >
std::enable_if_t< std::is_same_v< Container, std::vector< typename Container::value_type > >, Container > HDF5::internal::initialize_container ( const std::vector< hsize_t > & dimensions)

This function initializes and returns a container of type std::vector, Vector or FullMatrix. The function does not set the values of the elements of the container. The container can store data of a HDF5 dataset or a HDF5 selection. The dimensions parameter holds the dimensions of the HDF5 dataset or selection.

In the case of a std::vector, the size of the vector will be the total size given by dimensions. For example in the case of a dataset of rank 3, the dimensions are std::vector<hsize_t>{dim_0,dim_1,dim_2}. The size of the returned std::vector will be dim_0*dim_1*dim_2.

In the case of a Vector, the size of the returned Vector will be as well dim_0*dim_1*dim_2.

A FullMatrix can store only data of HDF5 datasets with rank 2. The size of the FullMatrix will be FullMatrix(dim_0,dim_2)

Definition at line 1421 of file hdf5.h.

◆ initialize_container() [2/3]

template<typename Container >
std::enable_if_t< std::is_same_v< Container, Vector< typename Container::value_type > >, Container > HDF5::internal::initialize_container ( const std::vector< hsize_t > & dimensions)

Same as above.

Definition at line 1433 of file hdf5.h.

◆ initialize_container() [3/3]

template<typename Container >
std::enable_if_t< std::is_same_v< Container, FullMatrix< typename Container::value_type > >, Container > HDF5::internal::initialize_container ( const std::vector< hsize_t > & dimensions)

Same as above.

Definition at line 1445 of file hdf5.h.

◆ set_plist()

void HDF5::internal::set_plist ( hid_t & plist,
const bool mpi )
inline

This helper function sets the property list of the read and write operations of DataSet. A property list has to be created for the MPI driver. For the serial driver the default H5P_DEFAULT can be used. In addition H5Pset_dxpl_mpio is used to set the MPI mode to collective.

Definition at line 1472 of file hdf5.h.

◆ release_plist()

void HDF5::internal::release_plist ( hid_t & plist,
H5D_mpio_actual_io_mode_t & io_mode,
std::uint32_t & local_no_collective_cause,
std::uint32_t & global_no_collective_cause,
const bool mpi,
const bool query_io_mode )
inline

This helper function releases the property list handler of the read and write operations of DataSet. For the serial version there is no need to release the property list handler because H5P_DEFAULT has been used. If query_io_mode is True then H5Pget_mpio_actual_io_mode and H5Pget_mpio_no_collective_cause are used to check if the operation has been collective.

Definition at line 1497 of file hdf5.h.

◆ no_collective_cause_to_string()

std::string HDF5::internal::no_collective_cause_to_string ( const std::uint32_t no_collective_cause)
inline

Convert a HDF5 no_collective_cause code to a human readable string.

Definition at line 1536 of file hdf5.h.