Mercurial > hg > silvet
comparison src/EM.cpp @ 86:6075e92d63ab timing
Reorder internal loops
author | Chris Cannam |
---|---|
date | Tue, 06 May 2014 12:43:59 +0100 |
parents | 64b08cc12da0 |
children | 97b77e7cb94c |
comparison
equal
deleted
inserted
replaced
85:64b08cc12da0 | 86:6075e92d63ab |
---|---|
180 newSources[i][n] = epsilon; | 180 newSources[i][n] = epsilon; |
181 | 181 |
182 const float *w = templateFor(i, n, f); | 182 const float *w = templateFor(i, n, f); |
183 const double factor = pitch * source * shift; | 183 const double factor = pitch * source * shift; |
184 | 184 |
185 if (n >= m_lowestPitch && n <= m_highestPitch) { | |
186 | |
187 for (int j = 0; j < m_binCount; ++j) { | |
188 newPitches[n] += w[j] * m_q[j] * factor; | |
189 } | |
190 | |
191 if (inRange(i, n)) { | |
192 for (int j = 0; j < m_binCount; ++j) { | |
193 newSources[i][n] += w[j] * m_q[j] * factor; | |
194 } | |
195 } | |
196 } | |
197 | |
185 for (int j = 0; j < m_binCount; ++j) { | 198 for (int j = 0; j < m_binCount; ++j) { |
186 | 199 newShifts[f][n] += w[j] * m_q[j] * factor; |
187 const double contribution = w[j] * m_q[j] * factor; | |
188 | |
189 if (n >= m_lowestPitch && n <= m_highestPitch) { | |
190 newPitches[n] += contribution; | |
191 } | |
192 | |
193 newShifts[f][n] += contribution; | |
194 | |
195 if (inRange(i, n)) { | |
196 newSources[i][n] += contribution; | |
197 } | |
198 } | 200 } |
199 } | 201 } |
200 } | 202 } |
201 } | 203 } |
202 | 204 |