comparison src/Silvet.cpp @ 97:840c0d703bbb timing

Use single-precision floats throughout EM code
author Chris Cannam
date Tue, 06 May 2014 14:45:16 +0100
parents 21e7920556ed
children
comparison
equal deleted inserted replaced
90:f1116eb464f9 97:840c0d703bbb
399 EM em; 399 EM em;
400 for (int j = 0; j < iterations; ++j) { 400 for (int j = 0; j < iterations; ++j) {
401 em.iterate(filtered[i]); 401 em.iterate(filtered[i]);
402 } 402 }
403 403
404 vector<double> pitches = em.getPitchDistribution(); 404 vector<float> pitches = em.getPitchDistribution();
405 405
406 for (int j = 0; j < processingNotes; ++j) { 406 for (int j = 0; j < processingNotes; ++j) {
407 pitches[j] *= sum; 407 pitches[j] *= sum;
408 } 408 }
409 409
496 496
497 return out; 497 return out;
498 } 498 }
499 499
500 Vamp::Plugin::FeatureList 500 Vamp::Plugin::FeatureList
501 Silvet::postProcess(const vector<double> &pitches) 501 Silvet::postProcess(const vector<float> &pitches)
502 { 502 {
503 vector<double> filtered; 503 vector<double> filtered;
504 504
505 for (int j = 0; j < processingNotes; ++j) { 505 for (int j = 0; j < processingNotes; ++j) {
506 m_postFilter[j]->push(pitches[j]); 506 m_postFilter[j]->push(pitches[j]);