Field3D
|
Namespaces | |
Hdf5Util | |
Contains utility functions and classes for Hdf5 files. | |
Classes | |
class | Hdf5Util::H5Base |
Base class for all scoped Hdf5 util classes. More... | |
class | Hdf5Util::H5ScopedAget_space |
Scoped object - opens an attribute data space on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedAget_type |
Scoped object - opens an attribute data type on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedAopen |
Scoped object - Opens attribute by name and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedAopenIdx |
Scoped object - Opens attribute by index and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedDcreate |
Scoped object - creates a dataset on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedDget_space |
Scoped object - opens a dataset on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedDget_type |
Scoped object - opens a dataset on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedDopen |
Scoped object - opens a dataset on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedGcreate |
Scoped object - creates a group on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedGopen |
Scoped object - opens a group on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedScreate |
Scoped object - creates a dataspace on creation and closes it on destruction. More... | |
class | Hdf5Util::H5ScopedTget_native_type |
Scoped object - opens an native type id on creation and closes it on destruction. More... | |
Functions | |
FIELD3D_API bool | Hdf5Util::checkHdf5Gzip () |
Checks whether gzip is available in the current hdf5 library. More... | |
Read/write simple data to hdf5 location | |
template<typename T > | |
void | Hdf5Util::writeSimpleData (hid_t location, const std::string &name, const std::vector< T > &data) |
Writes a simple linear data set to the given location. More... | |
template<typename T > | |
void | Hdf5Util::readSimpleData (hid_t location, const std::string &name, std::vector< T > &data) |
Reads a simple linear data set from the given location. More... | |
Attribute reading | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, std::string &value) |
Reads a string attribute. More... | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, unsigned int attrSize, int &value) |
Reads an int attribute of arbitrary size. More... | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, unsigned int attrSize, float &value) |
Reads a float attribute of arbitrary size. More... | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, unsigned int attrSize, double &value) |
Reads a double attribute of arbitrary size. More... | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, std::vector< unsigned int > &attrSize, int &value) |
Reads a int attribute of arbitrary size and rank. More... | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, std::vector< unsigned int > &attrSize, float &value) |
Reads a float attribute of arbitrary size and rank. More... | |
FIELD3D_API bool | Hdf5Util::readAttribute (hid_t location, const std::string &attrName, std::vector< unsigned int > &attrSize, double &value) |
Reads a double attribute of arbitrary size and rank. More... | |
Attribute writing | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, const std::string &value) |
Writes a string attribute. More... | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, unsigned int attrSize, const int &value) |
Writes an int attribute of arbitrary size. More... | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, unsigned int attrSize, const float &value) |
Writes a float attribute of arbitrary size. More... | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, unsigned int attrSize, const double &value) |
Writes a double attribute of arbitrary size. More... | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, std::vector< unsigned int > &attrSize, const int &value) |
Writes a float attribute of arbitrary size and rank. More... | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, std::vector< unsigned int > &attrSize, const float &value) |
Writes a float attribute of arbitrary size and rank. More... | |
FIELD3D_API bool | Hdf5Util::writeAttribute (hid_t location, const std::string &attrName, std::vector< unsigned int > &attrSize, const double &value) |
Writes a double attribute of arbitrary size and rank. More... | |
void Hdf5Util::writeSimpleData | ( | hid_t | location, |
const std::string & | name, | ||
const std::vector< T > & | data | ||
) |
Writes a simple linear data set to the given location.
Definition at line 572 of file Hdf5Util.h.
References FieldTraits< Data_T >::dataDims(), g_hdf5Mutex, DataTypeTraits< T >::h5type(), and Hdf5Util::H5Base::id().
Referenced by Hdf5Util::H5ScopedDget_type::~H5ScopedDget_type().
void Hdf5Util::readSimpleData | ( | hid_t | location, |
const std::string & | name, | ||
std::vector< T > & | data | ||
) |
Reads a simple linear data set from the given location.
Definition at line 611 of file Hdf5Util.h.
References FieldTraits< Data_T >::dataDims(), FIELD3D_NAMESPACE_HEADER_CLOSE, g_hdf5Mutex, and DataTypeTraits< T >::h5type().
Referenced by Hdf5Util::H5ScopedDget_type::~H5ScopedDget_type().
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::string & | value | ||
) |
Reads a string attribute.
Referenced by Field3DInputFile::open(), Field3DInputFile::parseLayer(), InputFile::parseLayers(), MACFieldIO::read(), MIPFieldIO::read(), DenseFieldIO::read(), SparseFieldIO::read(), NullFieldMappingIO::read(), MatrixFieldMappingIO::read(), FrustumFieldMappingIO::read(), SparseFieldIO::readData(), readFieldMapping(), Field3DInputFile::readGroupMembership(), MIPFieldIO::readInternal(), Field3DInputFile::readLayer(), Field3DInputFile::readMetadata(), Field3DInputFile::readProxyLayer(), and Hdf5Util::H5ScopedDget_type::~H5ScopedDget_type().
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
unsigned int | attrSize, | ||
int & | value | ||
) |
Reads an int attribute of arbitrary size.
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
unsigned int | attrSize, | ||
float & | value | ||
) |
Reads a float attribute of arbitrary size.
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
unsigned int | attrSize, | ||
double & | value | ||
) |
Reads a double attribute of arbitrary size.
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::vector< unsigned int > & | attrSize, | ||
int & | value | ||
) |
Reads a int attribute of arbitrary size and rank.
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::vector< unsigned int > & | attrSize, | ||
float & | value | ||
) |
Reads a float attribute of arbitrary size and rank.
FIELD3D_API bool Hdf5Util::readAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::vector< unsigned int > & | attrSize, | ||
double & | value | ||
) |
Reads a double attribute of arbitrary size and rank.
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
const std::string & | value | ||
) |
Writes a string attribute.
Referenced by Field3DOutputFile::create(), Field3DOutputFile::createNewPartition(), MACFieldIO::write(), DenseFieldIO::write(), SparseFieldIO::write(), MIPFieldIO::write(), NullFieldMappingIO::write(), MatrixFieldMappingIO::write(), FrustumFieldMappingIO::write(), writeField(), writeFieldMapping(), Field3DOutputFile::writeGroupMembership(), MACFieldIO::writeInternal(), DenseFieldIO::writeInternal(), SparseFieldIO::writeInternal(), MIPFieldIO::writeInternal(), Field3DOutputFile::writeLayer(), Field3DOutputFile::writeMetadata(), and Hdf5Util::H5ScopedDget_type::~H5ScopedDget_type().
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
unsigned int | attrSize, | ||
const int & | value | ||
) |
Writes an int attribute of arbitrary size.
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
unsigned int | attrSize, | ||
const float & | value | ||
) |
Writes a float attribute of arbitrary size.
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
unsigned int | attrSize, | ||
const double & | value | ||
) |
Writes a double attribute of arbitrary size.
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::vector< unsigned int > & | attrSize, | ||
const int & | value | ||
) |
Writes a float attribute of arbitrary size and rank.
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::vector< unsigned int > & | attrSize, | ||
const float & | value | ||
) |
Writes a float attribute of arbitrary size and rank.
FIELD3D_API bool Hdf5Util::writeAttribute | ( | hid_t | location, |
const std::string & | attrName, | ||
std::vector< unsigned int > & | attrSize, | ||
const double & | value | ||
) |
Writes a double attribute of arbitrary size and rank.
bool Hdf5Util::checkHdf5Gzip | ( | ) |
Checks whether gzip is available in the current hdf5 library.
Definition at line 722 of file Hdf5Util.cpp.
References FIELD3D_NAMESPACE_SOURCE_CLOSE, and g_hdf5Mutex.
Referenced by MACFieldIO::writeData(), DenseFieldIO::writeInternal(), SparseFieldIO::writeInternal(), and Hdf5Util::H5ScopedDget_type::~H5ScopedDget_type().