kspaceFirstOrder3D-OMP
1.1
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
The class for 64b unsigned integers (indices). It is used for sensor_mask_index or sensor_corners_mask to get the address of sampled voxels. More...
#include <IndexMatrix.h>
Public Member Functions | |
TIndexMatrix (const TDimensionSizes &DimensionSizes) | |
Constructor allocating memory. More... | |
virtual | ~TIndexMatrix () |
Destructor. | |
virtual void | ReadDataFromHDF5File (THDF5_File &HDF5_File, const char *MatrixName) |
Read data from the HDF5 file. More... | |
virtual void | WriteDataToHDF5File (THDF5_File &HDF5_File, const char *MatrixName, const size_t CompressionLevel) |
Write data into the HDF5 file. More... | |
size_t & | operator[] (const size_t &index) |
const size_t & | operator[] (const size_t &index) const |
TDimensionSizes | GetTopLeftCorner (const size_t &index) const |
Get the top left corner of the index-th cuboid. More... | |
TDimensionSizes | GetBottomRightCorner (const size_t &index) const |
Get the bottom right corner of the index-th cuboid. More... | |
void | RecomputeIndicesToCPP () |
Recompute indices MATALAB->C++. More... | |
void | RecomputeIndicesToMatlab () |
Recompute indices C++ -> MATLAB. More... | |
size_t | GetTotalNumberOfElementsInAllCuboids () const |
Get the total number of elements to be sampled within all cuboids. More... | |
Public Member Functions inherited from TBaseIndexMatrix | |
TBaseIndexMatrix () | |
Default constructor. | |
struct TDimensionSizes | GetDimensionSizes () const |
Get dimension sizes of the matrix. | |
virtual size_t | GetTotalElementCount () const |
Get total element count of the matrix. | |
virtual size_t | GetTotalAllocatedElementCount () const |
Get total allocated element count (might differ from total element count used for the simulation because of padding). | |
virtual | ~TBaseIndexMatrix () |
Destructor. | |
virtual void | ZeroMatrix () |
Zero all elements of the matrix (NUMA first touch). More... | |
virtual size_t * | GetRawData () |
Get raw data out of the class (for direct kernel access). | |
virtual const size_t * | GetRawData () const |
Get raw data out of the class (for direct kernel access). | |
Public Member Functions inherited from TBaseMatrix | |
TBaseMatrix () | |
Default constructor. | |
virtual | ~TBaseMatrix () |
Destructor. | |
Protected Member Functions | |
TIndexMatrix () | |
Default constructor not allowed for public. | |
TIndexMatrix (const TIndexMatrix &src) | |
Copy constructor not allowed for public. | |
TIndexMatrix & | operator= (const TIndexMatrix &src) |
Operator = not allowed for public. | |
Protected Member Functions inherited from TBaseIndexMatrix | |
virtual void | AllocateMemory () |
Memory allocation. More... | |
virtual void | FreeMemory () |
Memory deallocation. More... | |
TBaseIndexMatrix (const TBaseIndexMatrix &src) | |
Copy constructor is not directly allowed. | |
TBaseIndexMatrix & | operator= (const TBaseIndexMatrix &src) |
operator = is not directly allowed. | |
Static Private Attributes | |
static const size_t | ChunkSize_1D_4MB = 1048576 |
Number of elements to get 4MB block of data. | |
static const size_t | ChunkSize_1D_1MB = 262144 |
Number of elements to get 1MB block of data. | |
static const size_t | ChunkSize_1D_256KB = 65536 |
Number of elements to get 256KB block of data. | |
Additional Inherited Members | |
Protected Attributes inherited from TBaseIndexMatrix | |
size_t | pTotalElementCount |
Total number of elements. | |
size_t | pTotalAllocatedElementCount |
Total number of allocated elements (the array size). | |
struct TDimensionSizes | pDimensionSizes |
Dimension sizes. | |
size_t | pDataRowSize |
Size of 1D row in X dimension. | |
size_t | p2DDataSliceSize |
Size of 2D slab (X,Y). | |
size_t * | pMatrixData |
Raw matrix data. | |
The class for 64b unsigned integers (indices). It is used for sensor_mask_index or sensor_corners_mask to get the address of sampled voxels.
Definition at line 50 of file IndexMatrix.h.
TIndexMatrix::TIndexMatrix | ( | const TDimensionSizes & | DimensionSizes | ) |
Constructor allocating memory.
[in] | DimensionSizes | - Dimension sizes |
Definition at line 61 of file IndexMatrix.cpp.
|
inline |
Get the top bottom right of the index-th cuboid. Cuboids are stored as 6-tuples (two 3D coordinates). This gives the first three coordinates
[in] | index | -Id of the corner |
Definition at line 116 of file IndexMatrix.h.
|
inline |
Get the top left corner of the index-th cuboid. Cuboids are stored as 6-tuples (two 3D coordinates). This gives the first three coordinates
[in] | index | - Id of the corner |
Definition at line 99 of file IndexMatrix.h.
size_t TIndexMatrix::GetTotalNumberOfElementsInAllCuboids | ( | ) | const |
Get total number of elements in all cuboids to be able to allocate output file.
Definition at line 152 of file IndexMatrix.cpp.
|
inline |
Operator [].
[in] | index | - 1D index into the matrix |
Definition at line 76 of file IndexMatrix.h.
|
inline |
Operator [], constant version
[in] | index | - 1D index into the matrix |
Definition at line 86 of file IndexMatrix.h.
|
virtual |
Read data from HDF5 file (only from the root group).
[in] | HDF5_File | - HDF5 file handle |
[in] | MatrixName | - HDF5 dataset name |
ios:failure | if there's an error |
Implements TBaseMatrix.
Definition at line 90 of file IndexMatrix.cpp.
void TIndexMatrix::RecomputeIndicesToCPP | ( | ) |
Recompute indeces, MATLAB -> C++.
Definition at line 124 of file IndexMatrix.cpp.
void TIndexMatrix::RecomputeIndicesToMatlab | ( | ) |
Recompute indeces, C++ -> MATLAB.
Definition at line 137 of file IndexMatrix.cpp.
|
virtual |
Write data to HDF5 file
[in] | HDF5_File | - HDF5 file handle |
[in] | MatrixName | - HDF5 Dataset name |
[in] | CompressionLevel | - Compression level |
ios:failure | if there's an error |
Implements TBaseMatrix.
Definition at line 173 of file IndexMatrix.cpp.