matrix-lib-test.cc File Reference
#include "matrix/matrix-lib.h"
#include "util/stl-utils.h"
#include <numeric>
#include <time.h>
#include <matrix/cblas-wrappers.h>
Include dependency graph for matrix-lib-test.cc:

Go to the source code of this file.

Namespaces

 kaldi
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
 

Functions

template<typename Real >
void RandPosdefSpMatrix (MatrixIndexT dim, SpMatrix< Real > *matrix)
 
template<typename Real >
static void InitRandNonsingular (MatrixBase< Real > *M)
 
template<typename Real >
static void InitRandNonsingular (SpMatrix< Real > *M)
 
template<typename Real >
static void CholeskyUnitTestTr ()
 
template<typename Real >
static void SlowMatMul ()
 
template<typename Real >
static void UnitTestAddToDiagMatrix ()
 
template<typename Real >
static void UnitTestAddDiagVecMat ()
 
template<typename Real >
static void UnitTestAddMatDiagVec ()
 
template<typename Real >
static void UnitTestAddMatMatElements ()
 
template<typename Real >
static void UnitTestAddSp ()
 
template<typename Real , typename OtherReal >
static void UnitTestSpAddDiagVec ()
 
template<typename Real >
static void UnitTestSpAddVecVec ()
 
template<typename Real >
static void UnitTestCopyRowsAndCols ()
 
template<typename Real >
static void UnitTestSpliceRows ()
 
template<typename Real >
static void UnitTestRemoveRow ()
 
template<typename Real >
static void UnitTestSubvector ()
 
static int32 DoubleFactorial (int32 i)
 
template<typename Real >
static void UnitTestSetRandn ()
 
template<typename Real >
static void UnitTestSetRandUniform ()
 
template<typename Real >
static void UnitTestSimpleForVec ()
 
template<typename Real >
static void UnitTestVectorMax ()
 
template<typename Real >
static void UnitTestVectorMin ()
 
template<typename Real >
static void UnitTestReplaceValue ()
 
template<typename Real >
static void UnitTestNorm ()
 
template<typename Real >
static void UnitTestCopyRows ()
 
template<typename Real >
static void UnitTestCopyToRows ()
 
template<typename Real >
static void UnitTestAddRows ()
 
template<typename Real >
static void UnitTestAddToRows ()
 
template<typename Real >
static void UnitTestCopyCols ()
 
template<typename Real >
static void UnitTestSimpleForMat ()
 
template<typename Real >
static void UnitTestRow ()
 
template<typename Real >
static void UnitTestAxpy ()
 
template<typename Real >
static void UnitTestCopySp ()
 
template<typename Real >
static void UnitTestPower ()
 
template<typename Real >
static void UnitTestPowerAbs ()
 
template<typename Real >
static void UnitTestHeaviside ()
 
template<typename Real >
static void UnitTestAddOuterProductPlusMinus ()
 
template<typename Real >
static void UnitTestSger ()
 
template<typename Real >
static void UnitTestDeterminant ()
 
template<typename Real >
static void UnitTestDeterminantSign ()
 
template<typename Real >
static void UnitTestSpVec ()
 
template<typename Real >
static void UnitTestTraceProduct ()
 
template<typename Real >
static void UnitTestSvd ()
 
template<typename Real >
static void UnitTestSvdBad ()
 
template<typename Real >
static void UnitTestSvdZero ()
 
template<typename Real >
static void UnitTestSvdNodestroy ()
 
template<typename Real >
static void UnitTestSvdJustvec ()
 
template<typename Real >
static void UnitTestEigSymmetric ()
 
template<typename Real >
static void UnitTestEig ()
 
template<typename Real >
static void UnitTestEigSp ()
 
template<typename Real >
static Real NonOrthogonality (const MatrixBase< Real > &M, MatrixTransposeType transM)
 
template<typename Real >
static Real NonDiagonalness (const SpMatrix< Real > &S)
 
template<typename Real >
static Real NonUnitness (const SpMatrix< Real > &S)
 
template<typename Real >
static void UnitTestTridiagonalize ()
 
template<typename Real >
static void UnitTestTridiagonalizeAndQr ()
 
template<typename Real >
static void UnitTestMmul ()
 
template<typename Real >
static void UnitTestMmulSym ()
 
template<typename Real >
static void UnitTestAddVecVec ()
 
template<typename Real >
static void UnitTestVecmul ()
 
template<typename Real >
static void UnitTestInverse ()
 
template<typename Real >
static void UnitTestMulElements ()
 
template<typename Real >
static void UnitTestDotprod ()
 
template<class Real >
void PlaceNansInGaps (Matrix< Real > *mat)
 
template<typename Real >
static void UnitTestResizeCopyDataDifferentStrideType ()
 Make sure that when Resize() is called with resize_type = kCopyData and a stride_type different from this's stride_type, the resized matrix is equivalent to the original matrix (modulo the stride). More...
 
template<typename Real >
static void UnitTestResize ()
 
template<typename Real >
static void UnitTestTp2Sp ()
 
template<typename Real >
static void UnitTestTp2 ()
 
template<typename Real >
static void UnitTestAddDiagMat2 ()
 
template<typename Real >
static void UnitTestAddDiagMatMat ()
 
