#include <matrix-common.h>
Public Member Functions | |
CuTpMatrix () | |
CuTpMatrix (MatrixIndexT r, MatrixResizeType resize_type=kSetZero) | |
CuTpMatrix (const TpMatrix< Real > &orig) | |
CuTpMatrix (const CuTpMatrix< Real > &orig) | |
CuTpMatrix (const CuMatrixBase< Real > &orig, MatrixTransposeType trans=kNoTrans) | |
~CuTpMatrix () | |
void | CopyFromMat (const CuMatrixBase< Real > &M, MatrixTransposeType Trans=kNoTrans) |
void | CopyFromTp (const CuTpMatrix< Real > &other) |
void | CopyFromTp (const TpMatrix< Real > &other) |
void | Cholesky (const CuSpMatrix< Real > &Orig) |
void | Invert () |
CuTpMatrix< Real > & | operator= (const CuTpMatrix< Real > &in) |
Public Member Functions inherited from CuPackedMatrix< Real > | |
CuPackedMatrix () | |
CuPackedMatrix (MatrixIndexT r, MatrixResizeType resize_type=kSetZero) | |
CuPackedMatrix (const PackedMatrix< Real > &orig) | |
CuPackedMatrix (const CuPackedMatrix< Real > &orig) | |
void | SetZero () |
void | SetUnit () |
< Set to zero More... | |
void | SetRandn () |
< Set to unit matrix. More... | |
void | SetDiag (Real alpha) |
< Set to random values of a normal distribution More... | |
void | AddToDiag (Real r) |
< Set the diagonal value to alpha More... | |
void | Scale (Real alpha) |
void | ScaleDiag (Real alpha) |
Real | Trace () const |
~CuPackedMatrix () | |
void | Resize (MatrixIndexT nRows, MatrixResizeType resize_type=kSetZero) |
Set packed matrix to a specified size (can be zero). More... | |
void | CopyFromPacked (const CuPackedMatrix< Real > &src) |
void | CopyFromPacked (const PackedMatrix< Real > &src) |
void | CopyToPacked (PackedMatrix< Real > *dst) const |
void | Read (std::istream &in, bool binary) |
void | Write (std::ostream &out, bool binary) const |
void | Destroy () |
void | Swap (CuPackedMatrix< Real > *other) |
Swaps the contents of *this and *other. Shallow swap. More... | |
void | Swap (PackedMatrix< Real > *other) |
Swaps the contents of *this and *other. More... | |
Real * | Data () |
const Real * | Data () const |
Real | operator() (MatrixIndexT r, MatrixIndexT c) const |
MatrixIndexT | NumRows () const |
MatrixIndexT | NumCols () const |
size_t | SizeInBytes () const |
Returns size in bytes of the data held by the matrix. More... | |
Protected Member Functions | |
const TpMatrix< Real > & | Mat () const |
TpMatrix< Real > & | Mat () |
Protected Member Functions inherited from CuPackedMatrix< Real > | |
const PackedMatrix< Real > & | Mat () const |
PackedMatrix< Real > & | Mat () |
void | AddPacked (const Real alpha, const CuPackedMatrix< Real > &M) |
Friends | |
class | CuMatrixBase< float > |
class | CuMatrixBase< double > |
class | CuVectorBase< Real > |
class | CuSubMatrix< Real > |
class | CuRand< Real > |
class | CuTpMatrix< float > |
class | CuTpMatrix< double > |
Additional Inherited Members | |
Protected Attributes inherited from CuPackedMatrix< Real > | |
Real * | data_ |
MatrixIndexT | num_rows_ |
Definition at line 77 of file matrix-common.h.
|
inline |
Definition at line 48 of file cu-tp-matrix.h.
|
inlineexplicit |
Definition at line 49 of file cu-tp-matrix.h.
|
inlineexplicit |
Definition at line 52 of file cu-tp-matrix.h.
|
inline |
Definition at line 56 of file cu-tp-matrix.h.
References kaldi::kNoTrans.
|
explicit |
Definition at line 40 of file cu-tp-matrix.cc.
References CuTpMatrix< Real >::CopyFromMat(), KALDI_ASSERT, CuMatrixBase< Real >::NumCols(), and CuMatrixBase< Real >::NumRows().
|
inline |
Definition at line 63 of file cu-tp-matrix.h.
References CuTpMatrix< Real >::CopyFromMat(), and kaldi::kNoTrans.
void Cholesky | ( | const CuSpMatrix< Real > & | Orig | ) |
Definition at line 48 of file cu-tp-matrix.cc.
References CuMatrixBase< Real >::Cholesky(), CuTpMatrix< Real >::CopyFromMat(), kaldi::kNoTrans, CuTpMatrix< Real >::Mat(), and CuSpMatrix< Real >::Mat().
Referenced by CuTpMatrix< Real >::CopyFromTp(), and kaldi::UnitTestCuTpMatrixCholesky().
void CopyFromMat | ( | const CuMatrixBase< Real > & | M, |
MatrixTransposeType | Trans = kNoTrans |
||
) |
Definition at line 89 of file cu-tp-matrix.cc.
References CU2DBLOCK, CuMatrixBase< Real >::Data(), CuPackedMatrix< Real >::data_, CuMatrixBase< Real >::Dim(), KALDI_ASSERT, kaldi::kNoTrans, CuTpMatrix< Real >::Mat(), CuMatrixBase< Real >::Mat(), CuPackedMatrix< Real >::num_rows_, CuMatrixBase< Real >::NumCols(), and CuMatrixBase< Real >::NumRows().
Referenced by CuTpMatrix< Real >::Cholesky(), CuTpMatrix< Real >::CuTpMatrix(), CuTpMatrix< Real >::Invert(), TpMatrix< float >::TpMatrix(), kaldi::UnitTestCuTpMatrixCopyFromMat(), and CuTpMatrix< Real >::~CuTpMatrix().
|
inline |
Definition at line 68 of file cu-tp-matrix.h.
References CuPackedMatrix< Real >::CopyFromPacked().
Referenced by CuMatrixBase< float >::Cholesky(), and kaldi::UnitTestCuTpMatrixCopyFromTp().
|
inline |
Definition at line 71 of file cu-tp-matrix.h.
References CuTpMatrix< Real >::Cholesky(), CuPackedMatrix< Real >::CopyFromPacked(), CuTpMatrix< Real >::Invert(), and CuTpMatrix< Real >::operator=().
void Invert | ( | ) |
Definition at line 63 of file cu-tp-matrix.cc.
References CuTpMatrix< Real >::CopyFromMat(), CuMatrixBase< Real >::CopyFromTp(), CU2DBLOCK, CuMatrixBase< Real >::Data(), CuMatrixBase< Real >::Dim(), kaldi::kNoTrans, CuTpMatrix< Real >::Mat(), CuPackedMatrix< Real >::num_rows_, CuPackedMatrix< Real >::NumRows(), and MatrixDim_::stride.
Referenced by CuTpMatrix< Real >::CopyFromTp().
|
inlineprotected |
Definition at line 80 of file cu-tp-matrix.h.
Referenced by CuVectorBase< float >::AddTpVec(), CuTpMatrix< Real >::Cholesky(), CuTpMatrix< Real >::CopyFromMat(), CuMatrixBase< float >::CopyFromTp(), CuTpMatrix< Real >::Invert(), and CuVectorBase< float >::MulTp().
|
inlineprotected |
Definition at line 83 of file cu-tp-matrix.h.
CuTpMatrix< Real > & operator= | ( | const CuTpMatrix< Real > & | in | ) |
Definition at line 130 of file cu-tp-matrix.cc.
References CuPackedMatrix< Real >::CopyFromPacked(), kaldi::kUndefined, CuPackedMatrix< Real >::NumRows(), and CuPackedMatrix< Real >::Resize().
Referenced by CuTpMatrix< Real >::CopyFromTp().
|
friend |
Definition at line 41 of file cu-tp-matrix.h.
|
friend |
Definition at line 40 of file cu-tp-matrix.h.
|
friend |
Definition at line 44 of file cu-tp-matrix.h.
|
friend |
Definition at line 43 of file cu-tp-matrix.h.
|
friend |
Definition at line 46 of file cu-tp-matrix.h.
|
friend |
Definition at line 45 of file cu-tp-matrix.h.
|
friend |
Definition at line 42 of file cu-tp-matrix.h.