| kspaceFirstOrder3D-OMP 1.1 The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TBaseIndexMatrix Class Reference

Abstract base class for index based matrices defining basic interface. Higher dimensional matrices stored as 1D arrays, row-major order. More...

`#include <BaseIndexMatrix.h>`

Inheritance diagram for TBaseIndexMatrix:
[legend]
Collaboration diagram for TBaseIndexMatrix:
[legend]

## Public Member Functions
| 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 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...
| TBaseIndexMatrix (const TBaseIndexMatrix &src)
| Copy constructor is not directly allowed.
TBaseIndexMatrix & | operator= (const TBaseIndexMatrix &src)
| operator = is not directly allowed.

## Protected Attributes
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.

## Detailed Description

Abstract base class for index based matrices defining basic interface. Higher dimensional matrices stored as 1D arrays, row-major order.

Definition at line 54 of file BaseIndexMatrix.h.

## Member Function Documentation

void TBaseIndexMatrix::AllocateMemory | ( |  | ) |
| protected virtual

Memory allocation based on the total number of elements.
Memory is aligned by the DATA_ALIGNMENT and all elements are zeroed.

Definition at line 84 of file BaseIndexMatrix.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TBaseIndexMatrix::FreeMemory | ( |  | ) |
| protected virtual

Free memory.

Definition at line 104 of file BaseIndexMatrix.cpp.

Here is the caller graph for this function:

void TBaseIndexMatrix::ZeroMatrix | ( |  | ) |
| virtual

Zero all allocated elements.

Todo:
  : This breaks the first touch policy! - however we don't know the distribution

Definition at line 65 of file BaseIndexMatrix.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files:

- MatrixClasses/BaseIndexMatrix.h
- MatrixClasses/BaseIndexMatrix.cpp