Mercurial > hg > svcore
diff data/model/FFTModel.h @ 1326:54af1e21705c 3.0-integration
Update to use bqvec allocator for float vectors
author | Chris Cannam |
---|---|
date | Tue, 13 Dec 2016 15:23:21 +0000 |
parents | bac86d3fc6c9 |
children | fad8f533ca13 |
line wrap: on
line diff
--- a/data/model/FFTModel.h Tue Dec 13 12:03:48 2016 +0000 +++ b/data/model/FFTModel.h Tue Dec 13 15:23:21 2016 +0000 @@ -22,6 +22,7 @@ #include "base/Window.h" #include <bqfft/FFT.h> +#include <bqvec/Allocators.h> #include <set> #include <vector> @@ -167,20 +168,24 @@ return { startFrame, endFrame }; } - std::vector<std::complex<float> > getFFTColumn(int column) const; - std::vector<float> getSourceSamples(int column) const; - std::vector<float> getSourceData(std::pair<sv_frame_t, sv_frame_t>) const; - std::vector<float> getSourceDataUncached(std::pair<sv_frame_t, sv_frame_t>) const; + typedef std::vector<float, breakfastquay::StlAllocator<float>> fvec; + typedef std::vector<std::complex<float>, + breakfastquay::StlAllocator<std::complex<float>>> cvec; + + cvec getFFTColumn(int column) const; + fvec getSourceSamples(int column) const; + fvec getSourceData(std::pair<sv_frame_t, sv_frame_t>) const; + fvec getSourceDataUncached(std::pair<sv_frame_t, sv_frame_t>) const; struct SavedSourceData { std::pair<sv_frame_t, sv_frame_t> range; - std::vector<float> data; + fvec data; }; mutable SavedSourceData m_savedData; struct SavedColumn { int n; - std::vector<std::complex<float> > col; + cvec col; }; mutable std::deque<SavedColumn> m_cached; size_t m_cacheSize;