comparison src/EM.cpp @ 119:6890dea115c3 bqvec-openmp

Eliminate a loop
author Chris Cannam
date Wed, 07 May 2014 10:38:21 +0100
parents c4eae816bdb3
children dfb6e5ce3eb1
comparison
equal deleted inserted replaced
118:36f58a539125 119:6890dea115c3
204 const double factor = pitch * source * shift; 204 const double factor = pitch * source * shift;
205 const double *w = templateFor(i, n, f); 205 const double *w = templateFor(i, n, f);
206 206
207 v_copy(contributions, w, m_binCount); 207 v_copy(contributions, w, m_binCount);
208 v_multiply(contributions, m_q, m_binCount); 208 v_multiply(contributions, m_q, m_binCount);
209 v_scale(contributions, factor, m_binCount); 209
210 210 double total = factor * v_sum(contributions, m_binCount);
211 double total = v_sum(contributions, m_binCount);
212 211
213 if (n >= m_lowestPitch && n <= m_highestPitch) { 212 if (n >= m_lowestPitch && n <= m_highestPitch) {
214 213
215 m_updatePitches[n] += total; 214 m_updatePitches[n] += total;
216 215