diff --git a/benchmarks/array/array_getter.cpp b/benchmarks/array/array_getter.cpp index b4d7890f..89f7364c 100644 --- a/benchmarks/array/array_getter.cpp +++ b/benchmarks/array/array_getter.cpp @@ -9,7 +9,6 @@ #include "algebra/array_cmath.hpp" #include "benchmark/array/data_generator.hpp" #include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/common/register_benchmark.hpp" // Benchmark include #include @@ -48,16 +47,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - 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_PLUGINS_REGISTER_GETTER_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/array/array_matrix.cpp b/benchmarks/array/array_matrix.cpp index 96835923..ac96ba1a 100644 --- a/benchmarks/array/array_matrix.cpp +++ b/benchmarks/array/array_matrix.cpp @@ -9,7 +9,6 @@ #include "algebra/array_cmath.hpp" #include "benchmark/array/data_generator.hpp" #include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/common/register_benchmark.hpp" // Benchmark include #include @@ -75,26 +74,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - algebra::register_benchmark(cfg, "_4x4_add_single"); - algebra::register_benchmark(cfg, "_4x4_add_double"); - algebra::register_benchmark(cfg, "_6x6_add_single"); - algebra::register_benchmark(cfg, "_6x6_add_double"); - algebra::register_benchmark(cfg, "_8x8_add_single"); - algebra::register_benchmark(cfg, "_8x8_add_double"); - - algebra::register_benchmark(cfg, "_4x4_mul_single"); - algebra::register_benchmark(cfg, "_4x4_mul_double"); - algebra::register_benchmark(cfg, "_6x6_mul_single"); - algebra::register_benchmark(cfg, "_6x6_mul_double"); - algebra::register_benchmark(cfg, "_8x8_mul_single"); - algebra::register_benchmark(cfg, "_8x8_mul_double"); - - algebra::register_benchmark(cfg, "_4x4_vec_single"); - algebra::register_benchmark(cfg, "_4x4_vec_double"); - algebra::register_benchmark(cfg, "_6x6_vec_single"); - algebra::register_benchmark(cfg, "_6x6_vec_double"); - algebra::register_benchmark(cfg, "_8x8_vec_single"); - algebra::register_benchmark(cfg, "_8x8_vec_double"); + ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/array/array_vector.cpp b/benchmarks/array/array_vector.cpp index e680b481..5d21f9b0 100644 --- a/benchmarks/array/array_vector.cpp +++ b/benchmarks/array/array_vector.cpp @@ -9,7 +9,6 @@ #include "algebra/array_cmath.hpp" #include "benchmark/array/data_generator.hpp" #include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/common/register_benchmark.hpp" // Benchmark include #include @@ -50,16 +49,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - 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_PLUGINS_REGISTER_VECTOR_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/common/include/benchmark/common/benchmark_getter.hpp b/benchmarks/common/include/benchmark/common/benchmark_getter.hpp index 916dd5b9..bb7bd205 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_getter.hpp +++ b/benchmarks/common/include/benchmark/common/benchmark_getter.hpp @@ -9,6 +9,7 @@ // Project include(s) #include "benchmark_vector.hpp" +#include "register_benchmark.hpp" namespace algebra::bench_op { @@ -29,4 +30,17 @@ ALGEBRA_PLUGINS_BENCH_GETTER(perp) ALGEBRA_PLUGINS_BENCH_GETTER(norm) ALGEBRA_PLUGINS_BENCH_GETTER(eta) +// Macro for registering all getter benchmarks +#define ALGEBRA_PLUGINS_REGISTER_GETTER_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"); + } // namespace algebra::bench_op diff --git a/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp b/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp index cb9d7f50..3da3333b 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp +++ b/benchmarks/common/include/benchmark/common/benchmark_matrix.hpp @@ -9,6 +9,7 @@ // Project include(s) #include "benchmark_base.hpp" +#include "register_benchmark.hpp" // System include(s) #include @@ -183,4 +184,27 @@ struct mul { } // namespace bench_op +// Macro for registering all vector benchmarks +#define ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(CFG) \ + algebra::register_benchmark(CFG, "_4x4_add_single"); \ + algebra::register_benchmark(CFG, "_4x4_add_double"); \ + algebra::register_benchmark(CFG, "_6x6_add_single"); \ + algebra::register_benchmark(CFG, "_6x6_add_double"); \ + algebra::register_benchmark(CFG, "_8x8_add_single"); \ + algebra::register_benchmark(CFG, "_8x8_add_double"); \ + \ + algebra::register_benchmark(CFG, "_4x4_mul_single"); \ + algebra::register_benchmark(CFG, "_4x4_mul_double"); \ + algebra::register_benchmark(CFG, "_6x6_mul_single"); \ + algebra::register_benchmark(CFG, "_6x6_mul_double"); \ + algebra::register_benchmark(CFG, "_8x8_mul_single"); \ + algebra::register_benchmark(CFG, "_8x8_mul_double"); \ + \ + algebra::register_benchmark(CFG, "_4x4_vec_single"); \ + algebra::register_benchmark(CFG, "_4x4_vec_double"); \ + algebra::register_benchmark(CFG, "_6x6_vec_single"); \ + algebra::register_benchmark(CFG, "_6x6_vec_double"); \ + algebra::register_benchmark(CFG, "_8x8_vec_single"); \ + algebra::register_benchmark(CFG, "_8x8_vec_double"); + } // namespace algebra diff --git a/benchmarks/common/include/benchmark/common/benchmark_vector.hpp b/benchmarks/common/include/benchmark/common/benchmark_vector.hpp index cb128012..93de4c5c 100644 --- a/benchmarks/common/include/benchmark/common/benchmark_vector.hpp +++ b/benchmarks/common/include/benchmark/common/benchmark_vector.hpp @@ -9,6 +9,7 @@ // Project include(s) #include "benchmark_base.hpp" +#include "register_benchmark.hpp" // System include(s) #include @@ -161,4 +162,17 @@ struct normalize { } // namespace bench_op +// 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"); + } // namespace algebra diff --git a/benchmarks/eigen/eigen_getter.cpp b/benchmarks/eigen/eigen_getter.cpp index 2761a5b0..aa0fd427 100644 --- a/benchmarks/eigen/eigen_getter.cpp +++ b/benchmarks/eigen/eigen_getter.cpp @@ -8,7 +8,6 @@ // Project include(s) #include "algebra/eigen_eigen.hpp" #include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/common/register_benchmark.hpp" #include "benchmark/eigen/data_generator.hpp" // Benchmark include @@ -48,16 +47,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - 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_PLUGINS_REGISTER_GETTER_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/eigen/eigen_matrix.cpp b/benchmarks/eigen/eigen_matrix.cpp index f66eb43c..b7d30ada 100644 --- a/benchmarks/eigen/eigen_matrix.cpp +++ b/benchmarks/eigen/eigen_matrix.cpp @@ -8,7 +8,6 @@ // Project include(s) #include "algebra/eigen_eigen.hpp" #include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/common/register_benchmark.hpp" #include "benchmark/eigen/data_generator.hpp" // Benchmark include @@ -75,26 +74,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - algebra::register_benchmark(cfg, "_4x4_add_single"); - algebra::register_benchmark(cfg, "_4x4_add_double"); - algebra::register_benchmark(cfg, "_6x6_add_single"); - algebra::register_benchmark(cfg, "_6x6_add_double"); - algebra::register_benchmark(cfg, "_8x8_add_single"); - algebra::register_benchmark(cfg, "_8x8_add_double"); - - algebra::register_benchmark(cfg, "_4x4_mul_single"); - algebra::register_benchmark(cfg, "_4x4_mul_double"); - algebra::register_benchmark(cfg, "_6x6_mul_single"); - algebra::register_benchmark(cfg, "_6x6_mul_double"); - algebra::register_benchmark(cfg, "_8x8_mul_single"); - algebra::register_benchmark(cfg, "_8x8_mul_double"); - - algebra::register_benchmark(cfg, "_4x4_vec_single"); - algebra::register_benchmark(cfg, "_4x4_vec_double"); - algebra::register_benchmark(cfg, "_6x6_vec_single"); - algebra::register_benchmark(cfg, "_6x6_vec_double"); - algebra::register_benchmark(cfg, "_8x8_vec_single"); - algebra::register_benchmark(cfg, "_8x8_vec_double"); + ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/eigen/eigen_vector.cpp b/benchmarks/eigen/eigen_vector.cpp index e36fe0e7..de791f86 100644 --- a/benchmarks/eigen/eigen_vector.cpp +++ b/benchmarks/eigen/eigen_vector.cpp @@ -8,7 +8,6 @@ // Project include(s) #include "algebra/eigen_eigen.hpp" #include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/common/register_benchmark.hpp" #include "benchmark/eigen/data_generator.hpp" // Benchmark include @@ -50,16 +49,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - 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_PLUGINS_REGISTER_VECTOR_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/vc_aos/vc_aos_getter.cpp b/benchmarks/vc_aos/vc_aos_getter.cpp index f27bca7d..8f391020 100644 --- a/benchmarks/vc_aos/vc_aos_getter.cpp +++ b/benchmarks/vc_aos/vc_aos_getter.cpp @@ -8,7 +8,6 @@ // Project include(s) #include "algebra/vc_aos.hpp" #include "benchmark/common/benchmark_getter.hpp" -#include "benchmark/common/register_benchmark.hpp" #include "benchmark/vc_aos/data_generator.hpp" // Benchmark include @@ -48,16 +47,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - 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_PLUGINS_REGISTER_GETTER_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/vc_aos/vc_aos_matrix.cpp b/benchmarks/vc_aos/vc_aos_matrix.cpp index d728bb1b..95be41d7 100644 --- a/benchmarks/vc_aos/vc_aos_matrix.cpp +++ b/benchmarks/vc_aos/vc_aos_matrix.cpp @@ -8,7 +8,6 @@ // Project include(s) #include "algebra/vc_aos.hpp" #include "benchmark/common/benchmark_matrix.hpp" -#include "benchmark/common/register_benchmark.hpp" #include "benchmark/vc_aos/data_generator.hpp" // Benchmark include @@ -75,26 +74,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - algebra::register_benchmark(cfg, "_4x4_add_single"); - algebra::register_benchmark(cfg, "_4x4_add_double"); - algebra::register_benchmark(cfg, "_6x6_add_single"); - algebra::register_benchmark(cfg, "_6x6_add_double"); - algebra::register_benchmark(cfg, "_8x8_add_single"); - algebra::register_benchmark(cfg, "_8x8_add_double"); - - algebra::register_benchmark(cfg, "_4x4_mul_single"); - algebra::register_benchmark(cfg, "_4x4_mul_double"); - algebra::register_benchmark(cfg, "_6x6_mul_single"); - algebra::register_benchmark(cfg, "_6x6_mul_double"); - algebra::register_benchmark(cfg, "_8x8_mul_single"); - algebra::register_benchmark(cfg, "_8x8_mul_double"); - - algebra::register_benchmark(cfg, "_4x4_vec_single"); - algebra::register_benchmark(cfg, "_4x4_vec_double"); - algebra::register_benchmark(cfg, "_6x6_vec_single"); - algebra::register_benchmark(cfg, "_6x6_vec_double"); - algebra::register_benchmark(cfg, "_8x8_vec_single"); - algebra::register_benchmark(cfg, "_8x8_vec_double"); + ALGEBRA_PLUGINS_REGISTER_MATRIX_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/benchmarks/vc_aos/vc_aos_vector.cpp b/benchmarks/vc_aos/vc_aos_vector.cpp index 39f0e028..fbe8261c 100644 --- a/benchmarks/vc_aos/vc_aos_vector.cpp +++ b/benchmarks/vc_aos/vc_aos_vector.cpp @@ -8,7 +8,6 @@ // Project include(s) #include "algebra/vc_aos.hpp" #include "benchmark/common/benchmark_vector.hpp" -#include "benchmark/common/register_benchmark.hpp" #include "benchmark/vc_aos/data_generator.hpp" // Benchmark include @@ -48,16 +47,7 @@ int main(int argc, char** argv) { // // Register all benchmarks // - 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_PLUGINS_REGISTER_VECTOR_BENCH(cfg) ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/extern/vc/CMakeLists.txt b/extern/vc/CMakeLists.txt index adb221bb..050ecd72 100644 --- a/extern/vc/CMakeLists.txt +++ b/extern/vc/CMakeLists.txt @@ -52,7 +52,7 @@ target_include_directories( Vc # Disable a warning for GCC which the Vc build turns on explicitly for that # compiler, just to then go and trigger it... :-/ if( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" ) - target_compile_options( Vc PRIVATE "-Wno-old-style-cast -Wdeprecated-enum-enum-conversion -Wdeprecated-declarations" ) + target_compile_options( Vc PRIVATE "-Wno-old-style-cast ) endif() # Set up an alias for the Vc target, with the same name that it will have diff --git a/math/vc_aos/include/algebra/math/impl/vc_aos_matrix.hpp b/math/vc_aos/include/algebra/math/impl/vc_aos_matrix.hpp index 17e617d8..d61521d2 100644 --- a/math/vc_aos/include/algebra/math/impl/vc_aos_matrix.hpp +++ b/math/vc_aos/include/algebra/math/impl/vc_aos_matrix.hpp @@ -104,22 +104,6 @@ struct actor { const matrix_type &m) { return storage::transpose(m); } - - /// Get determinant using a specific algorithm @tparam determinant_t - /*template - ALGEBRA_HOST_DEVICE static constexpr constexpr value_type determinant( - const matrix_type &m) { - - return determinant_t{}(m); - } - - /// Get inverse using a specific algorithm @tparam inverse_t - template - ALGEBRA_HOST_DEVICE static constexpr constexpr matrix_type inverse( - const matrix_type &m) { - - return inverse_t{}(m); - }*/ }; } // namespace matrix diff --git a/math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp b/math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp index db6be7ad..277053f7 100644 --- a/math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp +++ b/math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp @@ -36,6 +36,7 @@ using algebra::storage::operator+; template