Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 4cd8a7b

Browse files
authored
ref: simplify plugin structure (#170)
Restructure the plugins, so that they are not split between frontend, storage and math libraries. Also renames some types and adds some general cleanup.
1 parent 8fec5d0 commit 4cd8a7b

File tree

111 files changed

+994
-1562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+994
-1562
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Algebra plugins library, part of the ACTS project (R&D line)
22
#
3-
# (c) 2021-2024 CERN for the benefit of the ACTS project
3+
# (c) 2021-2026 CERN for the benefit of the ACTS project
44
#
55
# Mozilla Public License Version 2.0
66

@@ -243,9 +243,8 @@ endif()
243243

244244
# Set up the Algebra Plugin libraries.
245245
add_subdirectory(common)
246-
add_subdirectory(frontend)
247-
add_subdirectory(math)
248-
add_subdirectory(storage)
246+
add_subdirectory(plugins)
247+
add_subdirectory(generic)
249248
add_subdirectory(utils)
250249

251250
# Set up the test(s).

benchmarks/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ target_include_directories(
2929
)
3030
target_link_libraries(
3131
algebra_bench_array
32-
INTERFACE algebra::array algebra::common_storage
32+
INTERFACE algebra::array algebra::common
3333
)
3434
algebra_add_benchmark( array_getter
3535
"array/array_getter.cpp"
@@ -60,7 +60,7 @@ if(ALGEBRA_PLUGINS_INCLUDE_EIGEN)
6060
)
6161
target_link_libraries(
6262
algebra_bench_eigen
63-
INTERFACE algebra::eigen algebra::common_storage
63+
INTERFACE algebra::eigen algebra::common
6464
)
6565
algebra_add_benchmark(eigen_getter
6666
"eigen/eigen_getter.cpp"
@@ -93,7 +93,7 @@ if(ALGEBRA_PLUGINS_INCLUDE_VC)
9393
)
9494
target_link_libraries(
9595
algebra_bench_vc_aos
96-
INTERFACE algebra::vc_aos algebra::common_storage
96+
INTERFACE algebra::vc_aos algebra::common
9797
)
9898
algebra_add_benchmark(vc_aos_getter
9999
"vc_aos/vc_aos_getter.cpp"
@@ -124,7 +124,7 @@ if(ALGEBRA_PLUGINS_INCLUDE_VC)
124124
)
125125
target_link_libraries(
126126
algebra_bench_vc_soa
127-
INTERFACE algebra::vc_soa algebra::common_storage
127+
INTERFACE algebra::vc_soa algebra::common
128128
)
129129
algebra_add_benchmark(vc_soa_getter
130130
"vc_soa/vc_soa_getter.cpp"
@@ -161,7 +161,7 @@ if(ALGEBRA_PLUGINS_INCLUDE_FASTOR)
161161
)
162162
target_link_libraries(
163163
algebra_bench_fastor
164-
INTERFACE algebra::fastor algebra::common_storage
164+
INTERFACE algebra::fastor algebra::common
165165
)
166166
algebra_add_benchmark(fastor_getter
167167
"fastor/fastor_getter.cpp"

common/CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,29 @@
44
#
55
# Mozilla Public License Version 2.0
66

7-
# Set up the library.
7+
# Set up the common library.
88
algebra_add_library( algebra_common common
9+
"include/algebra/array_operators.hpp"
910
"include/algebra/assert.hpp"
11+
"include/algebra/boolean.hpp"
1012
"include/algebra/concepts.hpp"
13+
"include/algebra/math.hpp"
14+
"include/algebra/matrix_getter.hpp"
15+
"include/algebra/matrix.hpp"
1116
"include/algebra/qualifiers.hpp"
1217
"include/algebra/type_traits.hpp"
18+
"include/algebra/vector.hpp"
1319
)
1420

1521
algebra_test_public_headers( algebra_common
22+
"algebra/array_operators.hpp"
1623
"algebra/assert.hpp"
24+
"algebra/boolean.hpp"
1725
"algebra/concepts.hpp"
26+
"algebra/math.hpp"
27+
"algebra/matrix_getter.hpp"
28+
"algebra/matrix.hpp"
1829
"algebra/qualifiers.hpp"
1930
"algebra/type_traits.hpp"
31+
"algebra/vector.hpp"
2032
)

storage/common/include/algebra/storage/array_operators.hpp renamed to common/include/algebra/array_operators.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** Algebra plugins, part of the ACTS project
22
*
3-
* (c) 2023 CERN for the benefit of the ACTS project
3+
* (c) 2023-2026 CERN for the benefit of the ACTS project
44
*
55
* Mozilla Public License Version 2.0
66
*/

common/include/algebra/assert.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* ALGEBRA PLUGIN library, part of the ACTS project (R&D line)
33
*
4-
* (c) 2025 CERN for the benefit of the ACTS project
4+
* (c) 2025-2026 CERN for the benefit of the ACTS project
55
*
66
* Mozilla Public License Version 2.0
77
*/

math/common/include/algebra/math/boolean.hpp renamed to common/include/algebra/boolean.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** Detray library, part of the ACTS project (R&D line)
22
*
3-
* (c) 2024 CERN for the benefit of the ACTS project
3+
* (c) 2024-2026 CERN for the benefit of the ACTS project
44
*
55
* Mozilla Public License Version 2.0
66
*/

common/include/algebra/concepts.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** Algebra plugins library, part of the ACTS project
22
*
3-
* (c) 2024 CERN for the benefit of the ACTS project
3+
* (c) 2024-2026 CERN for the benefit of the ACTS project
44
*
55
* Mozilla Public License Version 2.0
66
*/
@@ -144,7 +144,7 @@ concept transform3D = requires(T trf) {
144144
template <typename A>
145145
concept algebra = (concepts::value<typename A::value_type> &&
146146
concepts::scalar<typename A::scalar> &&
147-
concepts::index<typename A::size_type> &&
147+
concepts::index<typename A::index_type> &&
148148
concepts::vector3D<typename A::vector3D> &&
149149
concepts::point2D<typename A::point2D> &&
150150
concepts::point3D<typename A::point3D> &&

math/common/include/algebra/math/common.hpp renamed to common/include/algebra/math.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** Algebra plugins library, part of the ACTS project
22
*
3-
* (c) 2022-2024 CERN for the benefit of the ACTS project
3+
* (c) 2022-2026 CERN for the benefit of the ACTS project
44
*
55
* Mozilla Public License Version 2.0
66
*/

storage/common/include/algebra/storage/matrix.hpp renamed to common/include/algebra/matrix.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/** Algebra plugins, part of the ACTS project
22
*
3-
* (c) 2024 CERN for the benefit of the ACTS project
3+
* (c) 2024-2026 CERN for the benefit of the ACTS project
44
*
55
* Mozilla Public License Version 2.0
66
*/
77
#pragma once
88

99
// Project include(s).
1010
#include "algebra/concepts.hpp"
11-
#include "algebra/storage/vector.hpp"
1211
#include "algebra/type_traits.hpp"
12+
#include "algebra/vector.hpp"
1313

1414
// System include(s).
1515
#include <array>
@@ -20,10 +20,11 @@ namespace algebra::storage {
2020
/// Generic matrix type that can take vectors as columns
2121
template <template <typename, std::size_t> class array_t,
2222
concepts::scalar scalar_t, std::size_t ROW, std::size_t COL>
23-
struct ALGEBRA_ALIGN(alignof(storage::vector<ROW, scalar_t, array_t>)) matrix {
23+
struct ALGEBRA_ALIGN(
24+
alignof(algebra::storage::vector<ROW, scalar_t, array_t>)) matrix {
2425

2526
// The matrix consists of column vectors
26-
using vector_type = storage::vector<ROW, scalar_t, array_t>;
27+
using vector_type = algebra::storage::vector<ROW, scalar_t, array_t>;
2728
// Value type: Can be simd types
2829
using scalar_type = scalar_t;
2930

storage/common/include/algebra/storage/matrix_getter.hpp renamed to common/include/algebra/matrix_getter.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/** Algebra plugins, part of the ACTS project
22
*
3-
* (c) 2024 CERN for the benefit of the ACTS project
3+
* (c) 2024-2026 CERN for the benefit of the ACTS project
44
*
55
* Mozilla Public License Version 2.0
66
*/
77
#pragma once
88

99
// Project include(s).
1010
#include "algebra/concepts.hpp"
11-
#include "algebra/storage/matrix.hpp"
12-
#include "algebra/storage/vector.hpp"
11+
#include "algebra/matrix.hpp"
12+
#include "algebra/vector.hpp"
1313

1414
// System include(s).
1515
#include <cassert>

0 commit comments

Comments
 (0)