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 real matrices. More...
#include <RealMatrix.h>
Public Member Functions | |
TRealMatrix (const TDimensionSizes &DimensionSizes) | |
Constructor. More... | |
virtual | ~TRealMatrix () |
Destructor. | |
virtual void | ReadDataFromHDF5File (THDF5_File &HDF5_File, const char *MatrixName) |
Read data from the HDF5 file - only from the root group. More... | |
virtual void | WriteDataToHDF5File (THDF5_File &HDF5_File, const char *MatrixName, const size_t CompressionLevel) |
Write data into the HDF5 file. More... | |
float & | operator[] (const size_t &index) |
operator []. More... | |
const float & | operator[] (const size_t &index) const |
operator [], constant version. More... | |
float & | GetElementFrom3D (const size_t X, const size_t Y, const size_t Z) |
Get element from 3D matrix. More... | |
Public Member Functions inherited from TBaseFloatMatrix | |
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 | ~TBaseMatrix () |
Destructor. | |
Protected Member Functions | |
TRealMatrix () | |
Default constructor is not allowed for public. | |
TRealMatrix (const TRealMatrix &src) | |
Copy constructor not allowed for public. | |
TRealMatrix & | operator= (const TRealMatrix &src) |
Operator = is not allowed for public. | |
virtual void | InitDimensions (const TDimensionSizes &DimensionSizes) |
Init dimension. More... | |
Protected Member Functions inherited from TBaseFloatMatrix | |
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. | |
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 TBaseFloatMatrix | |
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. | |
The class for real matrices (floats)
Definition at line 48 of file RealMatrix.h.
TRealMatrix::TRealMatrix | ( | const TDimensionSizes & | DimensionSizes | ) |
Constructor.
[in] | DimensionSizes | - Dimension sizes |
Definition at line 60 of file RealMatrix.cpp.
|
inline |
Get element from 3D matrix.
[in] | X | - X dimension |
[in] | Y | - Y dimension |
[in] | Z | - Z dimension |
Definition at line 101 of file RealMatrix.h.
|
protectedvirtual |
Set necessary dimensions and auxiliary variables.
[in] | DimensionSizes | - 3D Dimension sizes |
Definition at line 171 of file RealMatrix.cpp.
|
inline |
operator [].
[in] | index | - 1D index |
Definition at line 76 of file RealMatrix.h.
|
inline |
operator [], constant version.
[in] | index | - 1D index |
Definition at line 88 of file RealMatrix.h.
|
virtual |
Read data data from HDF5 file (only from the root group).
[in] | HDF5_File | - HDF5 file |
[in] | MatrixName | - HDF5 dataset name |
ios::failure | if error occurred. |
Implements TBaseMatrix.
Definition at line 77 of file RealMatrix.cpp.
|
virtual |
Write data to HDF5 file (only from the root group)
[in] | HDF5_File | - HDF5 file |
[in] | MatrixName | - HDF5 Matrix name |
[in] | CompressionLevel | - Compression level |
ios::failure | if an error occurred |
Implements TBaseMatrix.
Definition at line 114 of file RealMatrix.cpp.