From d11c1cd6daf326cf769ca55b237ea2bf25c233b9 Mon Sep 17 00:00:00 2001 From: Jules P?nuchot Date: Tue, 30 May 2023 13:36:14 +0200 Subject: [PATCH 1/6] added vcpkg/ to .gitignore --- example/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 example/.gitignore diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..78eb9f3 --- /dev/null +++ b/example/.gitignore @@ -0,0 +1 @@ +vcpkg/ From 80156e12648096574f53e4116dc37e541e11648e Mon Sep 17 00:00:00 2001 From: Jules P?nuchot Date: Tue, 30 May 2023 16:49:06 +0200 Subject: [PATCH 2/6] removed useless header --- grapher/lib/grapher/predicates.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/grapher/lib/grapher/predicates.cpp b/grapher/lib/grapher/predicates.cpp index 77dbdcf..a10e32c 100644 --- a/grapher/lib/grapher/predicates.cpp +++ b/grapher/lib/grapher/predicates.cpp @@ -1,4 +1,3 @@ -#include #include #include From 7f142dc57139173a8fdebeb5dec037fcd8d6e5f2 Mon Sep 17 00:00:00 2001 From: Jules P?nuchot Date: Tue, 30 May 2023 16:52:08 +0200 Subject: [PATCH 3/6] header cleanup --- grapher/lib/grapher/plotters/compare_by.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grapher/lib/grapher/plotters/compare_by.cpp b/grapher/lib/grapher/plotters/compare_by.cpp index 9038e2a..8167b55 100644 --- a/grapher/lib/grapher/plotters/compare_by.cpp +++ b/grapher/lib/grapher/plotters/compare_by.cpp @@ -1,6 +1,4 @@ -#include "grapher/predicates.hpp" #include -#include #include #include #include @@ -17,6 +15,7 @@ #include #include +#include #include #include #include From a06e1d696baf31f6df76a10c325e4f031206832f Mon Sep 17 00:00:00 2001 From: Jules P?nuchot Date: Tue, 30 May 2023 17:03:08 +0200 Subject: [PATCH 4/6] proper TBB linkage for parallel algorithms --- cmake/dependencies.cmake | 1 + grapher/cmake/grapher-target.cmake | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 9a1b8a1..e575640 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -8,6 +8,7 @@ find_package(Boost REQUIRED) find_package(sciplot REQUIRED) find_package(LLVM REQUIRED CONFIG) find_package(fmt REQUIRED) +find_package(TBB REQUIRED) if(${CTBENCH_ENABLE_TESTS}) find_package(Catch2 REQUIRED) diff --git a/grapher/cmake/grapher-target.cmake b/grapher/cmake/grapher-target.cmake index dbbe55c..1212686 100644 --- a/grapher/cmake/grapher-target.cmake +++ b/grapher/cmake/grapher-target.cmake @@ -12,12 +12,13 @@ llvm_map_components_to_libnames(llvm_libs support) target_link_libraries(grapher PUBLIC + ${llvm_libs} + TBB::tbb ctbench-compile-opts + fmt::fmt nlohmann_json::nlohmann_json sciplot::sciplot - fmt::fmt stdc++fs - tbb - ${llvm_libs}) +) target_compile_options(grapher PUBLIC -DJSON_NOEXCEPTION) From ac1753a596aa8a29c9ad04c42ff92dcfb9066a5c Mon Sep 17 00:00:00 2001 From: Jules P?nuchot Date: Tue, 30 May 2023 17:16:08 +0200 Subject: [PATCH 5/6] TBB::tbb as a private library --- grapher/cmake/grapher-target.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grapher/cmake/grapher-target.cmake b/grapher/cmake/grapher-target.cmake index 1212686..14b71b9 100644 --- a/grapher/cmake/grapher-target.cmake +++ b/grapher/cmake/grapher-target.cmake @@ -10,10 +10,11 @@ target_include_directories(grapher llvm_map_components_to_libnames(llvm_libs support) +target_link_libraries(grapher PRIVATE TBB::tbb) + target_link_libraries(grapher PUBLIC ${llvm_libs} - TBB::tbb ctbench-compile-opts fmt::fmt nlohmann_json::nlohmann_json From cb7c40a9dd2e18ba0e5c64258add616054a185df Mon Sep 17 00:00:00 2001 From: Jules P?nuchot Date: Tue, 30 May 2023 17:28:40 +0200 Subject: [PATCH 6/6] dropping tbb --- cmake/dependencies.cmake | 1 - grapher/cmake/grapher-target.cmake | 2 -- grapher/lib/grapher/plotters/compare_by.cpp | 4 +--- grapher/lib/grapher/utils/json.cpp | 5 ++--- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index e575640..9a1b8a1 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -8,7 +8,6 @@ find_package(Boost REQUIRED) find_package(sciplot REQUIRED) find_package(LLVM REQUIRED CONFIG) find_package(fmt REQUIRED) -find_package(TBB REQUIRED) if(${CTBENCH_ENABLE_TESTS}) find_package(Catch2 REQUIRED) diff --git a/grapher/cmake/grapher-target.cmake b/grapher/cmake/grapher-target.cmake index 14b71b9..bb0c0d3 100644 --- a/grapher/cmake/grapher-target.cmake +++ b/grapher/cmake/grapher-target.cmake @@ -10,8 +10,6 @@ target_include_directories(grapher llvm_map_components_to_libnames(llvm_libs support) -target_link_libraries(grapher PRIVATE TBB::tbb) - target_link_libraries(grapher PUBLIC ${llvm_libs} diff --git a/grapher/lib/grapher/plotters/compare_by.cpp b/grapher/lib/grapher/plotters/compare_by.cpp index 8167b55..6b6b8e1 100644 --- a/grapher/lib/grapher/plotters/compare_by.cpp +++ b/grapher/lib/grapher/plotters/compare_by.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -306,8 +305,7 @@ void plotter_compare_by_t::plot(benchmark_set_t const &bset, fs::create_directories(dest); // Drawing, ie. unwrapping the nested maps and drawing curves + saving plots - std::for_each(std::execution::par_unseq, curve_aggregate_map.begin(), - curve_aggregate_map.end(), + std::for_each(curve_aggregate_map.begin(), curve_aggregate_map.end(), [&](auto const &aggregate_key_value) { generate_plot(aggregate_key_value, {.plot_output_folder = dest, diff --git a/grapher/lib/grapher/utils/json.cpp b/grapher/lib/grapher/utils/json.cpp index 683adf5..18da8a3 100644 --- a/grapher/lib/grapher/utils/json.cpp +++ b/grapher/lib/grapher/utils/json.cpp @@ -1,5 +1,4 @@ #include -#include #include #include @@ -132,8 +131,8 @@ filtered_values_sums(benchmark_instance_t const &instance, return val; }; - std::transform(std::execution::par_unseq, instance.repetitions.begin(), - instance.repetitions.end(), res.begin(), get_val); + std::transform(instance.repetitions.begin(), instance.repetitions.end(), + res.begin(), get_val); return res; }