comparison data/model/FFTModel.cpp @ 183:146eb9e35baa

* Improve output from Profiler class and make it incur less (no) overhead in release builds with NO_TIMING defined * Fix a lock contention issue in spectrogram * Marginal optimisations elsewhere
author Chris Cannam
date Tue, 10 Oct 2006 14:51:17 +0000
parents f75f8a1cd7b1
children 2f2d282d45d0
comparison
equal deleted inserted replaced
182:f75f8a1cd7b1 183:146eb9e35baa
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #include "FFTModel.h" 16 #include "FFTModel.h"
17 #include "DenseTimeValueModel.h" 17 #include "DenseTimeValueModel.h"
18
19 #include "base/Profiler.h"
18 20
19 #include <cassert> 21 #include <cassert>
20 22
21 FFTModel::FFTModel(const DenseTimeValueModel *model, 23 FFTModel::FFTModel(const DenseTimeValueModel *model,
22 int channel, 24 int channel,
79 } 81 }
80 82
81 void 83 void
82 FFTModel::getColumn(size_t x, Column &result) const 84 FFTModel::getColumn(size_t x, Column &result) const
83 { 85 {
86 Profiler profiler("FFTModel::getColumn", false);
87
84 result.clear(); 88 result.clear();
85 size_t height(getHeight()); 89 size_t height(getHeight());
86 for (size_t y = 0; y < height; ++y) { 90 for (size_t y = 0; y < height; ++y) {
87 result.push_back(const_cast<FFTModel *>(this)->getMagnitudeAt(x, y)); 91 result.push_back(const_cast<FFTModel *>(this)->getMagnitudeAt(x, y));
88 } 92 }