25 #ifndef KALDI_MATRIX_MATRIX_FUNCTIONS_INL_H_ 26 #define KALDI_MATRIX_MATRIX_FUNCTIONS_INL_H_ 31 template<
typename Real>
inline void ComplexMul(
const Real &a_re,
const Real &a_im,
32 Real *b_re, Real *b_im) {
33 Real tmp_re = (*b_re * a_re) - (*b_im * a_im);
34 *b_im = *b_re * a_im + *b_im * a_re;
39 const Real &b_re,
const Real &b_im,
40 Real *c_re, Real *c_im) {
41 *c_re += b_re*a_re - b_im*a_im;
42 *c_im += b_re*a_im + b_im*a_re;
46 template<
typename Real>
inline void ComplexImExp(Real x, Real *a_re, Real *a_im) {
55 #endif // KALDI_MATRIX_MATRIX_FUNCTIONS_INL_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void ComplexAddProduct(const Real &a_re, const Real &a_im, const Real &b_re, const Real &b_im, Real *c_re, Real *c_im)
ComplexMul implements, inline, the complex operation c += (a * b).
void ComplexMul(const Real &a_re, const Real &a_im, Real *b_re, Real *b_im)
ComplexMul implements, inline, the complex multiplication b *= a.
void ComplexImExp(Real x, Real *a_re, Real *a_im)
ComplexImExp implements a <– exp(i x), inline.