From f0294bd49b3731a5c9771ba9941c8a9113da3c85 Mon Sep 17 00:00:00 2001 From: Carlo Varni <75478407+CarloVarni@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:29:41 +0100 Subject: [PATCH] refactor!: template the seed finder on the grid type (#2957) Make the seed finder templated on the grid type so that we can use any kind of grid on it --- Core/include/Acts/Seeding/SeedFinder.hpp | 13 ++++----- Core/include/Acts/Seeding/SeedFinder.ipp | 28 +++++++++---------- .../TrackFinding/SeedingAlgorithm.hpp | 4 ++- .../TrackFinding/src/SeedingAlgorithm.cpp | 5 +++- .../UnitTests/Core/Seeding/SeedFinderTest.cpp | 6 ++-- .../Cuda/Seeding/SeedFinderCudaTest.cpp | 3 +- .../UnitTests/Plugins/Cuda/Seeding2/main.cpp | 4 ++- .../Sycl/Seeding/SeedFinderSyclTest.cpp | 3 +- 8 files changed, 38 insertions(+), 28 deletions(-) diff --git a/Core/include/Acts/Seeding/SeedFinder.hpp b/Core/include/Acts/Seeding/SeedFinder.hpp index 95220477490..e25d1263111 100644 --- a/Core/include/Acts/Seeding/SeedFinder.hpp +++ b/Core/include/Acts/Seeding/SeedFinder.hpp @@ -18,8 +18,6 @@ #include "Acts/Seeding/SeedFilter.hpp" #include "Acts/Seeding/SeedFinderConfig.hpp" #include "Acts/Seeding/SeedFinderUtils.hpp" -#include "Acts/Seeding/SpacePointGrid.hpp" -#include "Acts/Utilities/detail/grid_helper.hpp" #include #include @@ -37,12 +35,12 @@ enum class SpacePointCandidateType : short { eBottom, eTop }; enum class DetectorMeasurementInfo : short { eDefault, eDetailed }; -template +template class SeedFinder { /////////////////////////////////////////////////////////////////// // Public methods: /////////////////////////////////////////////////////////////////// - using grid_t = Acts::CylindricalSpacePointGrid; public: struct SeedingState { @@ -83,9 +81,10 @@ class SeedFinder { /** @name Disallow default instantiation, copy, assignment */ //@{ SeedFinder() = default; - SeedFinder(const SeedFinder&) = delete; - SeedFinder& operator=( - const SeedFinder&) = default; + SeedFinder(const SeedFinder&) = + delete; + SeedFinder& operator=( + const SeedFinder&) = default; //@} /// Create all seeds from the space points in the three iterators. diff --git a/Core/include/Acts/Seeding/SeedFinder.ipp b/Core/include/Acts/Seeding/SeedFinder.ipp index b29c4336598..3fcd0542583 100644 --- a/Core/include/Acts/Seeding/SeedFinder.ipp +++ b/Core/include/Acts/Seeding/SeedFinder.ipp @@ -13,8 +13,8 @@ namespace Acts { -template -SeedFinder::SeedFinder( +template +SeedFinder::SeedFinder( const Acts::SeedFinderConfig& config) : m_config(config) { if (!config.isInInternalUnits) { @@ -35,9 +35,9 @@ SeedFinder::SeedFinder( } } -template +template template