template<typename Real >
static void UnitTestOrthogonalizeRows ()
 
template<typename Real >
static void UnitTestTransposeScatter ()
 
template<typename Real >
static void UnitTestRankNUpdate ()
 
template<typename Real >
static void UnitTestSpInvert ()
 
template<typename Real >
static void UnitTestTpInvert ()
 
template<typename Real >
static void UnitTestLimitCondInvert ()
 
template<typename Real >
static void UnitTestFloorChol ()
 
template<typename Real >
static void UnitTestFloorUnit ()
 
template<typename Real >
static void UnitTestFloorCeiling ()
 
template<typename Real >
static void UnitTestMat2Vec ()
 
template<typename Real >
static void UnitTestLimitCond ()
 
template<typename Real >
static void UnitTestTanh ()
 
template<typename Real >
static void UnitTestSigmoid ()
 
template<typename Real >
static void UnitTestSoftHinge ()
 
template<typename Real >
static void UnitTestSimple ()
 
template<typename Real >
static void UnitTestIo ()
 
template<typename Real >
static void UnitTestIoCross ()
 
template<typename Real >
static void UnitTestHtkIo ()
 
template<typename Real >
static void UnitTestRange ()
 
template<typename Real >
static void UnitTestScale ()
 
template<typename Real >
static void UnitTestMul ()
 
template<typename Real >
static void UnitTestApplyExpSpecial ()
 
template<typename Real >
static void UnitTestInnerProd ()
 
template<typename Real >
static void UnitTestAddToDiag ()
 
template<typename Real >
static void UnitTestScaleDiag ()
 
template<typename Real >
static void UnitTestSetDiag ()
 
template<typename Real >
static void UnitTestTraceSpSpLower ()
 
template<typename Real >
static void UnitTestAddMatSmat ()
 
template<typename Real >
static void UnitTestAddMat2Sp ()
 
template<typename Real >
static void UnitTestAddMatSelf ()
 
template<typename Real >
static void UnitTestAddMat2 ()
 
template<typename Real >
static void UnitTestSymAddMat2 ()
 
template<typename Real >
static void UnitTestSolve ()
 
template<typename Real >
static void UnitTestMax2 ()
 
template<typename Real >
static void UnitTestMaxAbsEig ()
 
template<typename Real >
static void UnitTestLbfgs ()
 
template<typename Real >
static void UnitTestLinearCgd ()
 
template<typename Real >
static void UnitTestMaxMin ()
 
template<typename Real >
static bool approx_equal (Real a, Real b)
 
template<typename Real >
static void UnitTestTrace ()
 
template<typename Real >
static void UnitTestComplexFt ()
 
template<typename Real >
static void UnitTestDct ()
 
template<typename Real >
static void UnitTestComplexFft ()
 
template<typename Real >
static void UnitTestSplitRadixComplexFft ()
 
template<typename Real >
static void UnitTestTranspose ()
 
template<typename Real >
static void UnitTestAddVecToRows ()
 
template<typename Real >
static void UnitTestAddVec2Sp ()
 
template<typename Real >
static void UnitTestAddVecToCols ()
 
template<typename Real >
static void UnitTestComplexFft2 ()
 
template<typename Real >
static void UnitTestSplitRadixComplexFft2 ()
 
template<typename Real >
static void UnitTestRealFft ()
 
template<typename Real >
static void UnitTestSplitRadixRealFft ()
 
template<typename Real >
static void UnitTestRealFftSpeed ()
 
template<typename Real >
static void UnitTestSplitRadixRealFftSpeed ()
 
template<typename Real >
void UnitTestComplexPower ()
 
template<typename Real >
void UnitTestNonsymmetricPower ()
 
void UnitTestAddVecCross ()
 
template<typename Real >
static void UnitTestPca (bool full_test)
 
template<typename Real >
static void UnitTestPca2 (bool full_test)
 
template<typename Real >
static void UnitTestSvdSpeed ()
 
template<typename Real >
static void UnitTestCompressedMatrix2 ()
 
template<typename Real >
static void UnitTestCompressedMatrix ()
 
template<typename Real >
static void UnitTestGeneralMatrix ()
 
template<typename Real >
static void UnitTestExtractCompressedMatrix ()
 
template<typename Real >
static void UnitTestTridiag ()
 
template<typename Real >
static void UnitTestRandCategorical ()
 
template<class Real >
static void UnitTestAddMatMatNans ()
 
template<class Real >
static void UnitTestTopEigs ()
 
template<typename Real >
static void UnitTestTriVecSolver ()
 
template<typename Real >
static void MatrixUnitTest (bool full_test)
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4746 of file matrix-lib-test.cc.

References KALDI_LOG, and kaldi::SetVerboseLevel().

4746  {
4747  using namespace kaldi;
4748  bool full_test = false;
4749  SetVerboseLevel(5);
4750  kaldi::MatrixUnitTest<float>(full_test);
4751  kaldi::MatrixUnitTest<double>(full_test);
4752  KALDI_LOG << "Tests succeeded.";
4753 }
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
void SetVerboseLevel(int32 i)
This should be rarely used, except by programs using Kaldi as library; command-line programs set the ...
Definition: kaldi-error.h:64
#define KALDI_LOG
Definition: kaldi-error.h:153