Skip to content

Commit cafec8a

Browse files
committed
Rename the Vc plugin to Vc_AoS to distinguish it from the Vc_SoA plugin and build the latter in the CI
1 parent 0857bad commit cafec8a

File tree

20 files changed

+94
-67
lines changed

20 files changed

+94
-67
lines changed

.github/workflows/builds.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- NAME: "HOST"
5959
CXX_STANDARD: "20"
6060
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
61-
OPTIONS: -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=ON -DDETRAY_VC_PLUGIN=ON
61+
OPTIONS: -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=ON -DDETRAY_VC_AOS_PLUGIN=ON -DDETRAY_VC_SOA_PLUGIN=ON
6262

6363
# The system to run on.
6464
runs-on: ubuntu-latest
@@ -101,7 +101,7 @@ jobs:
101101
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
102102
cmake --build build -- -j $(nproc)
103103
# Run the unit test(s).
104-
- name: Test
104+
- name: Full Test
105105
if: "matrix.BUILD_TYPE == 'Release'"
106106
run: |
107107
cd build
@@ -126,11 +126,11 @@ jobs:
126126
- NAME: "CUDA"
127127
CXX_STANDARD: "20"
128128
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda:56"
129-
OPTIONS: -DDETRAY_BUILD_CUDA=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_PLUGIN=OFF
129+
OPTIONS: -DDETRAY_BUILD_CUDA=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_AOS_PLUGIN=OFF -DDETRAY_VC_SOA_PLUGIN=OFF
130130
- NAME: "SYCL"
131131
CXX_STANDARD: "20"
132132
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:56"
133-
OPTIONS: -DDETRAY_BUILD_CUDA=OFF -DDETRAY_BUILD_SYCL=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_PLUGIN=OFF
133+
OPTIONS: -DDETRAY_BUILD_CUDA=OFF -DDETRAY_BUILD_SYCL=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_AOS_PLUGIN=OFF -DDETRAY_VC_SOA_PLUGIN=OFF
134134

135135
# The system to run on.
136136
runs-on: ubuntu-latest

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ endif()
5555
# Flags controlling which parts of Detray to build.
5656
option( DETRAY_EIGEN_PLUGIN "Build Eigen math plugin" OFF )
5757
option( DETRAY_SMATRIX_PLUGIN "Build ROOT/SMatrix math plugin" OFF )
58-
option( DETRAY_VC_PLUGIN "Build Vc based math plugin" OFF )
58+
option( DETRAY_VC_AOS_PLUGIN "Build Vc based AoS math plugin" OFF )
59+
option( DETRAY_VC_SOA_PLUGIN "Build Vc based SoA math plugin" OFF )
5960
option( DETRAY_SVG_DISPLAY "Build ActSVG display module" OFF)
6061
option( DETRAY_BUILD_SYCL "Build the SYCL sources included in detray" OFF )
6162
option( DETRAY_BUILD_CUDA "Build the CUDA sources included in detray"

CMakePresets.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
"DETRAY_SETUP_BENCHMARK": "TRUE",
3838
"DETRAY_SETUP_COVFIE": "TRUE",
3939
"DETRAY_SETUP_DFELIBS": "TRUE",
40-
"DETRAY_SETUP_NLOHMANN": "TRUE"
40+
"DETRAY_SETUP_NLOHMANN": "TRUE",
41+
"ALGEBRA_PLUGINS_INCLUDE_EIGEN": "TRUE",
42+
"ALGEBRA_PLUGINS_SETUP_EIGEN3": "TRUE",
43+
"ALGEBRA_PLUGINS_INCLUDE_VC": "TRUE",
44+
"ALGEBRA_PLUGINS_SETUP_VC": "TRUE"
4145
}
4246
},
4347
{
@@ -75,7 +79,8 @@
7579
"inherits" : [ "default-fp32" ],
7680
"cacheVariables" : {
7781
"DETRAY_BUILD_CUDA" : "TRUE",
78-
"DETRAY_VC_PLUGIN" : "FALSE",
82+
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
83+
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
7984
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
8085
}
8186
},
@@ -85,7 +90,8 @@
8590
"inherits" : [ "default-fp32" ],
8691
"cacheVariables" : {
8792
"DETRAY_BUILD_SYCL" : "TRUE",
88-
"DETRAY_VC_PLUGIN" : "FALSE",
93+
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
94+
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
8995
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
9096
}
9197
},

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Detray is part of the ACTS project (R&D line for parallelization), the ACTS project can be found: https://github.com/acts-project/acts.
44

5-
This is a C++17 header only library for detector surface intersections using different algebra plugin libraries. It follows the navigation and propagation concept of ACTS, however, with an attempt to create
5+
This is a C++20 header only library for detector surface intersections using different algebra plugin libraries. It follows the navigation and propagation concept of ACTS, however, with an attempt to create
66
a geometry without polymorphic inheritance structure.
77

