ATLAS Offline Software
Loading...
Searching...
No Matches
CUDAClusterizationAlgProviderTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
5
6#include "traccc/clusterization/clusterization_algorithm.hpp"
7#include "traccc/cuda/clusterization/clusterization_algorithm.hpp"
8#include "traccc/cuda/clusterization/measurement_sorting_algorithm.hpp"
9
10#include "ActsInterop/Logger.h"
11
12namespace ActsTrk {
13
15{
16 ATH_MSG_DEBUG("Initializing.");
17
18 ATH_CHECK(m_MRs.retrieve());
19 ATH_CHECK(m_copy.retrieve());
20 ATH_CHECK(m_streamTool.retrieve());
21
23
24 ATH_MSG_DEBUG("Successfully initialized");
25 return StatusCode::SUCCESS;
26}
27
28std::pair<std::shared_ptr<const vecmem::copy>, std::shared_ptr<const traccc::device::clusterization_algorithm>>
30{
31
32 ATH_MSG_VERBOSE("Constructing CUDA traccc clusterization algorithm");
33 traccc::memory_resource mr{m_MRs->mainMR(), m_MRs->hostMR()};
34 auto copy = m_copy->copy(ctx);
35
36 return std::make_pair(copy, std::make_shared<traccc::cuda::clusterization_algorithm>(
37 mr,
38 *copy,
39 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
41 makeActsAthenaLogger(this, "TracccClusterizationCUDA")));
42
43}
44
45std::pair<std::shared_ptr<const vecmem::copy>, std::shared_ptr<const IDeviceClusterizationAlgProviderTool::sorting_algorithm_type>>
47{
48
49 ATH_MSG_VERBOSE("Constructing CUDA traccc measurement sorting algorithm");
50 traccc::memory_resource mr{m_MRs->mainMR(), m_MRs->hostMR()};
51 auto copy = m_copy->copy(ctx);
52
53 return std::make_pair(copy, std::make_shared<traccc::cuda::measurement_sorting_algorithm>(
54 mr,
55 *copy,
56 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
57 makeActsAthenaLogger(this, "TracccMeasurementSortingCUDA")));
58
59}
60
61} // namespace ActsTrk
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
virtual StatusCode initialize() override
Function initializing the algorithm.
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::clusterization_algorithm > > getClusterizationAlgorithm(const EventContext &ctx) const override
Function constructing the traccc cuda clusterization algorithm.
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const IDeviceClusterizationAlgProviderTool::sorting_algorithm_type > > getSortingAlgorithm(const EventContext &ctx) const override
Function constructing the traccc cuda measurement sorting algorithm Neccesary because the CKF require...
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...