High Performance Plasticity  0.5.0
hdfUtils.h File Reference

Header file for helper functions with HDF. More...

#include <stdexcept>
#include <cstddef>
#include <string>
#include <stdio.h>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include "mpi.h"
#include <hpp/config.h>
#include <hdf5/openmpi/hdf5.h>
Include dependency graph for hdfUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  hpp::HDFUtilsError
 
struct  hpp::hdf_complex_t
 A complex number type. More...
 
struct  hpp::HDFReadWriteParamsC
 
class  hpp::HDF5Handler
 

Namespaces

 hpp
 

Macros

#define HDFCHECK(ans)   hdfAssert((ans), __FILE__, __LINE__)
 
#define HDF_IGNORE_ERRORS(expr)   hdfSuppressErrors();expr;hdfRestoreErrors()
 

Enumerations

enum  hpp::HDFReadWrite : char { hpp::HDFReadWrite::Write ='w', hpp::HDFReadWrite::Read ='r' }
 

Functions

void hpp::hdfAssert (herr_t code, const char *file, int line)
 
void hpp::hdfSuppressErrors ()
 
void hpp::hdfRestoreErrors ()
 
template<typename T >
hid_t hpp::getHDF5TypeC ()
 Get HDF5 equivalent type. More...
 
template<typename T >
hid_t hpp::createHDF5Dataset (hid_t file_id, std::string datasetName, std::vector< hsize_t > dataDims)
 
template<typename T >
hid_t hpp::createHDF5GridOfArrays (hid_t file_id, std::string datasetName, std::vector< hsize_t > gridDims, std::vector< hsize_t > arrayDims)
 
template<typename T >
HDFReadWriteParamsC hpp::getReadWriteParametersForMultipleHDF5Arrays (hid_t dset_id, std::vector< hsize_t > gridOffset, std::vector< hsize_t > arrayDims, std::vector< hsize_t > arrayCount)
 Gets the parameters and ensures that they're compatible with the actual dataset. More...
 
template<typename T >
HDFReadWriteParamsC hpp::getReadWriteParametersForSingleHDF5Array (hid_t dset_id, std::vector< hsize_t > gridOffset, std::vector< hsize_t > arrayDims)
 Gets the parameters and ensures that they're compatible with the actual dataset. More...
 
template<typename T >
void hpp::readWriteHDF5SimpleArray (hid_t dset_id, hid_t plist_id, HDFReadWriteParamsC parms, T *output, HDFReadWrite mode)
 
template<typename T >
void hpp::readHDF5SimpleArray (hid_t dset_id, hid_t plist_id, HDFReadWriteParamsC parms, T *output)
 
template<typename T >
void hpp::writeHDF5SimpleArray (hid_t dset_id, hid_t plist_id, HDFReadWriteParamsC parms, T *output)
 
template<typename T >
void hpp::readSingleHDF5Array (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > gridOffset, std::vector< hsize_t > arrayDims, T *output)
 
template<typename T >
void hpp::readSingleHDF5Array (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > arrayDims, T *output)
 
template<typename T >
void hpp::writeSingleHDF5Array (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > gridOffset, std::vector< hsize_t > arrayDims, T *output)
 
template<typename T >
void hpp::writeSingleHDF5Array (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > arrayDims, T *output)
 
template<typename T >
void hpp::writeMultipleHDF5Arrays (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > gridOffset, std::vector< hsize_t > arrayDims, std::vector< hsize_t > arrayCount, T *output)
 
template<typename T >
void hpp::readMultipleHDF5Arrays (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > gridOffset, std::vector< hsize_t > arrayDims, std::vector< hsize_t > arrayCount, T *output)
 
template<typename T >
void hpp::readSingleHDF5Value (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > gridOffset, T *output)
 
template<typename T >
void hpp::writeSingleHDF5Value (hid_t dset_id, hid_t plist_id, std::vector< hsize_t > gridOffset, T *output)
 
std::vector< hsize_t > hpp::getDatasetDims (hid_t dset_id)
 

Detailed Description

Header file for helper functions with HDF.

Author
Michael Malahe

Uses the C interface and parallel implementation.

The only functionality here is creating, writing to and closing datasets. I/O, parallel or otherwise is left to the C API.

Macro Definition Documentation

#define HDF_IGNORE_ERRORS (   expr)    hdfSuppressErrors();expr;hdfRestoreErrors()
#define HDFCHECK (   ans)    hdfAssert((ans), __FILE__, __LINE__)