88

@@ -66,7 +66,8 @@ The following cmake options are available and can also be specified explicitly f
6666
| DETRAY_CUSTOM_SCALARTYPE | Floating point precision | double |
6767
| DETRAY_EIGEN_PLUGIN | Build Eigen math plugin | OFF |
6868
| DETRAY_SMATRIX_PLUGIN | Build ROOT/SMatrix math plugin | OFF |
69-
| DETRAY_VC_PLUGIN | Build Vc based math plugin | OFF |
69+
| DETRAY_VC_AOS_PLUGIN | Build Vc based AoS math plugin | OFF |
70+
| DETRAY_VC_SOA_PLUGIN | Build Vc based SoA math plugin (currently only supports the ray-surface intersectors) | OFF |
7071
| DETRAY_SVG_DISPLAY | Build ActSVG display module | OFF |
7172

7273
## Continuous benchmark

cmake/detray-config.cmake.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
# Detray build.
1212
set( DETRAY_EIGEN_PLUGIN @DETRAY_EIGEN_PLUGIN@ )
1313
set( DETRAY_SMATRIX_PLUGIN @DETRAY_SMATRIX_PLUGIN@ )
14-
set( DETRAY_VC_PLUGIN @DETRAY_VC_PLUGIN@ )
14+
set( DETRAY_VC_AOS_PLUGIN @DETRAY_VC_AOS_PLUGIN@ )
15+
set( DETRAY_VC_SOA_PLUGIN @DETRAY_VC_SOA_PLUGIN@ )
1516
set( DETRAY_DISPLAY @DETRAY_DISPLAY@ )
1617
set( DETRAY_BUILD_CUDA @DETRAY_BUILD_CUDA@ )
1718

core/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ if( DETRAY_SMATRIX_PLUGIN )
6262
INTERFACE detray::core detray::algebra_smatrix )
6363
endif()
6464

65-
if( DETRAY_VC_PLUGIN )
66-
detray_add_library( detray_core_vc core_vc )
67-
target_link_libraries( detray_core_vc
68-
INTERFACE detray::core detray::algebra_vc )
65+
if( DETRAY_VC_AOS_PLUGIN )
66+
detray_add_library( detray_core_vc_aos core_vc_aos )
67+
target_link_libraries( detray_core_vc_aos
68+
INTERFACE detray::core detray::algebra_vc_aos )
6969
endif()
7070

