kspaceFirstOrder3D-OMP
1.1
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
Abstract base class for float based matrices defining basic interface. Higher dimensional matrices stored as 1D arrays, row-major order. More...
#include <BaseFloatMatrix.h>
Public Member Functions | |
TBaseFloatMatrix () | |
Default constructor. | |
virtual TDimensionSizes | GetDimensionSizes () const |
Get dimension sizes of the matrix. | |
virtual size_t | GetTotalElementCount () const |
Get 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 | ~TBaseFloatMatrix () |
Destructor. | |
virtual void | CopyData (const TBaseFloatMatrix &src) |
Copy data from other matrix with the same size. More... | |
virtual void | ZeroMatrix () |
Zero all elements of the matrix (NUMA first touch). More... | |
virtual void | ScalarDividedBy (const float scalar) |
Divide scalar/ matrix_element[i]. More... | |
virtual float * | GetRawData () |
Get raw data out of the class (for direct kernel access). | |
virtual const float * | GetRawData () const |
Get raw data out of the class (for direct kernel access). | |
Public Member Functions inherited from TBaseMatrix | |
TBaseMatrix () | |
Default constructor. | |
virtual void | ReadDataFromHDF5File (THDF5_File &HDF5_File, const char *MatrixName)=0 |
Read matrix from the HDF5 file. More... | |
virtual void | WriteDataToHDF5File (THDF5_File &HDF5_File, const char *MatrixName, const size_t CompressionLevel)=0 |
Write data into the HDF5 file. More... | |
virtual | ~TBaseMatrix () |
Destructor. | |
Protected Member Functions | |
virtual void | AllocateMemory () |
Memory allocation. More... | |
virtual void | FreeMemory () |
Memory deallocation. More... | |
TBaseFloatMatrix (const TBaseFloatMatrix &src) | |
Copy constructor is not directly allowed. | |
TBaseFloatMatrix & | operator= (const TBaseFloatMatrix &src) |
operator = is not directly allowed. | |
Protected Attributes | |
size_t | pTotalElementCount |
Total number of elements. | |
size_t | pTotalAllocatedElementCount |
Total number of allocated elements (in terms of floats). | |
struct TDimensionSizes | pDimensionSizes |
Dimension sizes. | |
size_t | pDataRowSize |
Size of a 1D row in X dimension. | |
size_t | p2DDataSliceSize |
Size of a 2D slab (X,Y). | |
float * | pMatrixData |
Raw matrix data. | |
Abstract base class for float based matrices defining basic interface. Higher dimensional matrices stored as 1D arrays, row-major order.
Definition at line 52 of file BaseFloatMatrix.h.
|
protectedvirtual |
Memory allocation based on the total number of elements.
Memory is aligned by the DATA_ALIGNMENT and all elements are zeroed.
Reimplemented in TFFTWComplexMatrix.
Definition at line 115 of file BaseFloatMatrix.cpp.
|
virtual |
Copy data from another matrix with same size.
[in] | src | - source matrix |
Definition at line 66 of file BaseFloatMatrix.cpp.
|
protectedvirtual |
Free memory.
Reimplemented in TFFTWComplexMatrix.
Definition at line 135 of file BaseFloatMatrix.cpp.
|
virtual |
Divide a scalar by the elements of matrix.
[in] | scalar | - scalar to be divided |
Definition at line 94 of file BaseFloatMatrix.cpp.
|
virtual |
Zero all allocated elements in parallel.
Also work as the first touch strategy on NUMA machines
Definition at line 78 of file BaseFloatMatrix.cpp.