22 #ifndef KALDI_CUDAMATRIX_CU_BLOCK_MATRIX_H_ 23 #define KALDI_CUDAMATRIX_CU_BLOCK_MATRIX_H_ 50 template<
typename Real>
67 void Write(std::ostream &os,
bool binary)
const;
69 void Read(std::istream &is,
bool binary);
145 template<
typename Real>
146 std::ostream &operator << (std::ostream &out, const CuBlockMatrix<Real> &mat);
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
MatrixIndexT MaxBlockRows() const
CuBlockMatrix & operator=(const CuBlockMatrix &other)
Assignment operator.
std::vector< BlockMatrixData > block_data_
void FreeCudaData()
If using GPU and cu_data_ != NULL, free cu_data_ and set it to NULL.
void CopyFromMat(const CuMatrix< Real > &M)
Copies elements within the block structure from matrix M, discarding others.
void NormalizeColumns()
Normalizes the columns of *this so that each one sums to one.
The class CuBlockMatrix holds a vector of objects of type CuMatrix, say, M_1, M_2, .
This class represents a matrix that's stored on the GPU if we have one, and in memory if not...
This structure is used in cu-block-matrix.h to store information about a block-diagonal matrix...
MatrixIndexT NumRows() const
void AddMatMat(BaseFloat alpha, const CuMatrix< Real > &A, MatrixTransposeType transA, const CuMatrix< Real > &B, MatrixTransposeType transB, BaseFloat beta)
Does *this = alpha A B + beta * *this, discarding elements of the product outside the block structure...
void SetCudaData()
If using GPU, allocate and set cu_data_ on the GPU to reflect "data_".
This class is used for a piece of a CuMatrix.
Matrix for CUDA computing.
MatrixIndexT NumBlocks() const
void Swap(CuBlockMatrix *other)
void Read(std::istream &is, bool binary)
MatrixIndexT NumCols() const
MatrixIndexT MaxBlockCols() const
void Destroy()
Frees and deinitializes everything.
const CuSubMatrix< Real > Block(MatrixIndexT b) const
void Write(std::ostream &os, bool binary) const