ATLAS Offline Software
Loading...
Searching...
No Matches
CUDASeedingAlgProviderTool.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/cuda/seeding/triplet_seeding_algorithm.hpp"
7#include "traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp"
8
10
11namespace ActsTrk {
12
14{
15 ATH_MSG_DEBUG("Initializing.");
16
17 ATH_CHECK(m_MRs.retrieve());
18 ATH_CHECK(m_copy.retrieve());
19 ATH_CHECK(m_streamTool.retrieve());
20
21 ATH_MSG_DEBUG("Successfully initialized");
22 return StatusCode::SUCCESS;
23}
24
25std::pair<std::shared_ptr<const vecmem::copy>, std::shared_ptr<const traccc::device::triplet_seeding_algorithm>>
26CUDASeedingAlgProviderTool::getTripletSeedingAlgorithm(const EventContext& ctx, const traccc::seedfinder_config& seedfinder, const traccc::seedfilter_config& seedfilter) const
27{
28
29 ATH_MSG_VERBOSE("Constructing CUDA traccc pixel triplet seeding algorithm");
30 traccc::memory_resource mr{m_MRs->mainMR(), m_MRs->hostMR()};
31 auto copy = m_copy->copy(ctx);
32
33 return std::make_pair(copy, std::make_shared<traccc::cuda::triplet_seeding_algorithm>(
34 seedfinder,
35 seedfinder,
36 seedfilter,
37 mr,
38 *copy,
39 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
40 makeActsAthenaLogger(this, "TracccSPFormationCUDA")));
41
42}
43
44std::pair<std::shared_ptr<const vecmem::copy>, std::shared_ptr<const traccc::device::gbts_seeding_algorithm>>
45CUDASeedingAlgProviderTool::getGBTSAlgorithm(const EventContext& ctx, const traccc::gbts_seedfinder_config& gbts_config) const
46{
47
48 ATH_MSG_VERBOSE("Constructing CUDA traccc pixel GBTS seeding algorithm");
49 traccc::memory_resource mr{m_MRs->mainMR(), m_MRs->hostMR()};
50 auto copy = m_copy->copy(ctx);
51
52 return std::make_pair(copy, std::make_shared<traccc::cuda::gbts_seeding_algorithm>(
53 gbts_config,
54 mr,
55 *copy,
56 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
57 makeActsAthenaLogger(this, "TracccGBTSSeedingCUDA")));
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)
Definition Logger.cxx:64
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::gbts_seeding_algorithm > > getGBTSAlgorithm(const EventContext &ctx, const traccc::gbts_seedfinder_config &gbts_config) const override
virtual StatusCode initialize() override
Function initializing the algorithm.
ToolHandle< AthCUDA::IStreamTool > m_streamTool
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::triplet_seeding_algorithm > > getTripletSeedingAlgorithm(const EventContext &ctx, const traccc::seedfinder_config &seedfinder, const traccc::seedfilter_config &seedfilter) const override
Function constructing the traccc cuda seeding algorithm.
ToolHandle< AthDevice::ICopyTool > m_copy
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...