diff 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
line wrap: on
line diff
--- a/src/EM.cpp	Wed May 07 10:00:39 2014 +0100
+++ b/src/EM.cpp	Wed May 07 10:38:21 2014 +0100
@@ -206,9 +206,8 @@
 
                 v_copy(contributions, w, m_binCount);
                 v_multiply(contributions, m_q, m_binCount);
-                v_scale(contributions, factor, m_binCount);
 
-                double total = v_sum(contributions, m_binCount);
+                double total = factor * v_sum(contributions, m_binCount);
 
                 if (n >= m_lowestPitch && n <= m_highestPitch) {