kspaceFirstOrder3D-OMP
1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
Abstract base class for index based matrices defining basic interface. Higher dimensional matrices stored as 1D arrays, row-major order. More...
#include <BaseIndexMatrix.h>
Public Member Functions | |
BaseIndexMatrix () | |
Default constructor. More... | |
BaseIndexMatrix (const BaseIndexMatrix &)=delete | |
Copy constructor is not allowed. | |
virtual | ~BaseIndexMatrix () |
Destructor. | |
BaseIndexMatrix & | operator= (const BaseIndexMatrix &)=delete |
operator= is not allowed. | |
virtual const DimensionSizes & | getDimensionSizes () const |
Get dimension sizes of the matrix. More... | |
virtual size_t | size () const |
Size of the matrix. More... | |
virtual size_t | capacity () const |
The capacity of the matrix (this may differ from size due to padding, etc.). More... | |
virtual void | zeroMatrix () |
Zero all elements of the matrix (NUMA first touch). More... | |
virtual size_t * | getData () |
Get raw data out of the class (for direct kernel access). More... | |
virtual const size_t * | getData () const |
Get raw data out of the class (for direct kernel access), const version. More... | |
Public Member Functions inherited from BaseMatrix | |
BaseMatrix () | |
Default constructor. | |
BaseMatrix (const BaseMatrix &)=delete | |
Copy constructor is not allowed. | |
virtual | ~BaseMatrix () |
Destructor. | |
BaseMatrix & | operator= (const BaseMatrix &)=delete |
Operator= is not allowed. | |
virtual void | readData (Hdf5File &file, MatrixName &matrixName)=0 |
Read matrix from HDF5 file. More... | |
virtual void | writeData (Hdf5File &file, MatrixName &matrixName, const size_t compressionLevel)=0 |
Write data into HDF5 file. More... | |
Protected Member Functions | |
virtual void | allocateMemory () |
Aligned memory allocation (both on CPU and GPU). More... | |
virtual void | freeMemory () |
Memory deallocation (both on CPU and GPU) More... | |
Protected Attributes | |
size_t | mSize |
Total number of elements. | |
size_t | mCapacity |
Total number of allocated elements (in terms of size_t). | |
DimensionSizes | mDimensionSizes |
Dimension sizes. | |
size_t | mRowSize |
Size of 1D row in X dimension. | |
size_t | mSlabSize |
Size of a XY slab. | |
size_t * | mData |
Raw matrix data. | |
Abstract base class for index based matrices defining basic interface. Higher dimensional matrices stored as 1D arrays, row-major order. The I/O is done via HDF5 files.
Definition at line 49 of file BaseIndexMatrix.h.
BaseIndexMatrix::BaseIndexMatrix | ( | ) |
Default constructor
Definition at line 54 of file BaseIndexMatrix.cpp.
|
protectedvirtual |
std::bad_alloc | - If there's not enough memory. |
Memory allocation based on the capacity and aligned based on kDataAlignment.
Definition at line 86 of file BaseIndexMatrix.cpp.
|
inlinevirtual |
Implements BaseMatrix.
Definition at line 77 of file BaseIndexMatrix.h.
|
protectedvirtual |
Free memory.
Definition at line 105 of file BaseIndexMatrix.cpp.
|
inlinevirtual |
Definition at line 86 of file BaseIndexMatrix.h.
|
inlinevirtual |
Definition at line 92 of file BaseIndexMatrix.h.
|
inlinevirtual |
Implements BaseMatrix.
Definition at line 66 of file BaseIndexMatrix.h.
|
inlinevirtual |
|
virtual |
Zero all allocated elements.
Definition at line 68 of file BaseIndexMatrix.cpp.