File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,17 @@ FetchContent_Declare(
19
19
)
20
20
FetchContent_MakeAvailable(google-benchmark)
21
21
22
- add_executable (bench-naive naive.cpp main- no - log .cpp)
22
+ add_executable (bench-naive naive.cpp main.cpp)
23
23
target_link_libraries (bench-naive src-lib benchmark::benchmark)
24
24
25
- add_executable (bench-hl-filter hl-filter .cpp)
26
- target_link_libraries (bench-hl-filter src-lib benchmark::benchmark_main )
25
+ add_executable (bench-hl-filter hl-filter .cpp main.cpp )
26
+ target_link_libraries (bench-hl-filter src-lib benchmark::benchmark )
27
27
28
- add_executable (bench-exps exps.cpp)
29
- target_link_libraries (bench-exps src-lib benchmark::benchmark_main )
28
+ add_executable (bench-exps exps.cpp main.cpp )
29
+ target_link_libraries (bench-exps src-lib benchmark::benchmark )
30
30
31
- add_executable (bench-prepare prepare-derivatives.cpp)
32
- target_link_libraries (bench-prepare src-lib benchmark::benchmark_main )
31
+ add_executable (bench-prepare prepare-derivatives.cpp main.cpp )
32
+ target_link_libraries (bench-prepare src-lib benchmark::benchmark )
33
33
34
34
if (ENABLE_CILK)
35
35
add_executable (bench-fftw-cilk fftw-cilk.cpp)
Original file line number Diff line number Diff line change 2
2
#include < spdlog/cfg/env.h>
3
3
#include < spdlog/spdlog.h>
4
4
5
+ #include " cilk.hpp"
6
+
5
7
int main (int argc, char **argv) {
6
8
// No logging in benchmarks (unless overridden via environment variable)
7
9
spdlog::set_level (spdlog::level::off);
8
10
spdlog::cfg::load_env_levels ();
9
11
10
- benchmark::Initialize (&argc, argv);
11
- benchmark::RunSpecifiedBenchmarks ();
12
- benchmark::Shutdown ();
12
+ // Invoke a cilk_scope to avoid Cilk startup/shutdown in benchmarks
13
+ cilk_scope {
14
+ benchmark::Initialize (&argc, argv);
15
+ benchmark::RunSpecifiedBenchmarks ();
16
+ benchmark::Shutdown ();
17
+ }
13
18
}
You can’t perform that action at this time.
0 commit comments