From 75898c93b0a11f69f57fd69193b0d13ac471ba85 Mon Sep 17 00:00:00 2001 From: Joana Niermann Date: Tue, 3 Mar 2026 17:09:25 +0100 Subject: [PATCH 1/2] Deduplicate the benchmarks lib --- benchmarks/CMakeLists.txt | 185 +++++++----------- benchmarks/array/array_matrix.cpp | 121 ------------ benchmarks/array/array_vector.cpp | 69 ------- .../benchmark/common/benchmark_matrix.hpp | 176 ++++++++++++----- .../benchmark/common/benchmark_transform3.hpp | 10 + .../benchmark/common/benchmark_types.hpp | 62 ++++++ .../benchmark/common/benchmark_vector.hpp | 97 ++++++--- .../src/benchmark_getter.cpp} | 10 +- benchmarks/common/src/benchmark_matrix.cpp | 57 ++++++ .../src/benchmark_transform3.cpp} | 34 ++-- benchmarks/common/src/benchmark_vector.cpp | 57 ++++++ benchmarks/eigen/eigen_getter.cpp | 41 ---- benchmarks/eigen/eigen_matrix.cpp | 121 ------------ benchmarks/eigen/eigen_transform3.cpp | 48 ----- benchmarks/eigen/eigen_vector.cpp | 69 ------- benchmarks/fastor/fastor_getter.cpp | 41 ---- benchmarks/fastor/fastor_matrix.cpp | 121 ------------ benchmarks/fastor/fastor_transform3.cpp | 45 ----- benchmarks/fastor/fastor_vector.cpp | 70 ------- benchmarks/vc_aos/vc_aos_getter.cpp | 42 ---- benchmarks/vc_aos/vc_aos_matrix.cpp | 121 ------------ benchmarks/vc_aos/vc_aos_transform3.cpp | 48 ----- benchmarks/vc_aos/vc_aos_vector.cpp | 70 ------- benchmarks/vc_soa/vc_soa_getter.cpp | 2 +- benchmarks/vc_soa/vc_soa_matrix.cpp | 132 ++++++------- benchmarks/vc_soa/vc_soa_transform3.cpp | 4 +- benchmarks/vc_soa/vc_soa_vector.cpp | 54 +---- 27 files changed, 556 insertions(+), 1351 deletions(-) delete mode 100644 benchmarks/array/array_matrix.cpp delete mode 100644 benchmarks/array/array_vector.cpp create mode 100644 benchmarks/common/include/benchmark/common/benchmark_types.hpp rename benchmarks/{array/array_getter.cpp => common/src/benchmark_getter.cpp} (75%) create mode 100644 benchmarks/common/src/benchmark_matrix.cpp rename benchmarks/{array/array_transform3.cpp => common/src/benchmark_transform3.cpp} (51%) create mode 100644 benchmarks/common/src/benchmark_vector.cpp delete mode 100644 benchmarks/eigen/eigen_getter.cpp delete mode 100644 benchmarks/eigen/eigen_matrix.cpp delete mode 100644 benchmarks/eigen/eigen_transform3.cpp delete mode 100644 benchmarks/eigen/eigen_vector.cpp delete mode 100644 benchmarks/fastor/fastor_getter.cpp delete mode 100644 benchmarks/fastor/fastor_matrix.cpp delete mode 100644 benchmarks/fastor/fastor_transform3.cpp delete mode 100644 benchmarks/fastor/fastor_vector.cpp delete mode 100644 benchmarks/vc_aos/vc_aos_getter.cpp delete mode 100644 benchmarks/vc_aos/vc_aos_matrix.cpp delete mode 100644 benchmarks/vc_aos/vc_aos_transform3.cpp delete mode 100644 benchmarks/vc_aos/vc_aos_vector.cpp diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index def496b2..a767a3e6 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -1,6 +1,6 @@ # Algebra plugins library, part of the ACTS project (R&D line) # -# (c) 2023 CERN for the benefit of the ACTS project +# (c) 2023-2026 CERN for the benefit of the ACTS project # # Mozilla Public License Version 2.0 @@ -9,112 +9,98 @@ include(algebra-plugins-compiler-options-cpp) # Set up an INTERFACE library for the common header(s). add_library(algebra_bench_common INTERFACE) + target_include_directories( algebra_bench_common INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/common/include" ) + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") target_compile_definitions( algebra_bench_common INTERFACE -D_USE_MATH_DEFINES ) endif() + add_library(algebra::bench_common ALIAS algebra_bench_common) -# Set up all of the (available) "host" benchmarks. -add_library(algebra_bench_array INTERFACE) -target_include_directories( - algebra_bench_array - INTERFACE "$" -) -target_link_libraries( - algebra_bench_array - INTERFACE algebra::array algebra::common -) -algebra_add_benchmark( array_getter - "array/array_getter.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_array algebra::array -) -algebra_add_benchmark( array_vector - "array/array_vector.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_array algebra::array -) -algebra_add_benchmark( array_transform3 - "array/array_transform3.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_array algebra::array -) -algebra_add_benchmark( array_matrix - "array/array_matrix.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_array algebra::array -) +# Macro setting up the CPU benchmarks for a specific algebra plugin. +macro(algebra_add_benchmarks plugin) + string(TOUPPER ${plugin} PLUGIN) + + add_library(algebra_bench_${plugin} INTERFACE) -if(ALGEBRA_PLUGINS_INCLUDE_EIGEN) - add_library(algebra_bench_eigen INTERFACE) target_include_directories( - algebra_bench_eigen - INTERFACE "$" + algebra_bench_${plugin} + INTERFACE + "$" ) + target_link_libraries( - algebra_bench_eigen - INTERFACE algebra::eigen algebra::common - ) - algebra_add_benchmark(eigen_getter - "eigen/eigen_getter.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_eigen algebra::eigen + algebra_bench_${plugin} + INTERFACE algebra::${plugin} algebra::common ) - algebra_add_benchmark(eigen_vector - "eigen/eigen_vector.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_eigen algebra::eigen - ) - algebra_add_benchmark(eigen_transform3 - "eigen/eigen_transform3.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_eigen algebra::eigen + + algebra_add_benchmark( ${plugin}_getter + "common/src/benchmark_getter.cpp" + LINK_LIBRARIES benchmark::benchmark algebra::bench_common + algebra_bench_${plugin} algebra::${plugin} ) - algebra_add_benchmark(eigen_matrix - "eigen/eigen_matrix.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_eigen algebra::eigen + target_compile_definitions( + algebra_benchmark_${plugin}_getter + PUBLIC ALGEBRA_BENCHMARK_${PLUGIN} ) -endif() -if(ALGEBRA_PLUGINS_INCLUDE_VC) - add_library(algebra_bench_vc_aos INTERFACE) - target_include_directories( - algebra_bench_vc_aos - INTERFACE - "$" + algebra_add_benchmark( ${plugin}_vector + "common/src/benchmark_vector.cpp" + LINK_LIBRARIES benchmark::benchmark algebra::bench_common + algebra_bench_${plugin} algebra::${plugin} ) - target_link_libraries( - algebra_bench_vc_aos - INTERFACE algebra::vc_aos algebra::common + target_compile_definitions( + algebra_benchmark_${plugin}_vector + PUBLIC ALGEBRA_BENCHMARK_${PLUGIN} ) - algebra_add_benchmark(vc_aos_getter - "vc_aos/vc_aos_getter.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_vc_aos algebra::vc_aos + + algebra_add_benchmark( ${plugin}_transform3 + "common/src/benchmark_transform3.cpp" + LINK_LIBRARIES benchmark::benchmark algebra::bench_common + algebra_bench_${plugin} algebra::${plugin} ) - algebra_add_benchmark(vc_aos_vector - "vc_aos/vc_aos_vector.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_vc_aos algebra::vc_aos + target_compile_definitions( + algebra_benchmark_${plugin}_transform3 + PUBLIC ALGEBRA_BENCHMARK_${PLUGIN} ) - algebra_add_benchmark(vc_aos_transform3 - "vc_aos/vc_aos_transform3.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_vc_aos algebra::vc_aos + + algebra_add_benchmark( ${plugin}_matrix + "common/src/benchmark_matrix.cpp" + LINK_LIBRARIES benchmark::benchmark algebra::bench_common + algebra_bench_${plugin} algebra::${plugin} ) - algebra_add_benchmark(vc_aos_matrix - "vc_aos/vc_aos_matrix.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_vc_aos algebra::vc_aos + target_compile_definitions( + algebra_benchmark_${plugin}_matrix + PUBLIC ALGEBRA_BENCHMARK_${PLUGIN} ) +endmacro() + +# Set up all of the (available) "host" benchmarks. +if(ALGEBRA_PLUGINS_INCLUDE_ARRAY) + algebra_add_benchmarks(array) +endif() + +if(ALGEBRA_PLUGINS_INCLUDE_EIGEN) + algebra_add_benchmarks(eigen) +endif() + +if(ALGEBRA_PLUGINS_INCLUDE_FASTOR) + algebra_add_benchmarks(fastor) +endif() + +if(ALGEBRA_PLUGINS_INCLUDE_SMATRIX) + algebra_add_benchmarks(smatrix) +endif() + +if(ALGEBRA_PLUGINS_INCLUDE_VC) + algebra_add_benchmarks(vc_aos) add_library(algebra_bench_vc_soa INTERFACE) target_include_directories( @@ -147,40 +133,3 @@ if(ALGEBRA_PLUGINS_INCLUDE_VC) algebra_bench_vc_soa algebra::vc_soa ) endif() - -if(ALGEBRA_PLUGINS_INCLUDE_FASTOR) - add_library(algebra_bench_fastor INTERFACE) - message( - STATUS - "Include directory: ${CMAKE_CURRENT_SOURCE_DIR}/fastor/include" - ) - target_include_directories( - algebra_bench_fastor - INTERFACE - "$" - ) - target_link_libraries( - algebra_bench_fastor - INTERFACE algebra::fastor algebra::common - ) - algebra_add_benchmark(fastor_getter - "fastor/fastor_getter.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_fastor algebra::fastor - ) - algebra_add_benchmark(fastor_vector - "fastor/fastor_vector.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_fastor algebra::fastor - ) - algebra_add_benchmark(fastor_transform3 - "fastor/fastor_transform3.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_fastor algebra::fastor - ) - algebra_add_benchmark(fastor_matrix - "fastor/fastor_matrix.cpp" - LINK_LIBRARIES benchmark::benchmark algebra::bench_common - algebra_bench_fastor algebra::fastor - ) -endif() diff --git a/benchmarks/array/array_matrix.cpp b/benchmarks/array/array_matrix.cpp deleted file mode 100644 index 21d9908c..00000000 --- a/benchmarks/array/array_matrix.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/array.hpp" -#include "benchmark/array/data_generator.hpp" -#include "benchmark/common/benchmark_matrix.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using mat44_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat44_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - - using mat44_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat44_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - - using mat44_det_f_t = - matrix_unaryOP_bm, bench_op::determinant>; - using mat44_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat66_det_f_t = - matrix_unaryOP_bm, bench_op::determinant>; - using mat66_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat88_det_f_t = - matrix_unaryOP_bm, bench_op::determinant>; - using mat88_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - - using mat44_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat44_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - - using mat44_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat44_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - - using mat44_vec_f_t = matrix_vector_bm, - array::vector_type>; - using mat44_vec_d_t = matrix_vector_bm, - array::vector_type>; - using mat66_vec_f_t = matrix_vector_bm, - array::vector_type>; - using mat66_vec_d_t = matrix_vector_bm, - array::vector_type>; - using mat88_vec_f_t = matrix_vector_bm, - array::vector_type>; - using mat88_vec_d_t = matrix_vector_bm, - array::vector_type>; - - std::cout << "-----------------------------------------------\n" - << "Algebra-Plugins 'matrix' benchmark (std::array)\n" - << "-----------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/array/array_vector.cpp b/benchmarks/array/array_vector.cpp deleted file mode 100644 index 47be948a..00000000 --- a/benchmarks/array/array_vector.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2023-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/array.hpp" -#include "benchmark/array/data_generator.hpp" -#include "benchmark/common/benchmark_vector.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using phi_f_t = vector_unaryOP_bm; - using theta_f_t = vector_unaryOP_bm; - using perp_f_t = vector_unaryOP_bm; - using norm_f_t = vector_unaryOP_bm; - using eta_f_t = vector_unaryOP_bm; - - using add_f_t = vector_binaryOP_bm; - using sub_f_t = vector_binaryOP_bm; - using dot_f_t = vector_binaryOP_bm; - using cross_f_t = vector_binaryOP_bm; - using normlz_f_t = - vector_unaryOP_bm; - - using phi_d_t = vector_unaryOP_bm; - using theta_d_t = vector_unaryOP_bm; - using perp_d_t = vector_unaryOP_bm; - using norm_d_t = vector_unaryOP_bm; - using eta_d_t = vector_unaryOP_bm; - - using add_d_t = vector_binaryOP_bm; - using sub_d_t = vector_binaryOP_bm; - using dot_d_t = vector_binaryOP_bm; - using cross_d_t = vector_binaryOP_bm; - using normlz_d_t = - vector_unaryOP_bm; - - std::cout << "-----------------------------------------------\n" - << "Algebra-Plugins 'vector' benchmark (std::array)\n" - << "-----------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp b/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp index 5bc6ba1c..967db3e6 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp +++ b/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp @@ -8,6 +8,7 @@ #pragma once // Project include(s) +#include "algebra/concepts.hpp" #include "benchmark_base.hpp" #include "register_benchmark.hpp" @@ -162,7 +163,7 @@ struct matrix_vector_bm : public matrix_bm { }; // Functions to be benchmarked -namespace bench_op { +namespace bench_op::matrix { struct add { static constexpr std::string_view name{"add"}; @@ -207,50 +208,133 @@ struct invert { } }; -} // namespace bench_op - -// Macro for registering all vector benchmarks -#define ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(CFG) \ - algebra::register_benchmark(CFG, "_4x4_single"); \ - algebra::register_benchmark(CFG, "_4x4_double"); \ - algebra::register_benchmark(CFG, "_6x6_single"); \ - algebra::register_benchmark(CFG, "_6x6_double"); \ - algebra::register_benchmark(CFG, "_8x8_single"); \ - algebra::register_benchmark(CFG, "_8x8_double"); \ - \ - algebra::register_benchmark(CFG, "_4x4_single"); \ - algebra::register_benchmark(CFG, "_4x4_double"); \ - algebra::register_benchmark(CFG, "_6x6_single"); \ - algebra::register_benchmark(CFG, "_6x6_double"); \ - algebra::register_benchmark(CFG, "_8x8_single"); \ - algebra::register_benchmark(CFG, "_8x8_double"); \ - \ - algebra::register_benchmark(CFG, "_4x4_single"); \ - algebra::register_benchmark(CFG, "_4x4_double"); \ - algebra::register_benchmark(CFG, "_6x6_single"); \ - algebra::register_benchmark(CFG, "_6x6_double"); \ - algebra::register_benchmark(CFG, "_8x8_single"); \ - algebra::register_benchmark(CFG, "_8x8_double"); \ - \ - algebra::register_benchmark(CFG, "_4x4_single"); \ - algebra::register_benchmark(CFG, "_4x4_double"); \ - algebra::register_benchmark(CFG, "_6x6_single"); \ - algebra::register_benchmark(CFG, "_6x6_double"); \ - algebra::register_benchmark(CFG, "_8x8_single"); \ - algebra::register_benchmark(CFG, "_8x8_double"); \ - \ - algebra::register_benchmark(CFG, "_4x4_single"); \ - algebra::register_benchmark(CFG, "_4x4_double"); \ - algebra::register_benchmark(CFG, "_6x6_single"); \ - algebra::register_benchmark(CFG, "_6x6_double"); \ - algebra::register_benchmark(CFG, "_8x8_single"); \ - algebra::register_benchmark(CFG, "_8x8_double"); \ - \ - algebra::register_benchmark(CFG, "_4x4_single"); \ - algebra::register_benchmark(CFG, "_4x4_double"); \ - algebra::register_benchmark(CFG, "_6x6_single"); \ - algebra::register_benchmark(CFG, "_6x6_double"); \ - algebra::register_benchmark(CFG, "_8x8_single"); \ - algebra::register_benchmark(CFG, "_8x8_double"); +} // namespace bench_op::matrix + +// Macro for defining all matrix benchmark types +#define ALGEBRA_PLUGINS_DEFINE_MATRIX_BENCH(PLUGIN) \ + using mat44_transp_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::transpose>; \ + using mat44_transp_d_t = \ + matrix_unaryOP_bm, \ + bench_op::matrix::transpose>; \ + using mat66_transp_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::transpose>; \ + using mat66_transp_d_t = \ + matrix_unaryOP_bm, \ + bench_op::matrix::transpose>; \ + using mat88_transp_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::transpose>; \ + using mat88_transp_d_t = \ + matrix_unaryOP_bm, \ + bench_op::matrix::transpose>; \ + \ + using mat44_inv_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::invert>; \ + using mat44_inv_d_t = matrix_unaryOP_bm, \ + bench_op::matrix::invert>; \ + using mat66_inv_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::invert>; \ + using mat66_inv_d_t = matrix_unaryOP_bm, \ + bench_op::matrix::invert>; \ + using mat88_inv_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::invert>; \ + using mat88_inv_d_t = matrix_unaryOP_bm, \ + bench_op::matrix::invert>; \ + \ + using mat44_det_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::determinant>; \ + using mat44_det_d_t = matrix_unaryOP_bm, \ + bench_op::matrix::determinant>; \ + using mat66_det_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::determinant>; \ + using mat66_det_d_t = matrix_unaryOP_bm, \ + bench_op::matrix::determinant>; \ + using mat88_det_f_t = matrix_unaryOP_bm, \ + bench_op::matrix::determinant>; \ + using mat88_det_d_t = matrix_unaryOP_bm, \ + bench_op::matrix::determinant>; \ + \ + using mat44_add_f_t = matrix_binaryOP_bm, \ + bench_op::matrix::add>; \ + using mat44_add_d_t = matrix_binaryOP_bm, \ + bench_op::matrix::add>; \ + using mat66_add_f_t = matrix_binaryOP_bm, \ + bench_op::matrix::add>; \ + using mat66_add_d_t = matrix_binaryOP_bm, \ + bench_op::matrix::add>; \ + using mat88_add_f_t = matrix_binaryOP_bm, \ + bench_op::matrix::add>; \ + using mat88_add_d_t = matrix_binaryOP_bm, \ + bench_op::matrix::add>; \ + \ + using mat44_mul_f_t = matrix_binaryOP_bm, \ + bench_op::matrix::mul>; \ + using mat44_mul_d_t = matrix_binaryOP_bm, \ + bench_op::matrix::mul>; \ + using mat66_mul_f_t = matrix_binaryOP_bm, \ + bench_op::matrix::mul>; \ + using mat66_mul_d_t = matrix_binaryOP_bm, \ + bench_op::matrix::mul>; \ + using mat88_mul_f_t = matrix_binaryOP_bm, \ + bench_op::matrix::mul>; \ + using mat88_mul_d_t = matrix_binaryOP_bm, \ + bench_op::matrix::mul>; \ + \ + using mat44_vec_f_t = matrix_vector_bm, \ + PLUGIN::vector_type>; \ + using mat44_vec_d_t = matrix_vector_bm, \ + PLUGIN::vector_type>; \ + using mat66_vec_f_t = matrix_vector_bm, \ + PLUGIN::vector_type>; \ + using mat66_vec_d_t = matrix_vector_bm, \ + PLUGIN::vector_type>; \ + using mat88_vec_f_t = matrix_vector_bm, \ + PLUGIN::vector_type>; \ + using mat88_vec_d_t = matrix_vector_bm, \ + PLUGIN::vector_type>; + +// Macro for registering all matrix benchmarks +#define ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(CFGS, CFGD) \ + algebra::register_benchmark(CFGS, "_4x4_single"); \ + algebra::register_benchmark(CFGD, "_4x4_double"); \ + algebra::register_benchmark(CFGS, "_6x6_single"); \ + algebra::register_benchmark(CFGD, "_6x6_double"); \ + algebra::register_benchmark(CFGS, "_8x8_single"); \ + algebra::register_benchmark(CFGD, "_8x8_double"); \ + \ + algebra::register_benchmark(CFGS, "_4x4_single"); \ + algebra::register_benchmark(CFGD, "_4x4_double"); \ + algebra::register_benchmark(CFGS, "_6x6_single"); \ + algebra::register_benchmark(CFGD, "_6x6_double"); \ + algebra::register_benchmark(CFGS, "_8x8_single"); \ + algebra::register_benchmark(CFGD, "_8x8_double"); \ + \ + algebra::register_benchmark(CFGS, "_4x4_single"); \ + algebra::register_benchmark(CFGD, "_4x4_double"); \ + algebra::register_benchmark(CFGS, "_6x6_single"); \ + algebra::register_benchmark(CFGD, "_6x6_double"); \ + algebra::register_benchmark(CFGS, "_8x8_single"); \ + algebra::register_benchmark(CFGD, "_8x8_double"); \ + \ + algebra::register_benchmark(CFGS, "_4x4_single"); \ + algebra::register_benchmark(CFGD, "_4x4_double"); \ + algebra::register_benchmark(CFGS, "_6x6_single"); \ + algebra::register_benchmark(CFGD, "_6x6_double"); \ + algebra::register_benchmark(CFGS, "_8x8_single"); \ + algebra::register_benchmark(CFGD, "_8x8_double"); \ + \ + algebra::register_benchmark(CFGS, "_4x4_single"); \ + algebra::register_benchmark(CFGD, "_4x4_double"); \ + algebra::register_benchmark(CFGS, "_6x6_single"); \ + algebra::register_benchmark(CFGD, "_6x6_double"); \ + algebra::register_benchmark(CFGS, "_8x8_single"); \ + algebra::register_benchmark(CFGD, "_8x8_double"); \ + \ + algebra::register_benchmark(CFGS, "_4x4_single"); \ + algebra::register_benchmark(CFGD, "_4x4_double"); \ + algebra::register_benchmark(CFGS, "_6x6_single"); \ + algebra::register_benchmark(CFGD, "_6x6_double"); \ + algebra::register_benchmark(CFGS, "_8x8_single"); \ + algebra::register_benchmark(CFGD, "_8x8_double"); } // namespace algebra diff --git a/benchmarks/common/include/benchmark/common/benchmark_transform3.hpp b/benchmarks/common/include/benchmark/common/benchmark_transform3.hpp index a6c16fa6..6c578017 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_transform3.hpp +++ b/benchmarks/common/include/benchmark/common/benchmark_transform3.hpp @@ -79,4 +79,14 @@ struct transform3_bm : public vector_bm { } }; +// Macro for defining all transform benchmark types +#define ALGEBRA_PLUGINS_DEFINE_TRANSFORM_BENCH(PLUGIN) \ + using trf_f_t = transform3_bm>; \ + using trf_d_t = transform3_bm>; + +// Macro for registering all transform benchmarks +#define ALGEBRA_PLUGINS_REGISTER_TRANSFORM_BENCH(CFGS, CFGD) \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); + } // namespace algebra diff --git a/benchmarks/common/include/benchmark/common/benchmark_types.hpp b/benchmarks/common/include/benchmark/common/benchmark_types.hpp new file mode 100644 index 00000000..117073ff --- /dev/null +++ b/benchmarks/common/include/benchmark/common/benchmark_types.hpp @@ -0,0 +1,62 @@ +/** Algebra plugins library, part of the ACTS project + * + * (c) 2026 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +#pragma once + +// Algebra plugin selection +#if ALGEBRA_BENCHMARK_ARRAY +#include "algebra/array.hpp" +#include "benchmark/array/data_generator.hpp" +#endif +#if ALGEBRA_BENCHMARK_EIGEN +#include "algebra/eigen.hpp" +#include "benchmark/eigen/data_generator.hpp" +#endif +#if ALGEBRA_BENCHMARK_FASTOR +#include "algebra/fastor.hpp" +#include "benchmark/fastor/data_generator.hpp" +#endif +#if ALGEBRA_BENCHMARK_SMATRIX +#include "algebra/smatrix.hpp" +#include "benchmark/smatrix/data_generator.hpp" +#endif +#if ALGEBRA_BENCHMARK_VC_AOS +#include "algebra/vc_aos.hpp" +#include "benchmark/vc_aos/data_generator.hpp" +#endif + +// Project include(s). +#include "benchmark/common/benchmark_vector.hpp" + +// Benchmark include +#include + +// System include(s) +#include +#include + +namespace algebra::benchmark { + +#define ALGEBRA_DEFINE_BENCHMARK_NAME(ALGEBRA) \ + static std::string plugin_name(#ALGEBRA); + +// Select algebra-plugin to compile the test with +#if ALGEBRA_BENCHMARK_ARRAY +ALGEBRA_DEFINE_BENCHMARK_NAME(array) +#elif ALGEBRA_BENCHMARK_EIGEN +ALGEBRA_DEFINE_BENCHMARK_NAME(eigen) +#elif ALGEBRA_BENCHMARK_FASTOR +ALGEBRA_DEFINE_BENCHMARK_NAME(fastor) +#elif ALGEBRA_BENCHMARK_SMATRIX +ALGEBRA_DEFINE_BENCHMARK_NAME(smatrix) +#elif ALGEBRA_BENCHMARK_VC_AOS +ALGEBRA_DEFINE_BENCHMARK_NAME(vc_aos) +#elif ALGEBRA_BENCHMARK_VC_SOA +ALGEBRA_DEFINE_BENCHMARK_NAME(vc_soa) +#endif + +} // namespace algebra::benchmark diff --git a/benchmarks/common/include/benchmark/common/benchmark_vector.hpp b/benchmarks/common/include/benchmark/common/benchmark_vector.hpp index 386de937..f927fc29 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_vector.hpp +++ b/benchmarks/common/include/benchmark/common/benchmark_vector.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -8,6 +8,7 @@ #pragma once // Project include(s) +#include "algebra/concepts.hpp" #include "benchmark_base.hpp" #include "register_benchmark.hpp" @@ -126,7 +127,7 @@ struct vector_binaryOP_bm : public vector_bm> { }; // Functions to be benchmarked -namespace bench_op { +namespace bench_op::vector { struct add { static constexpr std::string_view name{"add"}; @@ -175,30 +176,76 @@ ALGEBRA_PLUGINS_BENCH_VECTOR(perp, algebra::traits::scalar_t) ALGEBRA_PLUGINS_BENCH_VECTOR(norm, algebra::traits::scalar_t) ALGEBRA_PLUGINS_BENCH_VECTOR(normalize, vector_t) -} // namespace bench_op +} // namespace bench_op::vector + +// Macro for defining all vector benchmark types +#define ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(PLUGIN) \ + using phi_f_t = \ + vector_unaryOP_bm; \ + using theta_f_t = \ + vector_unaryOP_bm; \ + using perp_f_t = \ + vector_unaryOP_bm; \ + using norm_f_t = \ + vector_unaryOP_bm; \ + using eta_f_t = \ + vector_unaryOP_bm; \ + \ + using add_f_t = \ + vector_binaryOP_bm; \ + using sub_f_t = \ + vector_binaryOP_bm; \ + using dot_f_t = \ + vector_binaryOP_bm; \ + using cross_f_t = \ + vector_binaryOP_bm; \ + using normlz_f_t = \ + vector_unaryOP_bm; \ + \ + using phi_d_t = \ + vector_unaryOP_bm; \ + using theta_d_t = \ + vector_unaryOP_bm; \ + using perp_d_t = \ + vector_unaryOP_bm; \ + using norm_d_t = \ + vector_unaryOP_bm; \ + using eta_d_t = \ + vector_unaryOP_bm; \ + \ + using add_d_t = \ + vector_binaryOP_bm; \ + using sub_d_t = \ + vector_binaryOP_bm; \ + using dot_d_t = \ + vector_binaryOP_bm; \ + using cross_d_t = \ + vector_binaryOP_bm; \ + using normlz_d_t = \ + vector_unaryOP_bm; // Macro for registering all vector benchmarks -#define ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(CFG) \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); \ - algebra::register_benchmark(CFG, "_single"); \ - algebra::register_benchmark(CFG, "_double"); +#define ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(CFGS, CFGD) \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); \ + algebra::register_benchmark(CFGS, "_single"); \ + algebra::register_benchmark(CFGD, "_double"); } // namespace algebra diff --git a/benchmarks/array/array_getter.cpp b/benchmarks/common/src/benchmark_getter.cpp similarity index 75% rename from benchmarks/array/array_getter.cpp rename to benchmarks/common/src/benchmark_getter.cpp index 23875f8c..3b58d621 100644 --- a/benchmarks/array/array_getter.cpp +++ b/benchmarks/common/src/benchmark_getter.cpp @@ -1,14 +1,15 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ // Project include(s) -#include "algebra/array.hpp" -#include "benchmark/array/data_generator.hpp" +// clang-format off +#include "benchmark/common/benchmark_types.hpp" #include "benchmark/common/benchmark_getter.hpp" +// clang-format on // Benchmark include #include @@ -28,7 +29,8 @@ int main(int argc, char** argv) { cfg.n_samples(100000); std::cout << "-----------------------------------------------\n" - << "Algebra-Plugins 'getter' benchmark (std::array)\n" + << "Algebra-Plugins 'getter' benchmark (" + << algebra::benchmark::plugin_name << ")\n" << "-----------------------------------------------\n\n" << cfg; diff --git a/benchmarks/common/src/benchmark_matrix.cpp b/benchmarks/common/src/benchmark_matrix.cpp new file mode 100644 index 00000000..178c556e --- /dev/null +++ b/benchmarks/common/src/benchmark_matrix.cpp @@ -0,0 +1,57 @@ +/** Algebra plugins library, part of the ACTS project + * + * (c) 2024-2026 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +// Project include(s) +// clang-format off +#include "benchmark/common/benchmark_types.hpp" +#include "benchmark/common/benchmark_matrix.hpp" +// clang-format on + +// Benchmark include +#include + +// System include(s) +#include + +using namespace algebra; + +/// Run vector benchmarks +int main(int argc, char** argv) { + + // + // Prepare benchmarks + // + algebra::benchmark_base::configuration cfg{}; + cfg.n_samples(100000); + + std::cout << "-----------------------------------------------\n" + << "Algebra-Plugins 'matrix' benchmark (" + << algebra::benchmark::plugin_name << ")\n" + << "-----------------------------------------------\n\n" + << cfg; + +// +// Define and register all benchmarks +// +#if ALGEBRA_BENCHMARK_ARRAY + ALGEBRA_PLUGINS_DEFINE_MATRIX_BENCH(array) +#elif ALGEBRA_BENCHMARK_EIGEN + ALGEBRA_PLUGINS_DEFINE_MATRIX_BENCH(eigen) +#elif ALGEBRA_BENCHMARK_FASTOR + ALGEBRA_PLUGINS_DEFINE_MATRIX_BENCH(fastor) +#elif ALGEBRA_BENCHMARK_SMATRIX + ALGEBRA_PLUGINS_DEFINE_MATRIX_BENCH(smatrix) +#elif ALGEBRA_BENCHMARK_VC_AOS + ALGEBRA_PLUGINS_DEFINE_MATRIX_BENCH(vc_aos) +#endif + + ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg, cfg) + + ::benchmark::Initialize(&argc, argv); + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); +} diff --git a/benchmarks/array/array_transform3.cpp b/benchmarks/common/src/benchmark_transform3.cpp similarity index 51% rename from benchmarks/array/array_transform3.cpp rename to benchmarks/common/src/benchmark_transform3.cpp index 4c9d0390..73b3e3c1 100644 --- a/benchmarks/array/array_transform3.cpp +++ b/benchmarks/common/src/benchmark_transform3.cpp @@ -1,14 +1,15 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ // Project include(s) -#include "algebra/array.hpp" -#include "benchmark/array/data_generator.hpp" +// clang-format off +#include "benchmark/common/benchmark_types.hpp" #include "benchmark/common/benchmark_transform3.hpp" +// clang-format on #include "benchmark/common/register_benchmark.hpp" // Benchmark include @@ -28,19 +29,28 @@ int main(int argc, char** argv) { algebra::benchmark_base::configuration cfg{}; cfg.n_samples(100000); - using trf_f_t = transform3_bm>; - using trf_d_t = transform3_bm>; - std::cout << "---------------------------------------------------\n" - << "Algebra-Plugins 'transform3' benchmark (std::array)\n" + << "Algebra-Plugins 'transform3' benchmark (" + << algebra::benchmark::plugin_name << ")\n" << "---------------------------------------------------\n\n" << cfg; - // - // Register all benchmarks - // - algebra::register_benchmark(cfg, "_single"); - algebra::register_benchmark(cfg, "_double"); +// +// Define and register all benchmarks +// +#if ALGEBRA_BENCHMARK_ARRAY + ALGEBRA_PLUGINS_DEFINE_TRANSFORM_BENCH(array) +#elif ALGEBRA_BENCHMARK_EIGEN + ALGEBRA_PLUGINS_DEFINE_TRANSFORM_BENCH(eigen) +#elif ALGEBRA_BENCHMARK_FASTOR + ALGEBRA_PLUGINS_DEFINE_TRANSFORM_BENCH(fastor) +#elif ALGEBRA_BENCHMARK_SMATRIX + ALGEBRA_PLUGINS_DEFINE_TRANSFORM_BENCH(smatrix) +#elif ALGEBRA_BENCHMARK_VC_AOS + ALGEBRA_PLUGINS_DEFINE_TRANSFORM_BENCH(vc_aos) +#endif + + ALGEBRA_PLUGINS_REGISTER_TRANSFORM_BENCH(cfg, cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/common/src/benchmark_vector.cpp b/benchmarks/common/src/benchmark_vector.cpp new file mode 100644 index 00000000..b1467200 --- /dev/null +++ b/benchmarks/common/src/benchmark_vector.cpp @@ -0,0 +1,57 @@ +/** Algebra plugins library, part of the ACTS project + * + * (c) 2023-2026 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +// Project include(s) +// clang-format off +#include "benchmark/common/benchmark_types.hpp" +#include "benchmark/common/benchmark_vector.hpp" +// clang-format on + +// Benchmark include +#include + +// System include(s) +#include + +using namespace algebra; + +/// Run vector benchmarks +int main(int argc, char** argv) { + + // + // Prepare benchmarks + // + algebra::benchmark_base::configuration cfg{}; + cfg.n_samples(100000); + + std::cout << "-----------------------------------------------\n" + << "Algebra-Plugins 'vector' benchmark (" + << algebra::benchmark::plugin_name << ")\n" + << "-----------------------------------------------\n\n" + << cfg; + +// +// Define and register all benchmarks +// +#if ALGEBRA_BENCHMARK_ARRAY + ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(array) +#elif ALGEBRA_BENCHMARK_EIGEN + ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(eigen) +#elif ALGEBRA_BENCHMARK_FASTOR + ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(fastor) +#elif ALGEBRA_BENCHMARK_SMATRIX + ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(smatrix) +#elif ALGEBRA_BENCHMARK_VC_AOS + ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(vc_aos) +#endif + + ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(cfg, cfg) + + ::benchmark::Initialize(&argc, argv); + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); +} diff --git a/benchmarks/eigen/eigen_getter.cpp b/benchmarks/eigen/eigen_getter.cpp deleted file mode 100644 index 806b8cbb..00000000 --- a/benchmarks/eigen/eigen_getter.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2023-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/eigen.hpp" -#include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/eigen/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - std::cout << "------------------------------------------\n" - << "Algebra-Plugins 'getter' benchmark (Eigen)\n" - << "------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/eigen/eigen_matrix.cpp b/benchmarks/eigen/eigen_matrix.cpp deleted file mode 100644 index 7b97edc8..00000000 --- a/benchmarks/eigen/eigen_matrix.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/eigen.hpp" -#include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/eigen/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using mat44_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat44_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - - using mat44_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat44_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - - using mat44_det_f_t = - matrix_unaryOP_bm, bench_op::determinant>; - using mat44_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat66_det_f_t = - matrix_unaryOP_bm, bench_op::determinant>; - using mat66_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat88_det_f_t = - matrix_unaryOP_bm, bench_op::determinant>; - using mat88_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - - using mat44_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat44_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - - using mat44_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat44_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - - using mat44_vec_f_t = matrix_vector_bm, - eigen::vector_type>; - using mat44_vec_d_t = matrix_vector_bm, - eigen::vector_type>; - using mat66_vec_f_t = matrix_vector_bm, - eigen::vector_type>; - using mat66_vec_d_t = matrix_vector_bm, - eigen::vector_type>; - using mat88_vec_f_t = matrix_vector_bm, - eigen::vector_type>; - using mat88_vec_d_t = matrix_vector_bm, - eigen::vector_type>; - - std::cout << "------------------------------------------\n" - << "Algebra-Plugins 'matrix' benchmark (Eigen)\n" - << "------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/eigen/eigen_transform3.cpp b/benchmarks/eigen/eigen_transform3.cpp deleted file mode 100644 index 2be6eb8f..00000000 --- a/benchmarks/eigen/eigen_transform3.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2023-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/eigen.hpp" -#include "benchmark/common/benchmark_transform3.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/eigen/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using trf_f_t = transform3_bm>; - using trf_d_t = transform3_bm>; - - std::cout << "----------------------------------------------\n" - << "Algebra-Plugins 'transform3' benchmark (Eigen)\n" - << "----------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - algebra::register_benchmark(cfg, "_single"); - algebra::register_benchmark(cfg, "_double"); - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/eigen/eigen_vector.cpp b/benchmarks/eigen/eigen_vector.cpp deleted file mode 100644 index 5eb2844f..00000000 --- a/benchmarks/eigen/eigen_vector.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2023-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/eigen.hpp" -#include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/eigen/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using phi_f_t = vector_unaryOP_bm; - using theta_f_t = vector_unaryOP_bm; - using perp_f_t = vector_unaryOP_bm; - using norm_f_t = vector_unaryOP_bm; - using eta_f_t = vector_unaryOP_bm; - - using add_f_t = vector_binaryOP_bm; - using sub_f_t = vector_binaryOP_bm; - using dot_f_t = vector_binaryOP_bm; - using cross_f_t = vector_binaryOP_bm; - using normlz_f_t = - vector_unaryOP_bm; - - using phi_d_t = vector_unaryOP_bm; - using theta_d_t = vector_unaryOP_bm; - using perp_d_t = vector_unaryOP_bm; - using norm_d_t = vector_unaryOP_bm; - using eta_d_t = vector_unaryOP_bm; - - using add_d_t = vector_binaryOP_bm; - using sub_d_t = vector_binaryOP_bm; - using dot_d_t = vector_binaryOP_bm; - using cross_d_t = vector_binaryOP_bm; - using normlz_d_t = - vector_unaryOP_bm; - - std::cout << "------------------------------------------\n" - << "Algebra-Plugins 'vector' benchmark (Eigen)\n" - << "------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/fastor/fastor_getter.cpp b/benchmarks/fastor/fastor_getter.cpp deleted file mode 100644 index f2266688..00000000 --- a/benchmarks/fastor/fastor_getter.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2025 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/fastor.hpp" -#include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/fastor/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - std::cout << "------------------------------------------\n" - << "Algebra-Plugins 'getter' benchmark (Fastor)\n" - << "------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/fastor/fastor_matrix.cpp b/benchmarks/fastor/fastor_matrix.cpp deleted file mode 100644 index 878b769e..00000000 --- a/benchmarks/fastor/fastor_matrix.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/fastor.hpp" -#include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/fastor/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using mat44_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat44_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - - using mat44_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat44_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - - using mat44_det_f_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat44_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat66_det_f_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat66_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat88_det_f_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat88_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - - using mat44_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat44_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - - using mat44_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat44_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - - using mat44_vec_f_t = matrix_vector_bm, - fastor::vector_type>; - using mat44_vec_d_t = matrix_vector_bm, - fastor::vector_type>; - using mat66_vec_f_t = matrix_vector_bm, - fastor::vector_type>; - using mat66_vec_d_t = matrix_vector_bm, - fastor::vector_type>; - using mat88_vec_f_t = matrix_vector_bm, - fastor::vector_type>; - using mat88_vec_d_t = matrix_vector_bm, - fastor::vector_type>; - - std::cout << "------------------------------------------\n" - << "Algebra-Plugins 'matrix' benchmark (Fastor)\n" - << "-------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/fastor/fastor_transform3.cpp b/benchmarks/fastor/fastor_transform3.cpp deleted file mode 100644 index a77fb99e..00000000 --- a/benchmarks/fastor/fastor_transform3.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2025 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/fastor.hpp" -#include "benchmark/common/benchmark_transform3.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/fastor/data_generator.hpp" - -// Benchmark include -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using trf_f_t = transform3_bm>; - using trf_d_t = transform3_bm>; - - std::cout << "-----------------------------------------------\n" - << "Algebra-Plugins 'transform3' benchmark (Fastor)\n" - << "-----------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - algebra::register_benchmark(cfg, "_single"); - algebra::register_benchmark(cfg, "_double"); - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/fastor/fastor_vector.cpp b/benchmarks/fastor/fastor_vector.cpp deleted file mode 100644 index e7b8f406..00000000 --- a/benchmarks/fastor/fastor_vector.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2025 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/fastor.hpp" -#include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/fastor/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using phi_f_t = vector_unaryOP_bm; - using theta_f_t = vector_unaryOP_bm; - using perp_f_t = vector_unaryOP_bm; - using norm_f_t = vector_unaryOP_bm; - using eta_f_t = vector_unaryOP_bm; - - using add_f_t = vector_binaryOP_bm; - using sub_f_t = vector_binaryOP_bm; - using dot_f_t = vector_binaryOP_bm; - using cross_f_t = vector_binaryOP_bm; - using normlz_f_t = - vector_unaryOP_bm; - - using phi_d_t = vector_unaryOP_bm; - using theta_d_t = vector_unaryOP_bm; - using perp_d_t = vector_unaryOP_bm; - using norm_d_t = vector_unaryOP_bm; - using eta_d_t = vector_unaryOP_bm; - - using add_d_t = vector_binaryOP_bm; - using sub_d_t = vector_binaryOP_bm; - using dot_d_t = vector_binaryOP_bm; - using cross_d_t = - vector_binaryOP_bm; - using normlz_d_t = - vector_unaryOP_bm; - - std::cout << "-------------------------------------------\n" - << "Algebra-Plugins 'vector' benchmark (Fastor)\n" - << "-------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/vc_aos/vc_aos_getter.cpp b/benchmarks/vc_aos/vc_aos_getter.cpp deleted file mode 100644 index 74aa3eef..00000000 --- a/benchmarks/vc_aos/vc_aos_getter.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/vc_aos.hpp" -#include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/vc_aos/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - std::cout << "-------------------------------------------\n" - << "Algebra-Plugins 'getter' benchmark (Vc AoS)\n" - << "-------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/vc_aos/vc_aos_matrix.cpp b/benchmarks/vc_aos/vc_aos_matrix.cpp deleted file mode 100644 index 4a20d0cd..00000000 --- a/benchmarks/vc_aos/vc_aos_matrix.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/vc_aos.hpp" -#include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/vc_aos/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using mat44_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat44_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - - using mat44_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat44_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat66_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_f_t = - matrix_unaryOP_bm, bench_op::invert>; - using mat88_inv_d_t = - matrix_unaryOP_bm, bench_op::invert>; - - using mat44_det_f_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat44_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat66_det_f_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat66_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat88_det_f_t = matrix_unaryOP_bm, - bench_op::determinant>; - using mat88_det_d_t = matrix_unaryOP_bm, - bench_op::determinant>; - - using mat44_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat44_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - - using mat44_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat44_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - - using mat44_vec_f_t = matrix_vector_bm, - vc_aos::vector_type>; - using mat44_vec_d_t = matrix_vector_bm, - vc_aos::vector_type>; - using mat66_vec_f_t = matrix_vector_bm, - vc_aos::vector_type>; - using mat66_vec_d_t = matrix_vector_bm, - vc_aos::vector_type>; - using mat88_vec_f_t = matrix_vector_bm, - vc_aos::vector_type>; - using mat88_vec_d_t = matrix_vector_bm, - vc_aos::vector_type>; - - std::cout << "-------------------------------------------\n" - << "Algebra-Plugins 'matrix' benchmark (Vc AoS)\n" - << "-------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/vc_aos/vc_aos_transform3.cpp b/benchmarks/vc_aos/vc_aos_transform3.cpp deleted file mode 100644 index 9118eaea..00000000 --- a/benchmarks/vc_aos/vc_aos_transform3.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/vc_aos.hpp" -#include "benchmark/common/benchmark_transform3.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/vc_aos/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using trf_f_t = transform3_bm>; - using trf_d_t = transform3_bm>; - - std::cout << "-----------------------------------------------\n" - << "Algebra-Plugins 'transform3' benchmark (Vc AoS)\n" - << "-----------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - algebra::register_benchmark(cfg, "_single"); - algebra::register_benchmark(cfg, "_double"); - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/vc_aos/vc_aos_vector.cpp b/benchmarks/vc_aos/vc_aos_vector.cpp deleted file mode 100644 index 836d3bec..00000000 --- a/benchmarks/vc_aos/vc_aos_vector.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/** Algebra plugins library, part of the ACTS project - * - * (c) 2024-2024 CERN for the benefit of the ACTS project - * - * Mozilla Public License Version 2.0 - */ - -// Project include(s) -#include "algebra/vc_aos.hpp" -#include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/vc_aos/data_generator.hpp" - -// Benchmark include -#include - -// System include(s) -#include - -using namespace algebra; - -/// Run vector benchmarks -int main(int argc, char** argv) { - - // - // Prepare benchmarks - // - algebra::benchmark_base::configuration cfg{}; - cfg.n_samples(100000); - - using phi_f_t = vector_unaryOP_bm; - using theta_f_t = vector_unaryOP_bm; - using perp_f_t = vector_unaryOP_bm; - using norm_f_t = vector_unaryOP_bm; - using eta_f_t = vector_unaryOP_bm; - - using add_f_t = vector_binaryOP_bm; - using sub_f_t = vector_binaryOP_bm; - using dot_f_t = vector_binaryOP_bm; - using cross_f_t = vector_binaryOP_bm; - using normlz_f_t = - vector_unaryOP_bm; - - using phi_d_t = vector_unaryOP_bm; - using theta_d_t = vector_unaryOP_bm; - using perp_d_t = vector_unaryOP_bm; - using norm_d_t = vector_unaryOP_bm; - using eta_d_t = vector_unaryOP_bm; - - using add_d_t = vector_binaryOP_bm; - using sub_d_t = vector_binaryOP_bm; - using dot_d_t = vector_binaryOP_bm; - using cross_d_t = - vector_binaryOP_bm; - using normlz_d_t = - vector_unaryOP_bm; - - std::cout << "-------------------------------------------\n" - << "Algebra-Plugins 'vector' benchmark (Vc AoS)\n" - << "-------------------------------------------\n\n" - << cfg; - - // - // Register all benchmarks - // - ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(cfg) - - ::benchmark::Initialize(&argc, argv); - ::benchmark::RunSpecifiedBenchmarks(); - ::benchmark::Shutdown(); -} diff --git a/benchmarks/vc_soa/vc_soa_getter.cpp b/benchmarks/vc_soa/vc_soa_getter.cpp index 0b5a1105..33d1e232 100644 --- a/benchmarks/vc_soa/vc_soa_getter.cpp +++ b/benchmarks/vc_soa/vc_soa_getter.cpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ diff --git a/benchmarks/vc_soa/vc_soa_matrix.cpp b/benchmarks/vc_soa/vc_soa_matrix.cpp index 362d1cb9..ffd3ff15 100644 --- a/benchmarks/vc_soa/vc_soa_matrix.cpp +++ b/benchmarks/vc_soa/vc_soa_matrix.cpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2024 CERN for the benefit of the ACTS project + * (c) 2024-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -36,44 +36,44 @@ int main(int argc, char** argv) { algebra::benchmark_base::configuration cfg_d{cfg_s}; cfg_d.n_samples(n_samples / Vc::double_v::Size); - using mat44_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat44_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat66_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_f_t = - matrix_unaryOP_bm, bench_op::transpose>; - using mat88_transp_d_t = - matrix_unaryOP_bm, bench_op::transpose>; - - using mat44_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat44_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat66_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_f_t = - matrix_binaryOP_bm, bench_op::add>; - using mat88_add_d_t = - matrix_binaryOP_bm, bench_op::add>; - - using mat44_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat44_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat66_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_f_t = - matrix_binaryOP_bm, bench_op::mul>; - using mat88_mul_d_t = - matrix_binaryOP_bm, bench_op::mul>; + using mat44_transp_f_t = matrix_unaryOP_bm, + bench_op::matrix::transpose>; + using mat44_transp_d_t = matrix_unaryOP_bm, + bench_op::matrix::transpose>; + using mat66_transp_f_t = matrix_unaryOP_bm, + bench_op::matrix::transpose>; + using mat66_transp_d_t = matrix_unaryOP_bm, + bench_op::matrix::transpose>; + using mat88_transp_f_t = matrix_unaryOP_bm, + bench_op::matrix::transpose>; + using mat88_transp_d_t = matrix_unaryOP_bm, + bench_op::matrix::transpose>; + + using mat44_add_f_t = matrix_binaryOP_bm, + bench_op::matrix::add>; + using mat44_add_d_t = matrix_binaryOP_bm, + bench_op::matrix::add>; + using mat66_add_f_t = matrix_binaryOP_bm, + bench_op::matrix::add>; + using mat66_add_d_t = matrix_binaryOP_bm, + bench_op::matrix::add>; + using mat88_add_f_t = matrix_binaryOP_bm, + bench_op::matrix::add>; + using mat88_add_d_t = matrix_binaryOP_bm, + bench_op::matrix::add>; + + using mat44_mul_f_t = matrix_binaryOP_bm, + bench_op::matrix::mul>; + using mat44_mul_d_t = matrix_binaryOP_bm, + bench_op::matrix::mul>; + using mat66_mul_f_t = matrix_binaryOP_bm, + bench_op::matrix::mul>; + using mat66_mul_d_t = matrix_binaryOP_bm, + bench_op::matrix::mul>; + using mat88_mul_f_t = matrix_binaryOP_bm, + bench_op::matrix::mul>; + using mat88_mul_d_t = matrix_binaryOP_bm, + bench_op::matrix::mul>; using mat44_vec_f_t = matrix_vector_bm, vc_soa::vector_type>; @@ -98,33 +98,33 @@ int main(int argc, char** argv) { // // Register all benchmarks // - algebra::register_benchmark(cfg_s, "_4x4_transpose_single"); - algebra::register_benchmark(cfg_d, "_4x4_transpose_double"); - algebra::register_benchmark(cfg_s, "_6x6_transpose_single"); - algebra::register_benchmark(cfg_d, "_6x6_transpose_double"); - algebra::register_benchmark(cfg_s, "_8x8_transpose_single"); - algebra::register_benchmark(cfg_d, "_8x8_transpose_double"); - - algebra::register_benchmark(cfg_s, "_4x4_add_single"); - algebra::register_benchmark(cfg_d, "_4x4_add_double"); - algebra::register_benchmark(cfg_s, "_6x6_add_single"); - algebra::register_benchmark(cfg_d, "_6x6_add_double"); - algebra::register_benchmark(cfg_s, "_8x8_add_single"); - algebra::register_benchmark(cfg_d, "_8x8_add_double"); - - algebra::register_benchmark(cfg_s, "_4x4_mul_single"); - algebra::register_benchmark(cfg_d, "_4x4_mul_double"); - algebra::register_benchmark(cfg_s, "_6x6_mul_single"); - algebra::register_benchmark(cfg_d, "_6x6_mul_double"); - algebra::register_benchmark(cfg_s, "_8x8_mul_single"); - algebra::register_benchmark(cfg_d, "_8x8_mul_double"); - - algebra::register_benchmark(cfg_s, "_4x4_vec_single"); - algebra::register_benchmark(cfg_d, "_4x4_vec_double"); - algebra::register_benchmark(cfg_s, "_6x6_vec_single"); - algebra::register_benchmark(cfg_d, "_6x6_vec_double"); - algebra::register_benchmark(cfg_s, "_8x8_vec_single"); - algebra::register_benchmark(cfg_d, "_8x8_vec_double"); + algebra::register_benchmark(cfg_s, "_4x4_single"); + algebra::register_benchmark(cfg_d, "_4x4_double"); + algebra::register_benchmark(cfg_s, "_6x6_single"); + algebra::register_benchmark(cfg_d, "_6x6_double"); + algebra::register_benchmark(cfg_s, "_8x8_single"); + algebra::register_benchmark(cfg_d, "_8x8_double"); + + algebra::register_benchmark(cfg_s, "_4x4_single"); + algebra::register_benchmark(cfg_d, "_4x4_double"); + algebra::register_benchmark(cfg_s, "_6x6_single"); + algebra::register_benchmark(cfg_d, "_6x6_double"); + algebra::register_benchmark(cfg_s, "_8x8_single"); + algebra::register_benchmark(cfg_d, "_8x8_double"); + + algebra::register_benchmark(cfg_s, "_4x4_single"); + algebra::register_benchmark(cfg_d, "_4x4_double"); + algebra::register_benchmark(cfg_s, "_6x6_single"); + algebra::register_benchmark(cfg_d, "_6x6_double"); + algebra::register_benchmark(cfg_s, "_8x8_single"); + algebra::register_benchmark(cfg_d, "_8x8_double"); + + algebra::register_benchmark(cfg_s, "_4x4_single"); + algebra::register_benchmark(cfg_d, "_4x4_double"); + algebra::register_benchmark(cfg_s, "_6x6_single"); + algebra::register_benchmark(cfg_d, "_6x6_double"); + algebra::register_benchmark(cfg_s, "_8x8_single"); + algebra::register_benchmark(cfg_d, "_8x8_double"); ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/vc_soa/vc_soa_transform3.cpp b/benchmarks/vc_soa/vc_soa_transform3.cpp index 480a7c7e..40b24715 100644 --- a/benchmarks/vc_soa/vc_soa_transform3.cpp +++ b/benchmarks/vc_soa/vc_soa_transform3.cpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -39,7 +39,7 @@ int main(int argc, char** argv) { using trf_f_t = transform3_bm>; using trf_d_t = transform3_bm>; - std::cout << "-------------------------------------------\n" + std::cout << "-----------------------------------------------\n" << "Algebra-Plugins 'transform3' benchmark (Vc SoA)\n" << "-----------------------------------------------\n\n" << "(single)\n" diff --git a/benchmarks/vc_soa/vc_soa_vector.cpp b/benchmarks/vc_soa/vc_soa_vector.cpp index c436b118..30bd57a8 100644 --- a/benchmarks/vc_soa/vc_soa_vector.cpp +++ b/benchmarks/vc_soa/vc_soa_vector.cpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -36,33 +36,6 @@ int main(int argc, char** argv) { algebra::benchmark_base::configuration cfg_d{cfg_s}; cfg_d.n_samples(n_samples / Vc::double_v::Size); - using phi_f_t = vector_unaryOP_bm; - using theta_f_t = vector_unaryOP_bm; - using perp_f_t = vector_unaryOP_bm; - using norm_f_t = vector_unaryOP_bm; - using eta_f_t = vector_unaryOP_bm; - - using add_f_t = vector_binaryOP_bm; - using sub_f_t = vector_binaryOP_bm; - using dot_f_t = vector_binaryOP_bm; - using cross_f_t = vector_binaryOP_bm; - using normlz_f_t = - vector_unaryOP_bm; - - using phi_d_t = vector_unaryOP_bm; - using theta_d_t = vector_unaryOP_bm; - using perp_d_t = vector_unaryOP_bm; - using norm_d_t = vector_unaryOP_bm; - using eta_d_t = vector_unaryOP_bm; - - using add_d_t = vector_binaryOP_bm; - using sub_d_t = vector_binaryOP_bm; - using dot_d_t = vector_binaryOP_bm; - using cross_d_t = - vector_binaryOP_bm; - using normlz_d_t = - vector_unaryOP_bm; - std::cout << "-------------------------------------------\n" << "Algebra-Plugins 'vector' benchmark (Vc SoA)\n" << "-------------------------------------------\n\n" @@ -71,29 +44,10 @@ int main(int argc, char** argv) { << cfg_d; // - // Register all benchmarks + // Define and register all benchmarks // - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); - algebra::register_benchmark(cfg_s, "_single"); - algebra::register_benchmark(cfg_d, "_double"); + ALGEBRA_PLUGINS_DEFINE_VECTOR_BENCH(vc_soa) + ALGEBRA_PLUGINS_REGISTER_VECTOR_BENCH(cfg_s, cfg_d) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); From 88373724c87ba73dcac0d37be845858275d2b255 Mon Sep 17 00:00:00 2001 From: Joana Niermann Date: Tue, 3 Mar 2026 17:36:59 +0100 Subject: [PATCH 2/2] Restructure benchmakr lib --- benchmarks/CMakeLists.txt | 49 +++++++++++++------ .../include/algebra}/array/data_generator.hpp | 0 .../algebra}/common/benchmark_base.hpp | 2 +- .../algebra}/common/benchmark_getter.hpp | 6 +-- .../algebra}/common/benchmark_matrix.hpp | 6 +-- .../algebra}/common/benchmark_transform3.hpp | 5 +- .../algebra}/common/benchmark_types.hpp | 12 ++--- .../algebra}/common/benchmark_vector.hpp | 4 +- .../algebra}/common/register_benchmark.hpp | 4 +- .../include/algebra}/eigen/data_generator.hpp | 2 +- .../algebra}/fastor/data_generator.hpp | 2 +- .../algebra}/vc_aos/data_generator.hpp | 2 +- .../algebra}/vc_soa/data_generator.hpp | 2 +- .../src/benchmark_getter.cpp | 4 +- .../src/benchmark_matrix.cpp | 4 +- .../src/benchmark_transform3.cpp | 5 +- .../src/benchmark_vector.cpp | 4 +- .../src}/vc_soa/vc_soa_getter.cpp | 8 +-- .../src}/vc_soa/vc_soa_matrix.cpp | 8 +-- .../src}/vc_soa/vc_soa_transform3.cpp | 8 +-- .../src}/vc_soa/vc_soa_vector.cpp | 8 +-- 21 files changed, 87 insertions(+), 58 deletions(-) rename benchmarks/{array/include/benchmark => algebra/include/algebra}/array/data_generator.hpp (100%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/benchmark_base.hpp (97%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/benchmark_getter.hpp (59%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/benchmark_matrix.hpp (99%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/benchmark_transform3.hpp (94%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/benchmark_types.hpp (82%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/benchmark_vector.hpp (99%) rename benchmarks/{common/include/benchmark => algebra/include/algebra}/common/register_benchmark.hpp (86%) rename benchmarks/{eigen/include/benchmark => algebra/include/algebra}/eigen/data_generator.hpp (96%) rename benchmarks/{fastor/include/benchmark => algebra/include/algebra}/fastor/data_generator.hpp (96%) rename benchmarks/{vc_aos/include/benchmark => algebra/include/algebra}/vc_aos/data_generator.hpp (97%) rename benchmarks/{vc_soa/include/benchmark => algebra/include/algebra}/vc_soa/data_generator.hpp (97%) rename benchmarks/{common => algebra}/src/benchmark_getter.cpp (90%) rename benchmarks/{common => algebra}/src/benchmark_matrix.cpp (93%) rename benchmarks/{common => algebra}/src/benchmark_transform3.cpp (90%) rename benchmarks/{common => algebra}/src/benchmark_vector.cpp (93%) rename benchmarks/{ => algebra/src}/vc_soa/vc_soa_getter.cpp (87%) rename benchmarks/{ => algebra/src}/vc_soa/vc_soa_matrix.cpp (97%) rename benchmarks/{ => algebra/src}/vc_soa/vc_soa_transform3.cpp (89%) rename benchmarks/{ => algebra/src}/vc_soa/vc_soa_vector.cpp (88%) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index a767a3e6..47f96bfd 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -8,11 +8,21 @@ include(algebra-plugins-compiler-options-cpp) # Set up an INTERFACE library for the common header(s). -add_library(algebra_bench_common INTERFACE) +add_library( + algebra_bench_common + INTERFACE + "algebra/include/algebra/common/benchmark_base.hpp" + "algebra/include/algebra/common/benchmark_getter.hpp" + "algebra/include/algebra/common/benchmark_matrix.hpp" + "algebra/include/algebra/common/benchmark_transform3.hpp" + "algebra/include/algebra/common/benchmark_types.hpp" + "algebra/include/algebra/common/benchmark_vector.hpp" + "algebra/include/algebra/common/register_benchmark.hpp" +) target_include_directories( algebra_bench_common - INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/common/include" + INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/algebra/include/" ) if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") @@ -28,12 +38,16 @@ add_library(algebra::bench_common ALIAS algebra_bench_common) macro(algebra_add_benchmarks plugin) string(TOUPPER ${plugin} PLUGIN) - add_library(algebra_bench_${plugin} INTERFACE) + add_library( + algebra_bench_${plugin} + INTERFACE + "algebra/include/algebra/${plugin}/data_generator.hpp" + ) target_include_directories( algebra_bench_${plugin} INTERFACE - "$" + "$" ) target_link_libraries( @@ -42,7 +56,7 @@ macro(algebra_add_benchmarks plugin) ) algebra_add_benchmark( ${plugin}_getter - "common/src/benchmark_getter.cpp" + "algebra/src/benchmark_getter.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_${plugin} algebra::${plugin} ) @@ -52,7 +66,7 @@ macro(algebra_add_benchmarks plugin) ) algebra_add_benchmark( ${plugin}_vector - "common/src/benchmark_vector.cpp" + "algebra/src/benchmark_vector.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_${plugin} algebra::${plugin} ) @@ -62,7 +76,7 @@ macro(algebra_add_benchmarks plugin) ) algebra_add_benchmark( ${plugin}_transform3 - "common/src/benchmark_transform3.cpp" + "algebra/src/benchmark_transform3.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_${plugin} algebra::${plugin} ) @@ -72,7 +86,7 @@ macro(algebra_add_benchmarks plugin) ) algebra_add_benchmark( ${plugin}_matrix - "common/src/benchmark_matrix.cpp" + "algebra/src/benchmark_matrix.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_${plugin} algebra::${plugin} ) @@ -102,33 +116,40 @@ endif() if(ALGEBRA_PLUGINS_INCLUDE_VC) algebra_add_benchmarks(vc_aos) - add_library(algebra_bench_vc_soa INTERFACE) + add_library( + algebra_bench_vc_soa + INTERFACE + "algebra/include/algebra/vc_soa/data_generator.hpp" + ) + target_include_directories( algebra_bench_vc_soa INTERFACE - "$" + "$" ) + target_link_libraries( algebra_bench_vc_soa INTERFACE algebra::vc_soa algebra::common ) + algebra_add_benchmark(vc_soa_getter - "vc_soa/vc_soa_getter.cpp" + "algebra/src/vc_soa/vc_soa_getter.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_vc_soa algebra::vc_soa ) algebra_add_benchmark(vc_soa_vector - "vc_soa/vc_soa_vector.cpp" + "algebra/src/vc_soa/vc_soa_vector.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_vc_soa algebra::vc_soa ) algebra_add_benchmark(vc_soa_transform3 - "vc_soa/vc_soa_transform3.cpp" + "algebra/src/vc_soa/vc_soa_transform3.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_vc_soa algebra::vc_soa ) algebra_add_benchmark(vc_soa_matrix - "vc_soa/vc_soa_matrix.cpp" + "algebra/src/vc_soa/vc_soa_matrix.cpp" LINK_LIBRARIES benchmark::benchmark algebra::bench_common algebra_bench_vc_soa algebra::vc_soa ) diff --git a/benchmarks/array/include/benchmark/array/data_generator.hpp b/benchmarks/algebra/include/algebra/array/data_generator.hpp similarity index 100% rename from benchmarks/array/include/benchmark/array/data_generator.hpp rename to benchmarks/algebra/include/algebra/array/data_generator.hpp diff --git a/benchmarks/common/include/benchmark/common/benchmark_base.hpp b/benchmarks/algebra/include/algebra/common/benchmark_base.hpp similarity index 97% rename from benchmarks/common/include/benchmark/common/benchmark_base.hpp rename to benchmarks/algebra/include/algebra/common/benchmark_base.hpp index af3e6c87..668624f6 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_base.hpp +++ b/benchmarks/algebra/include/algebra/common/benchmark_base.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ diff --git a/benchmarks/common/include/benchmark/common/benchmark_getter.hpp b/benchmarks/algebra/include/algebra/common/benchmark_getter.hpp similarity index 59% rename from benchmarks/common/include/benchmark/common/benchmark_getter.hpp rename to benchmarks/algebra/include/algebra/common/benchmark_getter.hpp index c6c9c9ae..afa8f79a 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_getter.hpp +++ b/benchmarks/algebra/include/algebra/common/benchmark_getter.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -8,8 +8,8 @@ #pragma once // Project include(s) -#include "benchmark_vector.hpp" -#include "register_benchmark.hpp" +#include "algebra/common/benchmark_vector.hpp" +#include "algebra/common/register_benchmark.hpp" namespace algebra::bench_op { /* TODO: Implement */ } // namespace algebra::bench_op diff --git a/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp b/benchmarks/algebra/include/algebra/common/benchmark_matrix.hpp similarity index 99% rename from benchmarks/common/include/benchmark/common/benchmark_matrix.hpp rename to benchmarks/algebra/include/algebra/common/benchmark_matrix.hpp index 967db3e6..9489727e 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp +++ b/benchmarks/algebra/include/algebra/common/benchmark_matrix.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2024 CERN for the benefit of the ACTS project + * (c) 2024-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -8,9 +8,9 @@ #pragma once // Project include(s) +#include "algebra/common/benchmark_base.hpp" +#include "algebra/common/register_benchmark.hpp" #include "algebra/concepts.hpp" -#include "benchmark_base.hpp" -#include "register_benchmark.hpp" // System include(s) #include diff --git a/benchmarks/common/include/benchmark/common/benchmark_transform3.hpp b/benchmarks/algebra/include/algebra/common/benchmark_transform3.hpp similarity index 94% rename from benchmarks/common/include/benchmark/common/benchmark_transform3.hpp rename to benchmarks/algebra/include/algebra/common/benchmark_transform3.hpp index 6c578017..17b62c7b 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_transform3.hpp +++ b/benchmarks/algebra/include/algebra/common/benchmark_transform3.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023-2024 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -8,7 +8,8 @@ #pragma once // Project include(s) -#include "benchmark_vector.hpp" +#include "algebra/common/benchmark_vector.hpp" +#include "algebra/common/register_benchmark.hpp" // System include(s) #include diff --git a/benchmarks/common/include/benchmark/common/benchmark_types.hpp b/benchmarks/algebra/include/algebra/common/benchmark_types.hpp similarity index 82% rename from benchmarks/common/include/benchmark/common/benchmark_types.hpp rename to benchmarks/algebra/include/algebra/common/benchmark_types.hpp index 117073ff..e95ed197 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_types.hpp +++ b/benchmarks/algebra/include/algebra/common/benchmark_types.hpp @@ -10,27 +10,27 @@ // Algebra plugin selection #if ALGEBRA_BENCHMARK_ARRAY #include "algebra/array.hpp" -#include "benchmark/array/data_generator.hpp" +#include "algebra/array/data_generator.hpp" #endif #if ALGEBRA_BENCHMARK_EIGEN #include "algebra/eigen.hpp" -#include "benchmark/eigen/data_generator.hpp" +#include "algebra/eigen/data_generator.hpp" #endif #if ALGEBRA_BENCHMARK_FASTOR #include "algebra/fastor.hpp" -#include "benchmark/fastor/data_generator.hpp" +#include "algebra/fastor/data_generator.hpp" #endif #if ALGEBRA_BENCHMARK_SMATRIX #include "algebra/smatrix.hpp" -#include "benchmark/smatrix/data_generator.hpp" +#include "algebra/smatrix/data_generator.hpp" #endif #if ALGEBRA_BENCHMARK_VC_AOS #include "algebra/vc_aos.hpp" -#include "benchmark/vc_aos/data_generator.hpp" +#include "algebra/vc_aos/data_generator.hpp" #endif // Project include(s). -#include "benchmark/common/benchmark_vector.hpp" +#include "algebra/common/benchmark_vector.hpp" // Benchmark include #include diff --git a/benchmarks/common/include/benchmark/common/benchmark_vector.hpp b/benchmarks/algebra/include/algebra/common/benchmark_vector.hpp similarity index 99% rename from benchmarks/common/include/benchmark/common/benchmark_vector.hpp rename to benchmarks/algebra/include/algebra/common/benchmark_vector.hpp index f927fc29..0164e9de 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_vector.hpp +++ b/benchmarks/algebra/include/algebra/common/benchmark_vector.hpp @@ -8,9 +8,9 @@ #pragma once // Project include(s) +#include "algebra/common/benchmark_base.hpp" +#include "algebra/common/register_benchmark.hpp" #include "algebra/concepts.hpp" -#include "benchmark_base.hpp" -#include "register_benchmark.hpp" // System include(s) #include diff --git a/benchmarks/common/include/benchmark/common/register_benchmark.hpp b/benchmarks/algebra/include/algebra/common/register_benchmark.hpp similarity index 86% rename from benchmarks/common/include/benchmark/common/register_benchmark.hpp rename to benchmarks/algebra/include/algebra/common/register_benchmark.hpp index 4dd9c267..5e769e97 100644 --- a/benchmarks/common/include/benchmark/common/register_benchmark.hpp +++ b/benchmarks/algebra/include/algebra/common/register_benchmark.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2024 CERN for the benefit of the ACTS project + * (c) 2024-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -8,7 +8,7 @@ #pragma once // Project include(s) -#include "benchmark_base.hpp" +#include "algebra/common/benchmark_base.hpp" // Benchmark include #include diff --git a/benchmarks/eigen/include/benchmark/eigen/data_generator.hpp b/benchmarks/algebra/include/algebra/eigen/data_generator.hpp similarity index 96% rename from benchmarks/eigen/include/benchmark/eigen/data_generator.hpp rename to benchmarks/algebra/include/algebra/eigen/data_generator.hpp index 28f97ca1..0d44caa7 100644 --- a/benchmarks/eigen/include/benchmark/eigen/data_generator.hpp +++ b/benchmarks/algebra/include/algebra/eigen/data_generator.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ diff --git a/benchmarks/fastor/include/benchmark/fastor/data_generator.hpp b/benchmarks/algebra/include/algebra/fastor/data_generator.hpp similarity index 96% rename from benchmarks/fastor/include/benchmark/fastor/data_generator.hpp rename to benchmarks/algebra/include/algebra/fastor/data_generator.hpp index 09efea35..78e77ea4 100644 --- a/benchmarks/fastor/include/benchmark/fastor/data_generator.hpp +++ b/benchmarks/algebra/include/algebra/fastor/data_generator.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2025 CERN for the benefit of the ACTS project + * (c) 2025-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ diff --git a/benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp b/benchmarks/algebra/include/algebra/vc_aos/data_generator.hpp similarity index 97% rename from benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp rename to benchmarks/algebra/include/algebra/vc_aos/data_generator.hpp index def78aba..4baffca3 100644 --- a/benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp +++ b/benchmarks/algebra/include/algebra/vc_aos/data_generator.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2024 CERN for the benefit of the ACTS project + * (c) 2024-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ diff --git a/benchmarks/vc_soa/include/benchmark/vc_soa/data_generator.hpp b/benchmarks/algebra/include/algebra/vc_soa/data_generator.hpp similarity index 97% rename from benchmarks/vc_soa/include/benchmark/vc_soa/data_generator.hpp rename to benchmarks/algebra/include/algebra/vc_soa/data_generator.hpp index 48c6ea31..7c4950d1 100644 --- a/benchmarks/vc_soa/include/benchmark/vc_soa/data_generator.hpp +++ b/benchmarks/algebra/include/algebra/vc_soa/data_generator.hpp @@ -1,6 +1,6 @@ /** Algebra plugins library, part of the ACTS project * - * (c) 2023 CERN for the benefit of the ACTS project + * (c) 2023-2026 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ diff --git a/benchmarks/common/src/benchmark_getter.cpp b/benchmarks/algebra/src/benchmark_getter.cpp similarity index 90% rename from benchmarks/common/src/benchmark_getter.cpp rename to benchmarks/algebra/src/benchmark_getter.cpp index 3b58d621..be1cac14 100644 --- a/benchmarks/common/src/benchmark_getter.cpp +++ b/benchmarks/algebra/src/benchmark_getter.cpp @@ -7,8 +7,8 @@ // Project include(s) // clang-format off -#include "benchmark/common/benchmark_types.hpp" -#include "benchmark/common/benchmark_getter.hpp" +#include "algebra/common/benchmark_types.hpp" +#include "algebra/common/benchmark_getter.hpp" // clang-format on // Benchmark include diff --git a/benchmarks/common/src/benchmark_matrix.cpp b/benchmarks/algebra/src/benchmark_matrix.cpp similarity index 93% rename from benchmarks/common/src/benchmark_matrix.cpp rename to benchmarks/algebra/src/benchmark_matrix.cpp index 178c556e..d89ca50c 100644 --- a/benchmarks/common/src/benchmark_matrix.cpp +++ b/benchmarks/algebra/src/benchmark_matrix.cpp @@ -7,8 +7,8 @@ // Project include(s) // clang-format off -#include "benchmark/common/benchmark_types.hpp" -#include "benchmark/common/benchmark_matrix.hpp" +#include "algebra/common/benchmark_types.hpp" +#include "algebra/common/benchmark_matrix.hpp" // clang-format on // Benchmark include diff --git a/benchmarks/common/src/benchmark_transform3.cpp b/benchmarks/algebra/src/benchmark_transform3.cpp similarity index 90% rename from benchmarks/common/src/benchmark_transform3.cpp rename to benchmarks/algebra/src/benchmark_transform3.cpp index 73b3e3c1..61f6751b 100644 --- a/benchmarks/common/src/benchmark_transform3.cpp +++ b/benchmarks/algebra/src/benchmark_transform3.cpp @@ -7,10 +7,9 @@ // Project include(s) // clang-format off -#include "benchmark/common/benchmark_types.hpp" -#include "benchmark/common/benchmark_transform3.hpp" +#include "algebra/common/benchmark_types.hpp" +#include "algebra/common/benchmark_transform3.hpp" // clang-format on -#include "benchmark/common/register_benchmark.hpp" // Benchmark include #include diff --git a/benchmarks/common/src/benchmark_vector.cpp b/benchmarks/algebra/src/benchmark_vector.cpp similarity index 93% rename from benchmarks/common/src/benchmark_vector.cpp rename to benchmarks/algebra/src/benchmark_vector.cpp index b1467200..ceb46179 100644 --- a/benchmarks/common/src/benchmark_vector.cpp +++ b/benchmarks/algebra/src/benchmark_vector.cpp @@ -7,8 +7,8 @@ // Project include(s) // clang-format off -#include "benchmark/common/benchmark_types.hpp" -#include "benchmark/common/benchmark_vector.hpp" +#include "algebra/common/benchmark_types.hpp" +#include "algebra/common/benchmark_vector.hpp" // clang-format on // Benchmark include diff --git a/benchmarks/vc_soa/vc_soa_getter.cpp b/benchmarks/algebra/src/vc_soa/vc_soa_getter.cpp similarity index 87% rename from benchmarks/vc_soa/vc_soa_getter.cpp rename to benchmarks/algebra/src/vc_soa/vc_soa_getter.cpp index 33d1e232..03f60426 100644 --- a/benchmarks/vc_soa/vc_soa_getter.cpp +++ b/benchmarks/algebra/src/vc_soa/vc_soa_getter.cpp @@ -6,10 +6,12 @@ */ // Project include(s) +// clang-format off #include "algebra/vc_soa.hpp" -#include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/vc_soa/data_generator.hpp" +#include "algebra/common/benchmark_getter.hpp" +// clang-format on +#include "algebra/common/register_benchmark.hpp" +#include "algebra/vc_soa/data_generator.hpp" // Benchmark include #include diff --git a/benchmarks/vc_soa/vc_soa_matrix.cpp b/benchmarks/algebra/src/vc_soa/vc_soa_matrix.cpp similarity index 97% rename from benchmarks/vc_soa/vc_soa_matrix.cpp rename to benchmarks/algebra/src/vc_soa/vc_soa_matrix.cpp index ffd3ff15..95aec485 100644 --- a/benchmarks/vc_soa/vc_soa_matrix.cpp +++ b/benchmarks/algebra/src/vc_soa/vc_soa_matrix.cpp @@ -6,10 +6,12 @@ */ // Project include(s) +// clang-format off #include "algebra/vc_soa.hpp" -#include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/vc_soa/data_generator.hpp" +#include "algebra/common/benchmark_matrix.hpp" +// clang-format on +#include "algebra/common/register_benchmark.hpp" +#include "algebra/vc_soa/data_generator.hpp" // Benchmark include #include diff --git a/benchmarks/vc_soa/vc_soa_transform3.cpp b/benchmarks/algebra/src/vc_soa/vc_soa_transform3.cpp similarity index 89% rename from benchmarks/vc_soa/vc_soa_transform3.cpp rename to benchmarks/algebra/src/vc_soa/vc_soa_transform3.cpp index 40b24715..83517a9a 100644 --- a/benchmarks/vc_soa/vc_soa_transform3.cpp +++ b/benchmarks/algebra/src/vc_soa/vc_soa_transform3.cpp @@ -6,10 +6,12 @@ */ // Project include(s) +// clang-format off #include "algebra/vc_soa.hpp" -#include "benchmark/common/benchmark_transform3.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/vc_soa/data_generator.hpp" +#include "algebra/common/benchmark_transform3.hpp" +// clang-format on +#include "algebra/common/register_benchmark.hpp" +#include "algebra/vc_soa/data_generator.hpp" // Benchmark include #include diff --git a/benchmarks/vc_soa/vc_soa_vector.cpp b/benchmarks/algebra/src/vc_soa/vc_soa_vector.cpp similarity index 88% rename from benchmarks/vc_soa/vc_soa_vector.cpp rename to benchmarks/algebra/src/vc_soa/vc_soa_vector.cpp index 30bd57a8..e2b4cc85 100644 --- a/benchmarks/vc_soa/vc_soa_vector.cpp +++ b/benchmarks/algebra/src/vc_soa/vc_soa_vector.cpp @@ -6,10 +6,12 @@ */ // Project include(s) +// clang-format off #include "algebra/vc_soa.hpp" -#include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/common/register_benchmark.hpp" -#include "benchmark/vc_soa/data_generator.hpp" +#include "algebra/common/benchmark_vector.hpp" +// clang-format on +#include "algebra/common/register_benchmark.hpp" +#include "algebra/vc_soa/data_generator.hpp" // Benchmark include #include