33 #ifndef BASE_INDEX_MATRIX_H
34 #define BASE_INDEX_MATRIX_H
virtual size_t * GetDeviceData()
Get raw GPU data out of the class (for direct GPU kernel access).
Abstract base class. The common ancestor defining the common interface and allowing derived classes t...
virtual const size_t * GetHostData() const
Get raw data out of the class (for direct CPU kernel access).
virtual const size_t * GetDeviceData() const
Get raw GPU data out of the class (for direct GPU kernel access).
virtual struct TDimensionSizes GetDimensionSizes() const
Get dimension sizes of the matrix.
size_t nAllocatedElements
Total number of allocated elements (the array size).
virtual void CopyFromDevice()
Copy data from GPU -> CPU (Device -> Host).
size_t * deviceData
Raw GPU matrix data.
virtual void AllocateMemory()
Memory allocation (both on CPU and GPU)
virtual size_t * GetHostData()
Get raw data out of the class (for direct CPU kernel access).
virtual ~TBaseIndexMatrix()
Destructor.
struct TDimensionSizes dimensionSizes
Dimension sizes.
virtual void ZeroMatrix()
Zero all elements of the matrix (NUMA first touch).
The header file containing the structure with 3D dimension sizes.
size_t * hostData
Raw CPU matrix data.
Abstract base class for index based matrices defining basic interface. Higher dimensional matrices st...
virtual size_t GetElementCount() const
Get total element count of the matrix.
virtual void CopyToDevice()
Copy data from CPU -> GPU (Host -> Device).
virtual size_t GetAllocatedElementCount() const
Get total allocated element count (might differ from total element count used for the simulation beca...
size_t rowSize
Size of 1D row in X dimension.
TBaseIndexMatrix & operator=(const TBaseIndexMatrix &src)
operator = is not allowed for public
size_t nElements
Total number of elements.
size_t slabSize
Size of 2D slab (X,Y).
TBaseIndexMatrix()
Default constructor.
The header file of the common ancestor of all matrix classes. A pure abstract class.
Structure with 4D dimension sizes (3 in space and 1 in time).
virtual void FreeMemory()
Memory deallocation (both on CPU and GPU)