Class cumat
Defined in File cumat.hpp
Inheritance Relationships
Base Type
public cubase
(Class cubase)
Class Documentation
-
class cumat : public cubase
Matrix. Elements are stored in GPU by column-major format.
Public Functions
-
inline cumat()
Construct a new cumat object.
-
inline cumat(size_t rows, size_t cols, cubase::Init init = cubase::Init::Zero)
Construct a new cumat object. Number of rows Number of columns How to initialise.
-
inline cumat(arma::mat src)
Construct a new cumat object from armadillo matrix. Armadillo matrix.
-
inline cumat(cumat &&mat)
Move construct a new cumat object. The source object will move the management of memory to the new object.
-
template<class L, class R>
inline cumat(cuop_matmul<L, R, cutraits<L>::type, cutraits<R>::type> &&op)
-
cumat(cuop_diagmul &&op)
-
inline virtual ~cumat()
Destroy the cumat object.
-
inline virtual size_t nbytes() const override
Get size in bytes Size in bytes.
-
const cuop_trans<cumat> t() const
Transpose matrix. Do not do the calculation immediately, unless it is assigned to a new object. Object with transpose mark.
-
inline void resize(size_t rows, size_t cols)
-
cumat &operator=(const cuop_trans<cumat> &right)
-
template<class L, class R>
inline cumat &operator=(cuop_matmul<L, R, cutraits<L>::type, cutraits<R>::type> &&op)
-
cumat &operator=(cuop_diagmul &&op)
-
custride as_stride() const
Convert to object of custride type in which each column is a stride. Converted custride object.
-
cuop_diagmul diagmul(const cumat &diag) const
Multiply with a diagonal matrix. Diagonal elements of the diagonal matrix Result matrix.
-
inline size_t nrows() const
-
inline size_t ncols() const
Public Static Attributes
-
inline cumat()