kspaceFirstOrder3D-CUDA  1.1
The CUDA/C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TBaseMatrix Class Referenceabstract

Abstract base class. The common ancestor defining the common interface and allowing derived classes to be allocated, freed and loaded from the file using the Matrix container. More...

#include <BaseMatrix.h>

Inheritance diagram for TBaseMatrix:

Public Member Functions

 TBaseMatrix ()
 Default constructor.
 
virtual ~TBaseMatrix ()
 Destructor.
 
virtual struct TDimensionSizes GetDimensionSizes () const =0
 Get dimension sizes of the matrix.
 
virtual size_t GetElementCount () const =0
 Get total element count of the matrix.
 
virtual size_t GetAllocatedElementCount () const =0
 Get total allocated element count (might differ from the total element count used for the simulation because of e.g. padding).
 
virtual void ReadDataFromHDF5File (THDF5_File &file, TMatrixName &matrixName)=0
 Read matrix from the HDF5 file. More...
 
virtual void WriteDataToHDF5File (THDF5_File &file, TMatrixName &matrixName, const size_t compressionLevel)=0
 Write data into the HDF5 file. More...
 
virtual void CopyToDevice ()=0
 Copy data from CPU -> GPU (Host -> Device).
 
virtual void CopyFromDevice ()=0
 Copy data from GPU -> CPU (Device -> Host).
 

Detailed Description

Abstract base class. The common ancestor defining the common interface and allowing derived classes to be allocated, freed and loaded from the file using the Matrix container. In this version of the code, It allocates memory both on the CPU and GPU side.

Definition at line 48 of file BaseMatrix.h.

Member Function Documentation

virtual void TBaseMatrix::ReadDataFromHDF5File ( THDF5_File file,
TMatrixName matrixName 
)
pure virtual

Read matrix from the HDF5 file.

Parameters
[in]file- Handle to the HDF5 file
[in]matrixName- HDF5 dataset name to read from

Implemented in TComplexMatrix, TIndexMatrix, and TRealMatrix.

virtual void TBaseMatrix::WriteDataToHDF5File ( THDF5_File file,
TMatrixName matrixName,
const size_t  compressionLevel 
)
pure virtual

Write data into the HDF5 file.

Parameters
[in]file- Handle to the HDF5 file
[in]matrixName- HDF5 dataset name to write to
[in]compressionLevel- Compression level for the HDF5 dataset

Implemented in TComplexMatrix, TIndexMatrix, and TRealMatrix.


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