matrix_2d.hpp#
-
template<typename T>
class Matrix2D# Public Functions
-
inline Matrix2D(size_t n = 0, size_t m = 0)#
Default constructor
- Parameters
n – size on the first axis
m – size on the second axis
-
inline Matrix2D(Matrix2D &&other)#
Move constructor; this allows the matrix to be passed as a return value from a function swapping the pointers and keeping the allocated data on the heap.
-
inline ~Matrix2D()#
Construct in host for device from Matrix2D
- Parameters
other – matrix2D to construct from Copy to host from device
other – matrix2D to construct from Desctructor; dealocate heap and set pointer to null
-
inline void reshape(size_t n, size_t m)#
Change shape of matrix droping previous data
- Parameters
n – size on the first axis
m – size on the second axis
-
inline Matrix2D(size_t n = 0, size_t m = 0)#