Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset values for benchmarks #20

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions test/testFFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,16 @@ TEST_CASE("FFT benchmark", "[single-file]")

BENCHMARK("Radix2 FFT")
{
sdsp::fft_radix2(complexValues);
return complexValues;
sdsp::complex_array<1024> complexValues2 = complexValues;
sdsp::fft_radix2(complexValues2);
return complexValues2;
};

BENCHMARK("Radix4 FFT")
{
sdsp::fft_radix4(complexValues);
return complexValues;
sdsp::complex_array<1024> complexValues2 = complexValues;
sdsp::fft_radix4(complexValues2);
return complexValues2;
};

SUCCEED("Benchmark placeholder assertion");
Expand Down
30 changes: 18 additions & 12 deletions test/testIIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,16 @@ TEST_CASE("Filter benchmarks")

BENCHMARK("Runtime configurable LP filter benchmark")
{
df.Process(data.begin(), data.end());
return data;
std::array<double, 4096> data2 = data;
df.Process(data2.begin(), data2.end());
return data2;
};

BENCHMARK("Specialized LP filter benchmark")
{
df2.process(data.begin(), data.end());
return data;
std::array<double, 4096> data2 = data;
df2.process(data2.begin(), data2.end());
return data2;
};
SUCCEED();
}
Expand All @@ -416,14 +418,16 @@ TEST_CASE("Filter benchmarks")

BENCHMARK("Runtime configurable HP filter benchmark")
{
df.Process(data.begin(), data.end());
return data;
std::array<double, 4096> data2 = data;
df.Process(data2.begin(), data2.end());
return data2;
};

BENCHMARK("Specialized HP filter benchmark")
{
df2.process(data.begin(), data.end());
return data;
std::array<double, 4096> data2 = data;
df2.process(data2.begin(), data2.end());
return data2;
};
SUCCEED();
}
Expand All @@ -445,14 +449,16 @@ TEST_CASE("Filter benchmarks")

BENCHMARK("Runtime configurable BP filter benchmark")
{
df.Process(data.begin(), data.end());
return data;
std::array<double, 4096> data2 = data;
df.Process(data2.begin(), data2.end());
return data2;
};

BENCHMARK("Specialized BP filter benchmark")
{
df2.process(data.begin(), data.end());
return data;
std::array<double, 4096> data2 = data;
df2.process(data2.begin(), data2.end());
return data2;
};
SUCCEED();
}
Expand Down
Loading