104 const size_t compressionLevel)
size_t nx
number of elements in the x direction
Abstract base class for float based matrices defining basic interface. Higher dimensional matrices st...
float * hostData
Raw CPU matrix data.
hid_t CreateFloatDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, const TDimensionSizes &chunkSizes, const size_t compressionLevel)
Create a float HDF5 dataset at a specified place in the file tree (3D/4D).
void WriteMatrixDomainType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDomainType &matrixDomainType)
Write matrix domain type into the dataset under the root group.
virtual void FreeMemory()
Memory allocation (both on CPU and GPU).
virtual void AllocateMemory()
Memory allocation (both on CPU and GPU).
The header file containing the class for real matrices.
struct TDimensionSizes dimensionSizes
Dimension sizes.
static const size_t CHUNK_SIZE_1D_256KB
Number of elements to get 256KB block of data.
THDF5_File::TMatrixDataType ReadMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName)
Read matrix data type from the dataset.
virtual void WriteDataToHDF5File(THDF5_File &file, TMatrixName &matrixName, const size_t compressionLevel)
Write data into the HDF5 file.
TErrorMessage ERR_FMT_MATRIX_NOT_FLOAT
Matrix class error message.
size_t nAllocatedElements
Total number of allocated elements (in terms of floats).
virtual void InitDimensions(const TDimensionSizes &dimensionSizes)
Init dimension sizes.
const std::string TMatrixName
Datatype for matrix names.
static const size_t CHUNK_SIZE_1D_1MB
Number of elements to get 1MB block of data.
void WriteMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDataType &matrixDataType)
Write matrix data type into the dataset under a specified group.
virtual ~TRealMatrix()
Destructor.
The header file containing a class responsible for printing out info and error messages (stdout...
static const size_t CHUNK_SIZE_1D_4MB
Number of elements to get 4MB block of data.
hid_t GetRootGroup() const
Get handle to the root group.
size_t ny
number of elements in the y direction
size_t nElements
Total number of elements.
The header file with the class for complex matrices.
TErrorMessage ERR_FMT_MATRIX_NOT_REAL
Matrix class error message.
static std::string FormatMessage(const std::string &format, Args...args)
C++-11 replacement for sprintf that works with std::string instead of char *.
THDF5_File::TMatrixDomainType ReadMatrixDomainType(const hid_t parentGroup, TMatrixName &datasetName)
Read matrix domain type from the dataset under a specified group.
size_t dataRowSize
Size of a 1D row in X dimension.
void WriteHyperSlab(const hid_t dataset, const TDimensionSizes &position, const TDimensionSizes &size, const float *data)
Write a hyper-slab into the dataset - float dataset.
size_t nz
number of elements in the z direction
virtual void ReadDataFromHDF5File(THDF5_File &file, TMatrixName &matrixName)
Read data from the HDF5 file - only from the root group.
void ReadCompleteDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, float *data)
Read data from the dataset under a specified group, float dataset.
size_t dataSlabSize
Size of a 2D slab.
void CloseDataset(const hid_t dataset)
Close the HDF5 dataset.
TRealMatrix()
Default constructor is not allowed for public.
Class wrapping the HDF5 routines.
Structure with 4D dimension sizes (3 in space and 1 in time).