109 const size_t compressionLevel)
191 #pragma omp parallel for if (nElements > 1e5)
204 #pragma omp parallel for if (nElements > 1e5)
219 size_t elementSum = 0;
size_t nx
number of elements in the x direction
size_t GetTotalNumberOfElementsInAllCuboids() const
Get the total number of elements to be sampled within all cuboids.
void WriteMatrixDomainType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDomainType &matrixDomainType)
Write matrix domain type into the dataset under the root group.
TDimensionSizes GetBottomRightCorner(const size_t &index) const
Get the bottom right corner of the index-th cuboid.
virtual void WriteDataToHDF5File(THDF5_File &file, TMatrixName &matrixName, const size_t compressionLevel)
Write data into the HDF5 file.
THDF5_File::TMatrixDataType ReadMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName)
Read matrix data type from the dataset.
size_t nAllocatedElements
Total number of allocated elements (the array size).
const std::string TMatrixName
Datatype for matrix names.
void RecomputeIndicesToMatlab()
Recompute indices C++ -> MATLAB.
TIndexMatrix()
Default constructor not allowed for public.
virtual ~TIndexMatrix()
Destructor.
void WriteMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDataType &matrixDataType)
Write matrix data type into the dataset under a specified group.
virtual void AllocateMemory()
Memory allocation (both on CPU and GPU)
The header file containing a class responsible for printing out info and error messages (stdout...
virtual void ReadDataFromHDF5File(THDF5_File &file, TMatrixName &matrixName)
Read data from the HDF5 file.
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.
struct TDimensionSizes dimensionSizes
Dimension sizes.
hid_t GetRootGroup() const
Get handle to the root group.
size_t ny
number of elements in the y direction
size_t * hostData
Raw CPU matrix data.
Abstract base class for index based matrices defining basic interface. Higher dimensional matrices st...
virtual size_t GetElementCount() const
Get total element count of the matrix.
void RecomputeIndicesToCPP()
Recompute indices MATALAB->C++.
TErrorMessage ERR_FMT_MATRIX_NOT_REAL
Matrix class error message.
size_t rowSize
Size of 1D row in X dimension.
static const size_t CHUNK_SIZE_1D_4MB
Number of elements to get 4MB block of data.
hid_t CreateIndexDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, const TDimensionSizes &chunkSizes, const size_t compressionLevel)
Create an index HDF5 dataset at a specified place in the file tree (3D only).
TErrorMessage ERR_FMT_MATRIX_NOT_INDEX
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.
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 nElements
Total number of elements.
size_t slabSize
Size of 2D slab (X,Y).
size_t nz
number of elements in the z direction
void ReadCompleteDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, float *data)
Read data from the dataset under a specified group, float dataset.
void CloseDataset(const hid_t dataset)
Close the HDF5 dataset.
static const size_t CHUNK_SIZE_1D_1MB
Number of elements to get 1MB block of data.
Class wrapping the HDF5 routines.
Structure with 4D dimension sizes (3 in space and 1 in time).
virtual void FreeMemory()
Memory deallocation (both on CPU and GPU)
static const size_t CHUNK_SIZE_1D_256KB
Number of elements to get 256KB block of data.