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
5
// Local include(s).
6
#include "
CUDAClusterizationAlgProviderTool.h
"
7
8
// Athena Acts include(s).
9
#include "
ActsInterop/Logger.h
"
10
11
// Traccc include(s).
12
#include "traccc/cuda/clusterization/clusterization_algorithm.hpp"
13
#include "traccc/cuda/clusterization/measurement_sorting_algorithm.hpp"
14
15
namespace
ActsTrk
{
16
17
StatusCode
CUDAClusterizationAlgProviderTool::initialize
()
18
{
19
ATH_MSG_DEBUG
(
"Initializing."
);
20
21
ATH_CHECK
(
m_MRs
.retrieve());
22
ATH_CHECK
(
m_copy
.retrieve());
23
ATH_CHECK
(
m_streamTool
.retrieve());
24
25
m_clusteringConfig
.sort_cells =
m_sortCells
;
26
27
ATH_MSG_DEBUG
(
"Successfully initialized"
);
28
return
StatusCode::SUCCESS;
29
}
30
31
DeviceAlgorithmT<traccc::device::clusterization_algorithm>
32
CUDAClusterizationAlgProviderTool::getClusterizationAlgorithm
(
const
EventContext& ctx)
const
33
{
34
35
ATH_MSG_VERBOSE
(
"Constructing CUDA traccc clusterization algorithm"
);
36
auto
copy =
m_copy
->copy(ctx);
37
38
return
{copy, std::make_shared<traccc::cuda::clusterization_algorithm>(
39
traccc::memory_resource{
m_MRs
->mainMR(),
m_MRs
->hostMR()},
40
*copy,
41
traccc::cuda::stream_wrapper{
m_streamTool
->stream(ctx)},
42
m_clusteringConfig
,
43
makeActsAthenaLogger
(
this
,
"TracccClusterizationCUDA"
))};
44
45
}
46
47
DeviceAlgorithmT<IDeviceClusterizationAlgProviderTool::sorting_algorithm_type>
48
CUDAClusterizationAlgProviderTool::getSortingAlgorithm
(
const
EventContext& ctx)
const
49
{
50
51
ATH_MSG_VERBOSE
(
"Constructing CUDA traccc measurement sorting algorithm"
);
52
auto
copy =
m_copy
->copy(ctx);
53
54
return
{copy, std::make_shared<traccc::cuda::measurement_sorting_algorithm>(
55
traccc::memory_resource{
m_MRs
->mainMR(),
m_MRs
->hostMR()},
56
*copy,
57
traccc::cuda::stream_wrapper{
m_streamTool
->stream(ctx)},
58
makeActsAthenaLogger
(
this
,
"TracccMeasurementSortingCUDA"
))};
59
60
}
61
62
}
// namespace ActsTrk
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x,...)
Definition
AthMsgStreamMacros.h:42
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::getSortingAlgorithm
virtual DeviceAlgorithmT< 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:48
ActsTrk::CUDAClusterizationAlgProviderTool::m_clusteringConfig
traccc::clustering_config m_clusteringConfig
Definition
CUDAClusterizationAlgProviderTool.h:53
ActsTrk::CUDAClusterizationAlgProviderTool::initialize
virtual StatusCode initialize() override
Function initializing the algorithm.
Definition
CUDAClusterizationAlgProviderTool.cxx:17
ActsTrk::CUDAClusterizationAlgProviderTool::getClusterizationAlgorithm
virtual DeviceAlgorithmT< traccc::device::clusterization_algorithm > getClusterizationAlgorithm(const EventContext &ctx) const override
Function constructing the traccc cuda clusterization algorithm.
Definition
CUDAClusterizationAlgProviderTool.cxx:32
ActsTrk::CUDAClusterizationAlgProviderTool::m_streamTool
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Definition
CUDAClusterizationAlgProviderTool.h:69
ActsTrk::CUDAClusterizationAlgProviderTool::m_sortCells
Gaudi::Property< bool > m_sortCells
Definition
CUDAClusterizationAlgProviderTool.h:56
ActsTrk::CUDAClusterizationAlgProviderTool::m_copy
ToolHandle< AthDevice::ICopyTool > m_copy
Definition
CUDAClusterizationAlgProviderTool.h:66
ActsTrk::CUDAClusterizationAlgProviderTool::m_MRs
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
Definition
CUDAClusterizationAlgProviderTool.h:61
ActsTrk::DeviceAlgorithmT
Convenience type for the "algorithm provider" tools.
Definition
DeviceAlgorithmT.h:15
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