7171
if( DETRAY_VC_SOA_PLUGIN )
@@ -88,8 +88,8 @@ if( BUILD_TESTING AND DETRAY_BUILD_TESTING )
8888
detray_test_public_headers( detray_core_smatrix
8989
${_detray_core_public_headers} )
9090
endif()
91-
if( DETRAY_VC_PLUGIN )
92-
detray_test_public_headers( detray_core_vc
91+
if( DETRAY_VC_AOS_PLUGIN )
92+
detray_test_public_headers( detray_core_vc_aos
9393
${_detray_core_public_headers} )
9494
endif()
9595
endif()

core/include/detray/definitions/detail/algebra.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "detray/plugins/algebra/eigen_definitions.hpp"
1414
#elif DETRAY_ALGEBRA_SMATRIX
1515
#include "detray/plugins/algebra/smatrix_definitions.hpp"
16-
#elif DETRAY_ALGEBRA_VC
17-
#include "detray/plugins/algebra/vc_array_definitions.hpp"
16+
#elif DETRAY_ALGEBRA_VC_AOS
17+
#include "detray/plugins/algebra/vc_aos_definitions.hpp"
1818
#elif DETRAY_ALGEBRA_VC_SOA
1919
#include "detray/plugins/algebra/vc_soa_definitions.hpp"
2020
#else

extern/algebra-plugins/CMakeLists.txt

+14-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ FetchContent_Declare(AlgebraPlugins ${DETRAY_ALGEBRA_PLUGINS_SOURCE_FULL})
3535
# Options used in the build of Algebra Plugins.
3636
set(ALGEBRA_PLUGINS_BUILD_TESTING FALSE CACHE BOOL
3737
"Turn off the build of the Algebra Plugins unit tests")
38+
set(ALGEBRA_PLUGINS_BUILD_BENCHMARKS FALSE CACHE BOOL
39+
"Turn off the build of the Algebra Plugins benchmarks")
3840
set(ALGEBRA_PLUGINS_INCLUDE_EIGEN ${DETRAY_EIGEN_PLUGIN} CACHE BOOL
3941
"Turn on the build of algebra::eigen")
40-
set(ALGEBRA_PLUGINS_INCLUDE_VC ${DETRAY_VC_PLUGIN} CACHE BOOL
41-
"Turn on the build of algebra::vc_array")
42+
set(ALGEBRA_PLUGINS_INCLUDE_VC ${DETRAY_VC_AOS_PLUGIN} CACHE BOOL
43+
"Turn on the build of algebra::vc_aos")
4244
set(ALGEBRA_PLUGINS_INCLUDE_VECMEM TRUE CACHE BOOL
4345
"Turn on the build of algebra::vecmem_array")
4446

@@ -51,14 +53,22 @@ set(ALGEBRA_PLUGINS_SETUP_EIGEN3 ${DETRAY_EIGEN_PLUGIN} CACHE BOOL
5153
"Have Algebra Plugins set up Eigen3 for itself")
5254
set(ALGEBRA_PLUGINS_USE_SYSTEM_EIGEN3 FALSE CACHE BOOL
5355
"Have Algebra Plugins pick up Eigen3 from the system")
54-
set(ALGEBRA_PLUGINS_SETUP_VC ${DETRAY_VC_PLUGIN} CACHE BOOL
55-
"Have Algebra Plugins set up Vc for itself")
56+
set(ALGEBRA_PLUGINS_SETUP_VC ${DETRAY_VC_AOS_PLUGIN} OR ${DETRAY_VC_SOA_PLUGIN}
57+
CACHE BOOL "Have Algebra Plugins set up Vc for itself")
5658
set(ALGEBRA_PLUGINS_USE_SYSTEM_VC FALSE CACHE BOOL
5759
"Have Algebra Plugins build Vc itself")
5860
set(ALGEBRA_PLUGINS_SETUP_VECMEM FALSE CACHE BOOL
5961
"Do not set up VecMem in Algebra Plugins")
6062
set(ALGEBRA_PLUGINS_SETUP_GOOGLETEST FALSE CACHE BOOL
6163
"Do not set up GoogleTest in Algebra Plugins")
6264

65+
# Disable a deprecation warning coming from the Vc build.
66+
include( CheckCXXCompilerFlag )
67+
check_cxx_compiler_flag( "-Wno-deprecated-enum-enum-conversion"
68+
DETRAY_HAS_NO_DEPRECATED_ENUM_ENUM_CONVERSION )
69+
if( DETRAY_HAS_NO_DEPRECATED_ENUM_ENUM_CONVERSION )
70+
DETRAY_add_flag( CMAKE_CXX_FLAGS "-Wno-deprecated-enum-enum-conversion" )
71+
endif()
72+
6373
# Get it into the current directory.
6474
FetchContent_MakeAvailable(AlgebraPlugins)

io/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ if( DETRAY_SMATRIX_PLUGIN )
4545
INTERFACE detray::io detray::algebra_smatrix )
4646
endif()
4747

48-
if( DETRAY_VC_PLUGIN )
49-
detray_add_library( detray_io_vc io_vc )
50-
target_link_libraries( detray_io_vc
51-
INTERFACE detray::io detray::algebra_vc )
48+
if( DETRAY_VC_AOS_PLUGIN )
49+
detray_add_library( detray_io_vc_aos io_vc_aos )
50+
target_link_libraries( detray_io_vc_aos
51+
INTERFACE detray::io detray::algebra_vc_aos )
5252
endif()
5353

