commit 5e2a88313d7e76141f7b26525280f99667df413e
parent 1b7ede0dfaeaa7b8f0dde1ce2112ee56f79bd152
Author: Matt Demanett <matt@demanett.net>
Date: Mon, 10 Feb 2020 00:27:16 -0500
Fix benchmarks build.
Diffstat:
3 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/benchmarks/analyzer_benchmark.cpp b/benchmarks/analyzer_benchmark.cpp
@@ -90,23 +90,23 @@ static void BM_SpectrumAnalyzerStep(benchmark::State& state) {
}
BENCHMARK(BM_SpectrumAnalyzerStep);
-static void BM_SpectrumAnalyzerProcess(benchmark::State& state) {
- SpectrumAnalyzer sa(
- SpectrumAnalyzer::SIZE_1024,
- SpectrumAnalyzer::OVERLAP_1,
- SpectrumAnalyzer::WINDOW_HANNING,
- 44100.0
- );
- float in[8] = { 0.0, 0.7, 1.0, 0.7, 0.0, -0.7, -1.0, -0.7 };
- for (int i = 0; i < 1024; ++i) {
- sa.step(in[i % 8]);
- }
-
- for (auto _ : state) {
- sa.process(sa._samples);
- }
-}
-BENCHMARK(BM_SpectrumAnalyzerProcess);
+// static void BM_SpectrumAnalyzerProcess(benchmark::State& state) {
+// SpectrumAnalyzer sa(
+// SpectrumAnalyzer::SIZE_1024,
+// SpectrumAnalyzer::OVERLAP_1,
+// SpectrumAnalyzer::WINDOW_HANNING,
+// 44100.0
+// );
+// float in[8] = { 0.0, 0.7, 1.0, 0.7, 0.0, -0.7, -1.0, -0.7 };
+// for (int i = 0; i < 1024; ++i) {
+// sa.step(in[i % 8]);
+// }
+//
+// for (auto _ : state) {
+// sa.process(sa._samples);
+// }
+// }
+// BENCHMARK(BM_SpectrumAnalyzerProcess);
static void BM_SpectrumAnalyzerGetMagnitudes(benchmark::State& state) {
SpectrumAnalyzer sa(
diff --git a/benchmarks/buffer_benchmark.cpp b/benchmarks/buffer_benchmark.cpp
@@ -7,7 +7,7 @@ using namespace bogaudio::dsp;
struct BMOverlappingBuffer : OverlappingBuffer<float> {
BMOverlappingBuffer(int size, int o) : OverlappingBuffer(size, o) {}
- void process(float* samples) override {}
+ void processBuffer(float* samples) override {}
};
static void BM_OverlappingBuffer(benchmark::State& state) {
diff --git a/benchmarks/filter_benchmark.cpp b/benchmarks/filter_benchmark.cpp
@@ -3,7 +3,7 @@
#include "dsp/noise.hpp"
#include "dsp/filter.hpp"
-#include "dsp/decimator.hpp" // rack
+// #include "dsp/decimator.hpp" // rack
using namespace bogaudio::dsp;
@@ -35,16 +35,16 @@ static void BM_CICDecimator(benchmark::State& state) {
}
BENCHMARK(BM_CICDecimator);
-static void BM_RackDecimator(benchmark::State& state) {
- WhiteNoiseGenerator r;
- const int n = 8;
- float buf[n];
- for (int i = 0; i < n; ++i) {
- buf[i] = r.next();
- }
- rack::Decimator<n, n> d;
- for (auto _ : state) {
- benchmark::DoNotOptimize(d.process(buf));
- }
-}
-BENCHMARK(BM_RackDecimator);
+// static void BM_RackDecimator(benchmark::State& state) {
+// WhiteNoiseGenerator r;
+// const int n = 8;
+// float buf[n];
+// for (int i = 0; i < n; ++i) {
+// buf[i] = r.next();
+// }
+// rack::Decimator<n, n> d;
+// for (auto _ : state) {
+// benchmark::DoNotOptimize(d.process(buf));
+// }
+// }
+// BENCHMARK(BM_RackDecimator);