91 const char * MatrixName)
96 char ErrorMessage[256];
98 throw ios::failure(ErrorMessage);
104 char ErrorMessage[256];
106 throw ios::failure(ErrorMessage);
126 #pragma omp parallel for if (pTotalElementCount > 1e5)
139 #pragma omp parallel for if (pTotalElementCount > 1e5)
154 size_t ElementSum = 0;
174 const char * MatrixName,
175 const size_t CompressionLevel)
215 THDF5_File::hdf5_mdt_long);
219 THDF5_File::hdf5_mdt_real);
size_t Z
Z dimension size.
static const size_t ChunkSize_1D_256KB
Number of elements to get 256KB block of data.
size_t GetTotalNumberOfElementsInAllCuboids() const
Get the total number of elements to be sampled within all cuboids.
THDF5_File::THDF5_MatrixDataType ReadMatrixDataType(const hid_t ParentGroup, const char *DatasetName)
Read matrix data type from the dataset.
TDimensionSizes GetBottomRightCorner(const size_t &index) const
Get the bottom right corner of the index-th cuboid.
size_t X
X dimension size.
void RecomputeIndicesToMatlab()
Recompute indices C++ -> MATLAB.
TIndexMatrix()
Default constructor not allowed for public.
void WriteHyperSlab(const hid_t HDF5_Dataset_id, const TDimensionSizes &Position, const TDimensionSizes &Size, const float *Data)
Write a hyper-slab into the dataset - float dataset.
virtual void AllocateMemory()
Memory allocation.
void WriteMatrixDataType(const hid_t ParentGroup, const char *DatasetName, const THDF5_MatrixDataType &MatrixDataType)
Write matrix data type into the dataset under a specified group.
size_t pTotalAllocatedElementCount
Total number of allocated elements (the array size).
void WriteMatrixDomainType(const hid_t ParentGroup, const char *DatasetName, const THDF5_MatrixDomainType &MatrixDomainType)
Write matrix domain type into the dataset under the root group.
static const size_t ChunkSize_1D_1MB
Number of elements to get 1MB block of data.
TDimensionSizes GetTopLeftCorner(const size_t &index) const
Get the top left corner of the index-th cuboid.
The header file containing the class for 64b integer matrices.
hid_t GetRootGroup() const
Get handle to the root group.
The header file containing all error messages of the project.
Abstract base class for index based matrices defining basic interface. Higher dimensional matrices st...
THDF5_File::THDF5_MatrixDomainType ReadMatrixDomainType(const hid_t ParentGroup, const char *DatasetName)
Read matrix domain type from the dataset under a specified group.
struct TDimensionSizes pDimensionSizes
Dimension sizes.
void RecomputeIndicesToCPP()
Recompute indices MATALAB->C++.
size_t Y
Y dimension size.
size_t * pMatrixData
Raw matrix data.
size_t p2DDataSliceSize
Size of 2D slab (X,Y).
void ReadCompleteDataset(const hid_t ParentGroup, const char *DatasetName, const TDimensionSizes &DimensionSizes, float *Data)
Read data from the dataset under a specified group - float dataset.
size_t pTotalElementCount
Total number of elements.
virtual void WriteDataToHDF5File(THDF5_File &HDF5_File, const char *MatrixName, const size_t CompressionLevel)
Write data into the HDF5 file.
const char *const Matrix_ERR_FMT_MatrixNotLong
Matrix class error message.
hid_t CreateIndexDataset(const hid_t ParentGroup, const char *DatasetName, const TDimensionSizes &DimensionSizes, const TDimensionSizes &ChunkSizes, const size_t CompressionLevel)
Create the HDF5 dataset at a specified place in the file tree (3D only).
virtual void ReadDataFromHDF5File(THDF5_File &HDF5_File, const char *MatrixName)
Read data from the HDF5 file.
void CloseDataset(const hid_t HDF5_Dataset_id)
Close the HDF5 dataset.
const char *const Matrix_ERR_FMT_MatrixNotReal
Matrix class error message.
static const size_t ChunkSize_1D_4MB
Number of elements to get 4MB block of data.
Class wrapping the HDF5 routines.
size_t pDataRowSize
Size of 1D row in X dimension.
Structure with 4D dimension sizes (3 in space and 1 in time).