33 #ifndef BASE_FLOAT_MATRIX_H
34 #define BASE_FLOAT_MATRIX_H
Abstract base class for float based matrices defining basic interface. Higher dimensional matrices st...
float * hostData
Raw CPU matrix data.
virtual void FreeMemory()
Memory allocation (both on CPU and GPU).
Abstract base class. The common ancestor defining the common interface and allowing derived classes t...
virtual void ZeroMatrix()
Zero all elements of the matrix (NUMA first touch).
virtual void AllocateMemory()
Memory allocation (both on CPU and GPU).
struct TDimensionSizes dimensionSizes
Dimension sizes.
TBaseFloatMatrix()
Default constructor.
virtual const float * GetDeviceData() const
Get raw GPU data out of the class (for direct GPU kernel access).
virtual size_t GetElementCount() const
Get element count of the matrix.
virtual float * GetHostData()
Get raw CPU data out of the class (for direct CPU kernel access).
size_t nAllocatedElements
Total number of allocated elements (in terms of floats).
virtual const float * GetHostData() const
Get raw CPU data out of the class (for direct CPU kernel access).
virtual TDimensionSizes GetDimensionSizes() const
Get dimension sizes of the matrix.
float * deviceData
Raw GPU matrix data.
size_t nElements
Total number of elements.
The header file containing the structure with 3D dimension sizes.
virtual size_t GetAllocatedElementCount() const
Get total allocated element count (might differ from total element count used for the simulation beca...
TBaseFloatMatrix & operator=(const TBaseFloatMatrix &src)
Operator = is not directly allowed.
size_t dataRowSize
Size of a 1D row in X dimension.
virtual float * GetDeviceData()
Get raw GPU data out of the class (for direct GPU kernel access).
virtual void CopyToDevice()
Copy data from CPU -> GPU (Host -> Device).
virtual void ScalarDividedBy(const float scalar)
Divide scalar/ matrix_element[i].
virtual void CopyFromDevice()
Copy data from GPU -> CPU (Device -> Host).
size_t dataSlabSize
Size of a 2D slab.
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).