From 810670be220112dbc04738d5f690223e26fef90f Mon Sep 17 00:00:00 2001 From: Joana Niermann Date: Fri, 12 Apr 2024 17:55:57 +0200 Subject: [PATCH] Rename to vc_aos --- benchmarks/CMakeLists.txt | 8 ++++---- .../benchmark/vc_aos/data_generator.hpp | 2 +- benchmarks/vc_aos/vc_aos_getter.cpp | 2 +- benchmarks/vc_aos/vc_aos_transform3.cpp | 2 +- benchmarks/vc_aos/vc_aos_vector.cpp | 2 +- frontend/CMakeLists.txt | 2 +- frontend/{vc_vc => vc_aos}/CMakeLists.txt | 12 +++++------ .../include/algebra/vc_aos.hpp} | 4 ++-- frontend/vc_cmath/CMakeLists.txt | 2 +- .../vc_cmath/include/algebra/vc_cmath.hpp | 4 ++-- math/CMakeLists.txt | 2 +- math/vc/CMakeLists.txt | 17 ---------------- math/vc_aos/CMakeLists.txt | 17 ++++++++++++++++ .../algebra/math/impl/vc_aos_getter.hpp} | 2 +- .../algebra/math/impl/vc_aos_transform3.hpp} | 2 +- .../algebra/math/impl/vc_aos_vector.hpp} | 0 .../include/algebra/math/vc_aos.hpp} | 6 +++--- storage/CMakeLists.txt | 2 +- storage/{vc => vc_aos}/CMakeLists.txt | 5 ++--- .../include/algebra/storage/vc_aos.hpp} | 0 tests/CMakeLists.txt | 6 +++--- tests/common/test_host_basics.hpp | 20 +++++++++---------- tests/{vc/vc_vc.cpp => vc_aos/vc_aos.cpp} | 12 +++++------ tests/{vc => vc_aos}/vc_cmath.cpp | 0 24 files changed, 65 insertions(+), 66 deletions(-) rename frontend/{vc_vc => vc_aos}/CMakeLists.txt (53%) rename frontend/{vc_vc/include/algebra/vc_vc.hpp => vc_aos/include/algebra/vc_aos.hpp} (97%) delete mode 100644 math/vc/CMakeLists.txt create mode 100644 math/vc_aos/CMakeLists.txt rename math/{vc/include/algebra/math/impl/vc_getter.hpp => vc_aos/include/algebra/math/impl/vc_aos_getter.hpp} (98%) rename math/{vc/include/algebra/math/impl/vc_transform3.hpp => vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp} (99%) rename math/{vc/include/algebra/math/impl/vc_vector.hpp => vc_aos/include/algebra/math/impl/vc_aos_vector.hpp} (100%) rename math/{vc/include/algebra/math/vc.hpp => vc_aos/include/algebra/math/vc_aos.hpp} (57%) rename storage/{vc => vc_aos}/CMakeLists.txt (75%) rename storage/{vc/include/algebra/storage/vc.hpp => vc_aos/include/algebra/storage/vc_aos.hpp} (100%) rename tests/{vc/vc_vc.cpp => vc_aos/vc_aos.cpp} (87%) rename tests/{vc => vc_aos}/vc_cmath.cpp (100%) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index f742a5c9..d3002c92 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -65,22 +65,22 @@ if( ALGEBRA_PLUGINS_INCLUDE_VC ) target_include_directories( algebra_bench_vc_aos INTERFACE "$" ) target_link_libraries(algebra_bench_vc_aos INTERFACE - algebra::vc_vc + algebra::vc_aos algebra::common_storage) add_library( algebra::bench_vc_aos ALIAS algebra_bench_vc_aos ) 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_vc ) + algebra::bench_vc_aos algebra::vc_aos ) 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_vc ) + algebra::bench_vc_aos algebra::vc_aos ) 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_vc ) + algebra::bench_vc_aos algebra::vc_aos ) if( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" ) add_library( algebra_bench_vc_soa INTERFACE ) diff --git a/benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp b/benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp index 6ec3e753..21874cff 100644 --- a/benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp +++ b/benchmarks/vc_aos/include/benchmark/vc_aos/data_generator.hpp @@ -8,7 +8,7 @@ #pragma once // Project include(s) -#include "algebra/vc_vc.hpp" +#include "algebra/vc_aos.hpp" // System include(s) #include diff --git a/benchmarks/vc_aos/vc_aos_getter.cpp b/benchmarks/vc_aos/vc_aos_getter.cpp index 35a4624f..45ed6e09 100644 --- a/benchmarks/vc_aos/vc_aos_getter.cpp +++ b/benchmarks/vc_aos/vc_aos_getter.cpp @@ -6,7 +6,7 @@ */ // Project include(s) -#include "algebra/vc_vc.hpp" +#include "algebra/vc_aos.hpp" #include "benchmark/common/benchmark_getter.hpp" #include "benchmark/vc_aos/data_generator.hpp" diff --git a/benchmarks/vc_aos/vc_aos_transform3.cpp b/benchmarks/vc_aos/vc_aos_transform3.cpp index d7a2bcee..116d850c 100644 --- a/benchmarks/vc_aos/vc_aos_transform3.cpp +++ b/benchmarks/vc_aos/vc_aos_transform3.cpp @@ -6,7 +6,7 @@ */ // Project include(s) -#include "algebra/vc_vc.hpp" +#include "algebra/vc_aos.hpp" #include "benchmark/common/benchmark_transform3.hpp" #include "benchmark/vc_aos/data_generator.hpp" diff --git a/benchmarks/vc_aos/vc_aos_vector.cpp b/benchmarks/vc_aos/vc_aos_vector.cpp index 92b78b99..70874c39 100644 --- a/benchmarks/vc_aos/vc_aos_vector.cpp +++ b/benchmarks/vc_aos/vc_aos_vector.cpp @@ -6,7 +6,7 @@ */ // Project include(s) -#include "algebra/vc_vc.hpp" +#include "algebra/vc_aos.hpp" #include "benchmark/common/benchmark_vector.hpp" #include "benchmark/vc_aos/data_generator.hpp" diff --git a/frontend/CMakeLists.txt b/frontend/CMakeLists.txt index e107071d..268ffb92 100644 --- a/frontend/CMakeLists.txt +++ b/frontend/CMakeLists.txt @@ -18,8 +18,8 @@ if( ALGEBRA_PLUGINS_INCLUDE_SMATRIX ) endif() if( ALGEBRA_PLUGINS_INCLUDE_VC ) + add_subdirectory( vc_aos ) add_subdirectory( vc_cmath ) - add_subdirectory( vc_vc ) if( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" ) add_subdirectory( vc_soa ) endif() diff --git a/frontend/vc_vc/CMakeLists.txt b/frontend/vc_aos/CMakeLists.txt similarity index 53% rename from frontend/vc_vc/CMakeLists.txt rename to frontend/vc_aos/CMakeLists.txt index c2f269da..83a2b053 100644 --- a/frontend/vc_vc/CMakeLists.txt +++ b/frontend/vc_aos/CMakeLists.txt @@ -5,10 +5,10 @@ # Mozilla Public License Version 2.0 # Set up the library. -algebra_add_library( algebra_vc_vc vc_vc - "include/algebra/vc_vc.hpp" ) -target_link_libraries( algebra_vc_vc +algebra_add_library( algebra_vc_aos vc_aos + "include/algebra/vc_aos.hpp" ) +target_link_libraries( algebra_vc_aos INTERFACE algebra::common algebra::vc_storage algebra::cmath_math - algebra::vc_math ) -algebra_test_public_headers( algebra_vc_vc - "algebra/vc_vc.hpp" ) + algebra::vc_aos_math ) +algebra_test_public_headers( algebra_vc_aos + "algebra/vc_aos.hpp" ) diff --git a/frontend/vc_vc/include/algebra/vc_vc.hpp b/frontend/vc_aos/include/algebra/vc_aos.hpp similarity index 97% rename from frontend/vc_vc/include/algebra/vc_vc.hpp rename to frontend/vc_aos/include/algebra/vc_aos.hpp index aab5ae3a..0b565b7d 100644 --- a/frontend/vc_vc/include/algebra/vc_vc.hpp +++ b/frontend/vc_aos/include/algebra/vc_aos.hpp @@ -9,8 +9,8 @@ // Project include(s). #include "algebra/math/cmath.hpp" -#include "algebra/math/vc.hpp" -#include "algebra/storage/vc.hpp" +#include "algebra/math/vc_aos.hpp" +#include "algebra/storage/vc_aos.hpp" // System include(s). #include diff --git a/frontend/vc_cmath/CMakeLists.txt b/frontend/vc_cmath/CMakeLists.txt index caff5f73..9c0245af 100644 --- a/frontend/vc_cmath/CMakeLists.txt +++ b/frontend/vc_cmath/CMakeLists.txt @@ -9,6 +9,6 @@ algebra_add_library( algebra_vc_cmath vc_cmath "include/algebra/vc_cmath.hpp" ) target_link_libraries( algebra_vc_cmath INTERFACE algebra::common algebra::vc_storage algebra::cmath_math - algebra::vc_math ) + algebra::vc_aos_math ) algebra_test_public_headers( algebra_vc_cmath "algebra/vc_cmath.hpp" ) diff --git a/frontend/vc_cmath/include/algebra/vc_cmath.hpp b/frontend/vc_cmath/include/algebra/vc_cmath.hpp index 778ef946..675f1e16 100644 --- a/frontend/vc_cmath/include/algebra/vc_cmath.hpp +++ b/frontend/vc_cmath/include/algebra/vc_cmath.hpp @@ -9,8 +9,8 @@ // Project include(s). #include "algebra/math/cmath.hpp" -#include "algebra/math/vc.hpp" -#include "algebra/storage/vc.hpp" +#include "algebra/math/vc_aos.hpp" +#include "algebra/storage/vc_aos.hpp" /// @name Operators on @c algebra::vc types /// @{ diff --git a/math/CMakeLists.txt b/math/CMakeLists.txt index 54ea4795..42c480ab 100644 --- a/math/CMakeLists.txt +++ b/math/CMakeLists.txt @@ -17,7 +17,7 @@ if( ALGEBRA_PLUGINS_INCLUDE_SMATRIX ) add_subdirectory( smatrix ) endif() if( ALGEBRA_PLUGINS_INCLUDE_VC ) - add_subdirectory( vc ) + add_subdirectory( vc_aos ) if( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" ) add_subdirectory( vc_soa ) endif() diff --git a/math/vc/CMakeLists.txt b/math/vc/CMakeLists.txt deleted file mode 100644 index 20ab90e8..00000000 --- a/math/vc/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Algebra plugins library, part of the ACTS project (R&D line) -# -# (c) 2021-2023 CERN for the benefit of the ACTS project -# -# Mozilla Public License Version 2.0 - -# Set up the library. -algebra_add_library( algebra_vc_math vc_math - "include/algebra/math/vc.hpp" - "include/algebra/math/impl/vc_getter.hpp" - "include/algebra/math/impl/vc_transform3.hpp" - "include/algebra/math/impl/vc_vector.hpp" ) -target_link_libraries( algebra_vc_math - INTERFACE Vc::Vc algebra::common algebra::common_math algebra::vc_storage - algebra::cmath_math ) -algebra_test_public_headers( algebra_vc_math - "algebra/math/vc.hpp" ) diff --git a/math/vc_aos/CMakeLists.txt b/math/vc_aos/CMakeLists.txt new file mode 100644 index 00000000..64a723c7 --- /dev/null +++ b/math/vc_aos/CMakeLists.txt @@ -0,0 +1,17 @@ +# Algebra plugins library, part of the ACTS project (R&D line) +# +# (c) 2021-2023 CERN for the benefit of the ACTS project +# +# Mozilla Public License Version 2.0 + +# Set up the library. +algebra_add_library( algebra_vc_aos_math vc_aos_math + "include/algebra/math/vc_aos.hpp" + "include/algebra/math/impl/vc_aos_getter.hpp" + "include/algebra/math/impl/vc_aos_transform3.hpp" + "include/algebra/math/impl/vc_aos_vector.hpp" ) +target_link_libraries( algebra_vc_aos_math + INTERFACE Vc::Vc algebra::common algebra::common_math algebra::vc_storage + algebra::cmath_math ) +algebra_test_public_headers( algebra_vc_aos_math + "algebra/math/vc_aos.hpp" ) diff --git a/math/vc/include/algebra/math/impl/vc_getter.hpp b/math/vc_aos/include/algebra/math/impl/vc_aos_getter.hpp similarity index 98% rename from math/vc/include/algebra/math/impl/vc_getter.hpp rename to math/vc_aos/include/algebra/math/impl/vc_aos_getter.hpp index ac28f527..586a36ae 100644 --- a/math/vc/include/algebra/math/impl/vc_getter.hpp +++ b/math/vc_aos/include/algebra/math/impl/vc_aos_getter.hpp @@ -9,7 +9,7 @@ // Project include(s). #include "algebra/math/common.hpp" -#include "algebra/math/impl/vc_vector.hpp" +#include "algebra/math/impl/vc_aos_vector.hpp" #include "algebra/qualifiers.hpp" #include "algebra/storage/vector.hpp" diff --git a/math/vc/include/algebra/math/impl/vc_transform3.hpp b/math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp similarity index 99% rename from math/vc/include/algebra/math/impl/vc_transform3.hpp rename to math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp index 1ef3b000..2cce53b4 100644 --- a/math/vc/include/algebra/math/impl/vc_transform3.hpp +++ b/math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp @@ -9,7 +9,7 @@ // Project include(s). #include "algebra/math/cmath.hpp" -#include "algebra/math/impl/vc_vector.hpp" +#include "algebra/math/impl/vc_aos_vector.hpp" #include "algebra/qualifiers.hpp" // Vc include(s). diff --git a/math/vc/include/algebra/math/impl/vc_vector.hpp b/math/vc_aos/include/algebra/math/impl/vc_aos_vector.hpp similarity index 100% rename from math/vc/include/algebra/math/impl/vc_vector.hpp rename to math/vc_aos/include/algebra/math/impl/vc_aos_vector.hpp diff --git a/math/vc/include/algebra/math/vc.hpp b/math/vc_aos/include/algebra/math/vc_aos.hpp similarity index 57% rename from math/vc/include/algebra/math/vc.hpp rename to math/vc_aos/include/algebra/math/vc_aos.hpp index d07ee0a5..26550fbf 100644 --- a/math/vc/include/algebra/math/vc.hpp +++ b/math/vc_aos/include/algebra/math/vc_aos.hpp @@ -8,6 +8,6 @@ #pragma once // Project include(s). -#include "algebra/math/impl/vc_getter.hpp" -#include "algebra/math/impl/vc_transform3.hpp" -#include "algebra/math/impl/vc_vector.hpp" +#include "algebra/math/impl/vc_aos_getter.hpp" +#include "algebra/math/impl/vc_aos_transform3.hpp" +#include "algebra/math/impl/vc_aos_vector.hpp" diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index 6879addc..019ff865 100644 --- a/storage/CMakeLists.txt +++ b/storage/CMakeLists.txt @@ -14,7 +14,7 @@ if( ALGEBRA_PLUGINS_INCLUDE_SMATRIX ) add_subdirectory( smatrix ) endif() if( ALGEBRA_PLUGINS_INCLUDE_VC ) - add_subdirectory( vc ) + add_subdirectory( vc_aos ) if( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" ) add_subdirectory( vc_soa ) endif() diff --git a/storage/vc/CMakeLists.txt b/storage/vc_aos/CMakeLists.txt similarity index 75% rename from storage/vc/CMakeLists.txt rename to storage/vc_aos/CMakeLists.txt index 628c5aeb..fe278c62 100644 --- a/storage/vc/CMakeLists.txt +++ b/storage/vc_aos/CMakeLists.txt @@ -6,9 +6,8 @@ # Set up the library. algebra_add_library( algebra_vc_storage vc_storage - "include/algebra/storage/vc.hpp" - "include/algebra/storage/impl/vc_array4_wrapper.hpp" ) + "include/algebra/storage/vc_aos.hpp" ) target_link_libraries( algebra_vc_storage INTERFACE algebra::common algebra::common_storage Vc::Vc ) algebra_test_public_headers( algebra_vc_storage - "algebra/storage/vc.hpp" ) + "algebra/storage/vc_aos.hpp" ) diff --git a/storage/vc/include/algebra/storage/vc.hpp b/storage/vc_aos/include/algebra/storage/vc_aos.hpp similarity index 100% rename from storage/vc/include/algebra/storage/vc.hpp rename to storage/vc_aos/include/algebra/storage/vc_aos.hpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ceca2488..2f7ae3ba 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -38,10 +38,10 @@ if( ALGEBRA_PLUGINS_INCLUDE_SMATRIX ) endif() if( ALGEBRA_PLUGINS_INCLUDE_VC ) - algebra_add_test( vc - "vc/vc_cmath.cpp" "vc/vc_vc.cpp" + algebra_add_test( vc_aos + "vc_aos/vc_cmath.cpp" "vc_aos/vc_aos.cpp" LINK_LIBRARIES GTest::gtest_main algebra::tests_common - algebra::vc_cmath algebra::vc_vc ) + algebra::vc_cmath algebra::vc_aos ) if( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang" ) algebra_add_test( vc_soa diff --git a/tests/common/test_host_basics.hpp b/tests/common/test_host_basics.hpp index d651f4d0..abb666d1 100644 --- a/tests/common/test_host_basics.hpp +++ b/tests/common/test_host_basics.hpp @@ -62,14 +62,14 @@ TYPED_TEST_P(test_host_basics_vector, local_vectors) { ASSERT_NEAR(phi, M_PI_4, this->m_epsilon); typename TypeParam::scalar perp = algebra::getter::perp(vD); - ASSERT_NEAR(perp, std::sqrt(2.f), this->m_epsilon); + ASSERT_NEAR(perp, std::sqrt(2.), this->m_epsilon); typename TypeParam::scalar norm = algebra::getter::norm(vD); - ASSERT_NEAR(norm, std::sqrt(2.f), this->m_epsilon); + ASSERT_NEAR(norm, std::sqrt(2.), this->m_epsilon); typename TypeParam::vector2 vDnorm = algebra::vector::normalize(vD); - ASSERT_NEAR(vDnorm[0], 1.f / std::sqrt(2.f), this->m_epsilon); - ASSERT_NEAR(vDnorm[1], 1.f / std::sqrt(2.f), this->m_epsilon); + ASSERT_NEAR(vDnorm[0], 1. / std::sqrt(2.), this->m_epsilon); + ASSERT_NEAR(vDnorm[1], 1. / std::sqrt(2.), this->m_epsilon); } // This defines the vector3 test suite @@ -105,16 +105,16 @@ TYPED_TEST_P(test_host_basics_vector, vector3) { ASSERT_NEAR(phi, M_PI_4, this->m_epsilon); typename TypeParam::scalar theta = algebra::getter::theta(vD); - ASSERT_NEAR(theta, std::atan2(std::sqrt(2.f), 1.f), this->m_epsilon); + ASSERT_NEAR(theta, std::atan2(std::sqrt(2.), 1.), this->m_epsilon); typename TypeParam::scalar eta = algebra::getter::eta(vD); ASSERT_NEAR(eta, 0.65847891569137573, this->m_isclose); typename TypeParam::scalar perp = algebra::getter::perp(vD); - ASSERT_NEAR(perp, std::sqrt(2.f), this->m_epsilon); + ASSERT_NEAR(perp, std::sqrt(2.), this->m_epsilon); typename TypeParam::scalar norm = algebra::getter::norm(vD); - ASSERT_NEAR(norm, std::sqrt(3.f), this->m_epsilon); + ASSERT_NEAR(norm, std::sqrt(3.), this->m_epsilon); } // This defines the vector operation test suite @@ -124,9 +124,9 @@ TYPED_TEST_P(test_host_basics_vector, getter) { // Normalization typename TypeParam::vector3 v3n = algebra::vector::normalize(v3); - ASSERT_NEAR(v3n[0], 1.f / std::sqrt(3.f), this->m_epsilon); - ASSERT_NEAR(v3n[1], 1.f / std::sqrt(3.f), this->m_epsilon); - ASSERT_NEAR(v3n[2], 1.f / std::sqrt(3.f), this->m_epsilon); + ASSERT_NEAR(v3n[0], 1. / std::sqrt(3.), this->m_epsilon); + ASSERT_NEAR(v3n[1], 1. / std::sqrt(3.), this->m_epsilon); + ASSERT_NEAR(v3n[2], 1. / std::sqrt(3.), this->m_epsilon); // Cross product typename TypeParam::vector3 z = diff --git a/tests/vc/vc_vc.cpp b/tests/vc_aos/vc_aos.cpp similarity index 87% rename from tests/vc/vc_vc.cpp rename to tests/vc_aos/vc_aos.cpp index ca11ac28..db722beb 100644 --- a/tests/vc/vc_vc.cpp +++ b/tests/vc_aos/vc_aos.cpp @@ -6,7 +6,7 @@ */ // Project include(s). -#include "algebra/vc_vc.hpp" +#include "algebra/vc_aos.hpp" // Test include(s). #include "test_host_basics.hpp" @@ -23,9 +23,9 @@ struct test_specialisation_name { static std::string GetName(int i) { switch (i) { case 0: - return "vc_vc"; + return "vc_aos"; case 1: - return "vc_vc"; + return "vc_aos"; default: return "unknown"; } @@ -50,11 +50,11 @@ typedef testing::Types< algebra::vc::vector2, algebra::vc::vector3, algebra::vc::transform3, std::size_t, algebra::vc::matrix_type, double>> - vc_vc_types; + vc_aos_types; INSTANTIATE_TYPED_TEST_SUITE_P(algebra_plugins, test_host_basics_vector, - vc_vc_types, test_specialisation_name); + vc_aos_types, test_specialisation_name); // @TODO: Implement /*INSTANTIATE_TYPED_TEST_SUITE_P(algebra_plugins, test_host_basics_matrix, array_cmath_types, test_specialisation_name);*/ INSTANTIATE_TYPED_TEST_SUITE_P(algebra_plugins, test_host_basics_transform, - vc_vc_types, test_specialisation_name); + vc_aos_types, test_specialisation_name); diff --git a/tests/vc/vc_cmath.cpp b/tests/vc_aos/vc_cmath.cpp similarity index 100% rename from tests/vc/vc_cmath.cpp rename to tests/vc_aos/vc_cmath.cpp