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

Commit 8fec5d0

Browse files
ref: adapt the test layout to the detray test setup (#171)
Restructure the tests to match the detray test library. In particular, deduplicate the per-plugin test executables and rearrange the device and host tests to a more similar structure --------- Co-authored-by: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
1 parent cfa2c30 commit 8fec5d0

71 files changed

Lines changed: 2388 additions & 2232 deletions

Some content is hidden

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

.github/workflows/builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
PLATFORM:
109109
NAME: "SYCL NVIDIA"
110110
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda_oneapi:69"
111-
OPTIONS: --preset sycl -DALGEBRA_PLUGINS_TEST_CUDA=FALSE
111+
OPTIONS: --preset sycl -DALGEBRA_BUILD_CUDA=FALSE
112112
RUN_TESTS: false
113113

114114
# The system to run on.

.github/workflows/checks.yml

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 (R&D line)
22
#
3-
# (c) 2021-2025 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

CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ endif()
2626
include(CTest)
2727
include(GNUInstallDirs)
2828

29+
include(CheckLanguage)
30+
check_language(CUDA)
31+
set(ALGEBRA_BUILD_CUDA_DEFAULT FALSE)
32+
if(CMAKE_CUDA_COMPILER)
33+
set(ALGEBRA_BUILD_CUDA_DEFAULT TRUE)
34+
endif()
35+
2936
# Flags controlling the meta-build system.
3037
option(ALGEBRA_PLUGINS_USE_SYSTEM_LIBS "Use system libraries be default" FALSE)
3138

@@ -48,7 +55,23 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
4855
"Directory for the built static libraries"
4956
)
5057

58+
option(
59+
ALGEBRA_BUILD_CUDA
60+
"Build the CUDA sources included in algebra-plugins"
61+
${ALGEBRA_BUILD_CUDA_DEFAULT}
62+
)
63+
option(
64+
ALGEBRA_BUILD_SYCL
65+
"Build the SYCL sources included in algebra-plugins"
66+
OFF
67+
)
68+
5169
# Flags controlling how the Algebra Plugins code should behave.
70+
option(
71+
ALGEBRA_PLUGINS_INCLUDE_ARRAY
72+
"Include std::array types in Algebra Plugins"
73+
TRUE
74+
)
5275
option(
5376
ALGEBRA_PLUGINS_INCLUDE_EIGEN
5477
"Include Eigen types in Algebra Plugins"

CMakePresets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@
5757
"displayName" : "CUDA Developer Configuration",
5858
"inherits" : [ "eigen" ],
5959
"cacheVariables" : {
60-
"ALGEBRA_PLUGINS_TEST_CUDA" : "TRUE"
60+
"ALGEBRA_BUILD_CUDA" : "TRUE"
6161
}
6262
},
6363
{
6464
"name" : "sycl",
6565
"displayName" : "SYCL Developer Configuration",
66-
"inherits" : ["eigen" ],
66+
"inherits" : [ "eigen" ],
6767
"cacheVariables" : {
68-
"ALGEBRA_PLUGINS_TEST_SYCL" : "TRUE",
68+
"ALGEBRA_BUILD_SYCL" : "TRUE",
6969
"VECMEM_BUILD_SYCL_LIBRARY" : "TRUE"
7070
}
7171
}

common/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
# Algebra plugins library, part of the ACTS project (R&D line)
22
#
3-
# (c) 2021-2023 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

77
# Set up the library.
88
algebra_add_library( algebra_common common
9+
"include/algebra/assert.hpp"
10+
"include/algebra/concepts.hpp"
911
"include/algebra/qualifiers.hpp"
12+
"include/algebra/type_traits.hpp"
1013
)
14+
1115
algebra_test_public_headers( algebra_common
16+
"algebra/assert.hpp"
17+
"algebra/concepts.hpp"
1218
"algebra/qualifiers.hpp"
19+
"algebra/type_traits.hpp"
1320
)

common/include/algebra/type_traits.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ struct get_algebra<T> {
154154
using scalar = typename T::scalar;
155155
using point2D = typename T::point2D;
156156
using point3D = typename T::point3D;
157+
using vector2D = typename T::vector2D;
157158
using vector3D = typename T::vector3D;
158159
using transform3D = typename T::transform3D;
159160
template <std::size_t ROWS, std::size_t COLS>
@@ -183,6 +184,9 @@ using get_point2D_t = typename traits::get_algebra<A>::point2D;
183184
template <typename A>
184185
using get_point3D_t = typename traits::get_algebra<A>::point3D;
185186

187+
template <typename A>
188+
using get_vector2D_t = typename traits::get_algebra<A>::vector2D;
189+
186190
template <typename A>
187191
using get_vector3D_t = typename traits::get_algebra<A>::vector3D;
188192

frontend/array/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# Mozilla Public License Version 2.0
66

7+
message(STATUS "Building the std::array algebra plugin")
8+
79
# Set up the library.
810
algebra_add_library( algebra_array array
911
"include/algebra/array.hpp"

frontend/array/include/algebra/array.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ struct array {
141141
using transform3D = algebra::array::transform3<value_type>;
142142
using point2D = algebra::array::point2<value_type>;
143143
using point3D = algebra::array::point3<value_type>;
144+
using vector2D = algebra::array::vector2<value_type>;
144145
using vector3D = algebra::array::vector3<value_type>;
145146

146147
template <std::size_t ROWS, std::size_t COLS>

frontend/eigen/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# Mozilla Public License Version 2.0
66

7+
message(STATUS "Building the Eigen3 algebra plugin")
8+
79
# Set up the library.
810
algebra_add_library( algebra_eigen eigen
911
"include/algebra/eigen.hpp"

frontend/eigen/include/algebra/eigen.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ struct eigen {
104104
using transform3D = algebra::eigen::transform3<value_type>;
105105
using point2D = algebra::eigen::point2<value_type>;
106106
using point3D = algebra::eigen::point3<value_type>;
107+
using vector2D = algebra::eigen::vector2<value_type>;
107108
using vector3D = algebra::eigen::vector3<value_type>;
108109

109110
template <std::size_t ROWS, std::size_t COLS>

0 commit comments

Comments
 (0)