ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsGPUDataPreparation
src
cuda
CUDAClusterizationAlgProviderTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
CUDAClusterizationAlgProviderTool.h
"
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
12
namespace
ActsTrk
{
13
14
StatusCode
CUDAClusterizationAlgProviderTool::initialize
()
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
22
m_clusteringConfig
.sort_cells =
m_sortCells
;
23
24
ATH_MSG_DEBUG
(
"Successfully initialized"
);
25
return
StatusCode::SUCCESS;
26
}
27
28
std::pair<std::shared_ptr<const vecmem::copy>, std::shared_ptr<const traccc::device::clusterization_algorithm>>
29
CUDAClusterizationAlgProviderTool::getClusterizationAlgorithm
(
const
EventContext& ctx)
const
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)},
40
m_clusteringConfig
,
41
makeActsAthenaLogger
(
this
,
"TracccClusterizationCUDA"
)));
42
43
}
44
45
std::pair<std::shared_ptr<const vecmem::copy>, std::shared_ptr<const IDeviceClusterizationAlgProviderTool::sorting_algorithm_type>>
46
CUDAClusterizationAlgProviderTool::getSortingAlgorithm
(
const
EventContext& ctx)
const
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
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CUDAClusterizationAlgProviderTool.h
Logger.h
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition
Logger.cxx:64
ActsTrk::CUDAClusterizationAlgProviderTool::m_clusteringConfig
traccc::clustering_config m_clusteringConfig
Definition
CUDAClusterizationAlgProviderTool.h:56
ActsTrk::CUDAClusterizationAlgProviderTool::initialize
virtual StatusCode initialize() override
Function initializing the algorithm.
Definition
CUDAClusterizationAlgProviderTool.cxx:14
ActsTrk::CUDAClusterizationAlgProviderTool::getClusterizationAlgorithm
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.
Definition
CUDAClusterizationAlgProviderTool.cxx:29
ActsTrk::CUDAClusterizationAlgProviderTool::getSortingAlgorithm
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...
Definition
CUDAClusterizationAlgProviderTool.cxx:46
ActsTrk::CUDAClusterizationAlgProviderTool::m_streamTool
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Definition
CUDAClusterizationAlgProviderTool.h:70
ActsTrk::CUDAClusterizationAlgProviderTool::m_sortCells
Gaudi::Property< bool > m_sortCells
Definition
CUDAClusterizationAlgProviderTool.h:59
ActsTrk::CUDAClusterizationAlgProviderTool::m_copy
ToolHandle< AthDevice::ICopyTool > m_copy
Definition
CUDAClusterizationAlgProviderTool.h:67
ActsTrk::CUDAClusterizationAlgProviderTool::m_MRs
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
Definition
CUDAClusterizationAlgProviderTool.h:62
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
Generated on
for ATLAS Offline Software by
1.17.0