5454
# Set up the csv data I/O library.
@@ -76,8 +76,8 @@ if( BUILD_TESTING AND DETRAY_BUILD_TESTING )
7676
detray_test_public_headers( detray_io_smatrix
7777
${_detray_io_public_headers} )
7878
endif()
79-
if( DETRAY_VC_PLUGIN )
80-
detray_test_public_headers( detray_io_vc
79+
if( DETRAY_VC_AOS_PLUGIN )
80+
detray_test_public_headers( detray_io_vc_aos
8181
${_detray_io_public_headers} )
8282
endif()
8383

plugins/algebra/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ endif()
1616
if( DETRAY_SMATRIX_PLUGIN )
1717
add_subdirectory( smatrix )
1818
endif()
19-
if( DETRAY_VC_PLUGIN )
20-
add_subdirectory( vc )
19+
if( DETRAY_VC_AOS_PLUGIN )
20+
add_subdirectory( vc_aos )
2121
endif()
2222
if( DETRAY_VC_SOA_PLUGIN )
2323
add_subdirectory( vc_soa )

plugins/algebra/eigen/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Detray 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-2024 CERN for the benefit of the ACTS project
44
#
55
# Mozilla Public License Version 2.0
66

7+
message( STATUS "Building the 'detray::algebra_eigen' plugin" )
8+
79
# A sanity check.
810
if( NOT ALGEBRA_PLUGINS_INCLUDE_EIGEN )
911
message( WARNING "Eigen not available from Algebra Plugins. "

plugins/algebra/smatrix/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Detray 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-2024 CERN for the benefit of the ACTS project
44
#
55
# Mozilla Public License Version 2.0
66

7+
message( STATUS "Building the 'detray::algebra_smatrix' plugin" )
8+
79
# A sanity check.
810
if( NOT ALGEBRA_PLUGINS_INCLUDE_SMATRIX )
911
message( WARNING "SMatrix not available from Algebra Plugins. "

plugins/algebra/vc/CMakeLists.txt

-24
This file was deleted.

plugins/algebra/vc_aos/CMakeLists.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Detray library, part of the ACTS project (R&D line)
2+
#
3+
# (c) 2021-2024 CERN for the benefit of the ACTS project
4+
#
5+
# Mozilla Public License Version 2.0
6+
7+
message( STATUS "Building the 'detray::algebra_vc_aos' plugin" )
8+
9+
# A sanity check.
10+
if( NOT ALGEBRA_PLUGINS_INCLUDE_VC )
11+
message( WARNING "Vc not available from Algebra Plugins. "
12+
"The configuration will likely fail." )
13+
endif()
14+
15+
# Set up the library.
16+
detray_add_library( detray_algebra_vc_aos algebra_vc_aos
17+
"include/detray/plugins/algebra/vc_aos_definitions.hpp" )
18+
target_link_libraries( detray_algebra_vc_aos
19+
INTERFACE algebra::vc_cmath vecmem::core )
20+
target_compile_definitions( detray_algebra_vc_aos
21+
INTERFACE DETRAY_CUSTOM_SCALARTYPE=${DETRAY_CUSTOM_SCALARTYPE}
22+
DETRAY_ALGEBRA_VC_AOS )
23+
24+
# Set up tests for the public header(s) of detray::algebra_vc_aos.
25+
detray_test_public_headers( detray_algebra_vc_aos
26+
"detray/plugins/algebra/vc_aos_definitions.hpp" )

plugins/algebra/vc_soa/CMakeLists.txt

+2
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 'detray::algebra_vc_soa' plugin" )
8+
79
# A sanity check.
810
if( NOT ALGEBRA_PLUGINS_INCLUDE_VC )
911
message( WARNING "Vc not available from Algebra Plugins. "

tests/benchmarks/cpu/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ if( DETRAY_SMATRIX_PLUGIN )
6161
endif()
6262

6363
# Build the Vc benchmark executable.
64-
if( DETRAY_VC_PLUGIN )
65-
detray_add_cpu_benchmark( vc )
64+
if( DETRAY_VC_AOS_PLUGIN )
65+
detray_add_cpu_benchmark( vc_aos )
6666
endif()
6767

6868
if( DETRAY_VC_SOA_PLUGIN )
6969

7070
macro( detray_add_soa_benchmark algebra )
7171
# Build the benchmark executable.
72-
detray_add_executable( benchmark_soa_${algebra}
72+
detray_add_executable( benchmark_cpu_vc_soa_vs_${algebra}
7373
"intersectors.cpp"
7474
LINK_LIBRARIES benchmark::benchmark benchmark::benchmark_main vecmem::core detray::core_vc_soa detray::core_${algebra}
7575
detray::test_utils )

tests/include/detray/test/utils/types.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static constexpr char filenames[] = "array-";
2929
static constexpr char filenames[] = "eigen-";
3030
#elif DETRAY_ALGEBRA_SMATRIX
3131
static constexpr char filenames[] = "smatrix-";
32-
#elif DETRAY_ALGEBRA_VC
32+
#elif DETRAY_ALGEBRA_VC_AOS
3333
static constexpr char filenames[] = "vc-";
3434
#endif
3535

tests/integration_tests/cpu/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ if( DETRAY_SMATRIX_PLUGIN )
3737
detray_add_cpu_test( smatrix )
3838
endif()
3939

40-
# Build the Vc tests.
41-
if( DETRAY_VC_PLUGIN )
42-
detray_add_cpu_test( vc )
40+
# Build the Vc AoS tests.
41+
if( DETRAY_VC_AOS_PLUGIN )
42+
detray_add_cpu_test( vc_aos )
4343
endif()
4444

4545
# Detector navigation tests

tests/unit_tests/cpu/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ if(DETRAY_SMATRIX_PLUGIN)
114114
detray_add_cpu_test(smatrix)
115115
endif()
116116

117-
# Build the Vc tests.
118-
if(DETRAY_VC_PLUGIN)
119-
detray_add_cpu_test(vc)
117+
# Build the Vc AoS tests.
118+
if(DETRAY_VC_AOS_PLUGIN)
119+
detray_add_cpu_test(vc_aos)
120120
endif()

0 commit comments

Comments
 (0)