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

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
TComplexMatrix Class Reference

The class for complex matrices. More...

`#include <ComplexMatrix.h>`

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

## Public Member Functions
| TComplexMatrix (const TDimensionSizes &dimensionSizes)
| Constructor. More...
virtual | ~TComplexMatrix ()
| Destructor. More...
TFloatComplex & | operator[] (const size_t &index)
| Operator []. More...
const TFloatComplex & | operator[] (const size_t &index) const
| Operator [], constant version. More...
virtual void | ReadDataFromHDF5File (THDF5_File &file, TMatrixName &matrixName)
| Load data from the HDF5_File. More...
virtual void | WriteDataToHDF5File (THDF5_File &file, TMatrixName &matrixName, const size_t compressionLevel)
| Write data into the HDF5_File. More...
Public Member Functions inherited from TBaseFloatMatrix
| TBaseFloatMatrix ()
| Default constructor. More...
virtual TDimensionSizes | GetDimensionSizes () const
| Get dimension sizes of the matrix.
virtual size_t | GetElementCount () const
| Get element count of the matrix.
virtual size_t | GetAllocatedElementCount () const
| Get total allocated element count (might differ from total element count used for the simulation because of padding).
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 * | GetHostData ()
| Get raw CPU data out of the class (for direct CPU kernel access).
virtual const float * | GetHostData () const
| Get raw CPU data out of the class (for direct CPU kernel access).
virtual float * | GetDeviceData ()
| Get raw GPU data out of the class (for direct GPU kernel access).
virtual const float * | GetDeviceData () const
| Get raw GPU data out of the class (for direct GPU kernel access).
virtual void | CopyToDevice ()
| Copy data from CPU -> GPU (Host -> Device). More...
virtual void | CopyFromDevice ()
| Copy data from GPU -> CPU (Device -> Host). More...
Public Member Functions inherited from TBaseMatrix
| TBaseMatrix ()
| Default constructor.
virtual | ~TBaseMatrix ()
| Destructor.

## Protected Member Functions
| TComplexMatrix ()
| Default constructor not allowed for public.
| TComplexMatrix (const TComplexMatrix &src)
| Copy constructor not allowed for public.
TComplexMatrix & | operator= (const TComplexMatrix &src)
| Operator not allowed for public.
virtual void | InitDimensions (const TDimensionSizes &dimensionSizes)
| Initialize dimension sizes and related structures. More...
Protected Member Functions inherited from TBaseFloatMatrix
virtual void | AllocateMemory ()
| Memory allocation (both on CPU and GPU). More...
virtual void | FreeMemory ()
| Memory allocation (both on CPU and GPU). More...
| TBaseFloatMatrix (const TBaseFloatMatrix &src)
| Copy constructor is not directly allowed.
TBaseFloatMatrix & | operator= (const TBaseFloatMatrix &src)
| Operator = is not directly allowed.

## Additional Inherited Members
Protected Attributes inherited from TBaseFloatMatrix
size_t | nElements
| Total number of elements.
size_t | nAllocatedElements
| Total number of allocated elements (in terms of floats).
struct TDimensionSizes | dimensionSizes
| Dimension sizes.
size_t | dataRowSize
| Size of a 1D row in X dimension.
size_t | dataSlabSize
| Size of a 2D slab.
float * | hostData
| Raw CPU matrix data.
float * | deviceData
| Raw GPU matrix data.

## Detailed Description

The class for complex matrices.

Definition at line 54 of file ComplexMatrix.h.

## Constructor & Destructor Documentation

TComplexMatrix::TComplexMatrix | ( | const TDimensionSizes & | dimensionSizes | ) |

Constructor.

Parameters

  [in] | dimensionSizes | - Dimension sizes of the matrix

Definition at line 51 of file ComplexMatrix.cpp.

Here is the call graph for this function:

TComplexMatrix::~TComplexMatrix | ( |  | ) |
| virtual

Destructor.

Definition at line 62 of file ComplexMatrix.cpp.

Here is the call graph for this function:

## Member Function Documentation

void TComplexMatrix::InitDimensions | ( | const TDimensionSizes & | dimensionSizes | ) |
| protected virtual

Initialize matrix dimension sizes.

Parameters

  [in] | dimensionSizes | - Dimension sizes of the matrix

Definition at line 147 of file ComplexMatrix.cpp.

Here is the caller graph for this function:

TFloatComplex& TComplexMatrix::operator[] | ( | const size_t & | index | ) |
| inline

Operator [].

Parameters

  [in] | index | - 1D index into the array

Returns
  An element of the matrix

Definition at line 69 of file ComplexMatrix.h.

const TFloatComplex& TComplexMatrix::operator[] | ( | const size_t & | index | ) | const
| inline

Operator [], constant version.

Parameters

  [in] | index | - 1D index into the array

Returns
  element of the matrix

Definition at line 80 of file ComplexMatrix.h.

void TComplexMatrix::ReadDataFromHDF5File | ( | THDF5_File & | file,
|  | TMatrixName & | matrixName
| ) |  |
| virtual

Read data from HDF5 file (do some basic checks). Only from the root group.

Parameters

  [in] | file | - HDF5 file
  [in] | matrixName | - HDF5 dataset name

- Exceptions

    ios::failure | when there is a problem

Implements TBaseMatrix.

Definition at line 77 of file ComplexMatrix.cpp.

Here is the call graph for this function:

void TComplexMatrix::WriteDataToHDF5File | ( | THDF5_File & | file,
|  | TMatrixName & | matrixName,
|  | const size_t | compressionLevel
| ) |  |
| virtual

Write data to HDF5 file (only from the root group).

Parameters

  [in] | file | - HDF5 file handle
  [in] | matrixName | - HDF5 dataset name
  [in] | compressionLevel | - Compression level for the dataset

Exceptions

  ios::failure | an exception what the operation fails

Implements TBaseMatrix.

Definition at line 110 of file ComplexMatrix.cpp.

Here is the call graph for this function:

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

- MatrixClasses/ComplexMatrix.h
- MatrixClasses/ComplexMatrix.cpp