Mercurial > hg > silvet
changeset 99:9ecad4c9c2a2 bqvec
Use a couple more bqvec calls
author | Chris Cannam |
---|---|
date | Tue, 06 May 2014 14:53:11 +0100 |
parents | c2996b9bedbe |
children | 8259193b3b16 |
files | src/EM.cpp |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/EM.cpp Tue May 06 14:38:43 2014 +0100 +++ b/src/EM.cpp Tue May 06 14:53:11 2014 +0100 @@ -137,9 +137,7 @@ { // cerr << "."; - for (int i = 0; i < m_binCount; ++i) { - m_estimate[i] = epsilon; - } + v_set(m_estimate, epsilon, m_binCount); for (int i = 0; i < m_sourceCount; ++i) { for (int n = 0; n < m_noteCount; ++n) { @@ -149,9 +147,7 @@ const double *w = templateFor(i, n, f); const double shift = m_shifts[f][n]; const double factor = pitch * source * shift; - for (int j = 0; j < m_binCount; ++j) { - m_estimate[j] += w[j] * factor; - } + v_add_with_gain(m_estimate, w, factor, m_binCount); } } }