Mercurial > hg > svcore
diff base/ColumnOp.cpp @ 1837:1b688ab5f1b3
Unify various vectors to our base floatvec_t type; store columns in fft model cache at their desired height so we can return a reference (speeding up the peak-frequency spectrogram in particular)
author | Chris Cannam |
---|---|
date | Thu, 09 Apr 2020 11:22:55 +0100 |
parents | 9ef1cc26024c |
children |
line wrap: on
line diff
--- a/base/ColumnOp.cpp Mon Apr 06 13:55:44 2020 +0100 +++ b/base/ColumnOp.cpp Thu Apr 09 11:22:55 2020 +0100 @@ -32,7 +32,7 @@ ColumnOp::Column ColumnOp::peakPick(const Column &in) { - vector<float> out(in.size(), 0.f); + Column out(in.size(), 0.f); for (int i = 0; in_range_for(in, i); ++i) { if (isPeak(in, i)) { @@ -119,7 +119,7 @@ int minbin, bool interpolate) { - vector<float> out(h, 0.f); + Column out(h, 0.f); int bins = int(in.size()); if (interpolate) {