kspaceFirstOrder3D-OMP 1.0
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
Public Member Functions | Protected Member Functions | Protected Attributes
TBaseFloatMatrix Class Reference

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

#include <BaseFloatMatrix.h>

Inheritance diagram for TBaseFloatMatrix:
Inheritance graph
[legend]
Collaboration diagram for TBaseFloatMatrix:
Collaboration graph
[legend]

List of all members.

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 (TBaseFloatMatrix &src)
 Copy data from other matrix with the same size.
virtual void ZeroMatrix ()
 Zero all elements of the matrix (NUMA first touch).
virtual void ScalarDividedBy (const float scalar)
 divide scalar/ matrix_element[i]
virtual float * GetRawData ()
 Get raw data out of the class (for direct kernel access).

Protected Member Functions

virtual void AllocateMemory ()
 Memory allocation.
virtual void FreeMemory ()
 Memory deallocation.
 TBaseFloatMatrix (const TBaseFloatMatrix &src)
 Copy constructor is not directly allowed.
TBaseFloatMatrixoperator= (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 1D row in X dimension.
size_t p2DDataSliceSize
 Size of 2D slab (X,Y)
float * pMatrixData
 Raw matrix data.

Detailed Description

Definition at line 50 of file BaseFloatMatrix.h.


Member Function Documentation

void TBaseFloatMatrix::AllocateMemory ( ) [protected, virtual]

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

Reimplemented in TFFTWComplexMatrix.

Definition at line 118 of file BaseFloatMatrix.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TBaseFloatMatrix::CopyData ( TBaseFloatMatrix src) [virtual]

Copy data from another matrix with same size.

Parameters:
[in]src- source matrix

Definition at line 65 of file BaseFloatMatrix.cpp.

Here is the caller graph for this function:

void TBaseFloatMatrix::FreeMemory ( ) [protected, virtual]

Free memory

Reimplemented in TFFTWComplexMatrix.

Definition at line 137 of file BaseFloatMatrix.cpp.

Here is the caller graph for this function:

void TBaseFloatMatrix::ScalarDividedBy ( const float  scalar) [virtual]

Divide a scalar by the elements of matrix.

Parameters:
[in]scalar- scalar to be divided

Definition at line 96 of file BaseFloatMatrix.cpp.

Here is the caller graph for this function:

void TBaseFloatMatrix::ZeroMatrix ( ) [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.

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations