Skip to content

Commit

Permalink
Make nosonar_node_api non-SIMD-only
Browse files Browse the repository at this point in the history
With `sink::processOne` being non-const the merged graphs in this
benchmark are always non-SIMD. Consequently the processOne_simd calls
become ill-formed and need to be removed. Thus, there's no difference
anymore when compiling with DISABLE_SIMD and that extra benchmark
executable can go.

Signed-off-by: Matthias Kretz <[email protected]>
  • Loading branch information
mattkretz committed Sep 25, 2024
1 parent ad37f3e commit dae1d94
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
5 changes: 0 additions & 5 deletions core/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,3 @@ add_gr_benchmark(bm_Scheduler)
add_gr_benchmark(bm-nosonar_node_api)
add_gr_benchmark(bm_fft)
target_link_libraries(bm_fft PRIVATE gr-fourier)

add_executable(bm-nosonar_node_api_nosimd bm-nosonar_node_api.cpp)
append_compiler_flags(bm-nosonar_node_api_nosimd)
target_compile_options(bm-nosonar_node_api_nosimd PRIVATE -DDISABLE_SIMD=1)
target_link_libraries(bm-nosonar_node_api_nosimd PRIVATE gnuradio-options gnuradio-core refl-cpp fmt ut ut-benchmark gr-basic gr-math gr-testing)
7 changes: 0 additions & 7 deletions core/benchmarks/bm-nosonar_node_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,9 @@ void loop_over_processOne(auto& node) {
using namespace benchmark;
bm::test::n_samples_produced = 0LU;
bm::test::n_samples_consumed = 0LU;
#if DISABLE_SIMD
for (std::size_t i = 0; i < N_SAMPLES; i++) {
node.processOne();
}
#else
constexpr int N = 32;
for (std::size_t i = 0; i < N_SAMPLES / N; i++) {
node.template processOne_simd(std::integral_constant<std::size_t, N>{});
}
#endif
expect(eq(bm::test::n_samples_produced, N_SAMPLES)) << "produced too many/few samples";
expect(eq(bm::test::n_samples_consumed, N_SAMPLES)) << "consumed too many/few samples";
}
Expand Down

0 comments on commit dae1d94

Please sign in to comment.