ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::CUDAClusterizationAlgProviderTool Class Reference

#include <CUDAClusterizationAlgProviderTool.h>

Inheritance diagram for ActsTrk::CUDAClusterizationAlgProviderTool:
Collaboration diagram for ActsTrk::CUDAClusterizationAlgProviderTool:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::clusterization_algorithm > > getClusterizationAlgorithm (const EventContext &ctx) const override
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const IDeviceClusterizationAlgProviderTool::sorting_algorithm_type > > getSortingAlgorithm (const EventContext &ctx) const override

Private Attributes

traccc::clustering_config m_clusteringConfig {}
ToolHandle< AthDevice::IMemoryResourceToolm_hostMR
ToolHandle< AthDevice::IMemoryResourceToolm_deviceMR
ToolHandle< AthDevice::ICopyToolm_copy
ToolHandle< AthCUDA::IStreamToolm_streamTool

Detailed Description

Definition at line 20 of file CUDAClusterizationAlgProviderTool.h.

Member Function Documentation

◆ finalize()

StatusCode ActsTrk::CUDAClusterizationAlgProviderTool::finalize ( )
overridevirtual

Definition at line 27 of file CUDAClusterizationAlgProviderTool.cxx.

28{
29 ATH_MSG_DEBUG("Finalizing.");
30 return StatusCode::SUCCESS;
31}
#define ATH_MSG_DEBUG(x)

◆ getClusterizationAlgorithm()

std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::clusterization_algorithm > > ActsTrk::CUDAClusterizationAlgProviderTool::getClusterizationAlgorithm ( const EventContext & ctx) const
overridevirtual

Definition at line 34 of file CUDAClusterizationAlgProviderTool.cxx.

35{
36
37 ATH_MSG_VERBOSE("Constructing CUDA traccc clusterization algorithm");
38 traccc::memory_resource mr{m_deviceMR->mr(), &m_hostMR->mr()};
39 auto copy = m_copy->copy(ctx);
40
41 return std::make_pair(copy, std::make_shared<traccc::cuda::clusterization_algorithm>(
42 mr,
43 *copy,
44 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
46 makeActsAthenaLogger(this, "TracccClusterizationCUDA")));
47
48}
#define ATH_MSG_VERBOSE(x)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
ToolHandle< AthDevice::IMemoryResourceTool > m_hostMR
ToolHandle< AthDevice::IMemoryResourceTool > m_deviceMR
bool copy
Definition calibdata.py:26

◆ getSortingAlgorithm()

std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const IDeviceClusterizationAlgProviderTool::sorting_algorithm_type > > ActsTrk::CUDAClusterizationAlgProviderTool::getSortingAlgorithm ( const EventContext & ctx) const
overridevirtual

Definition at line 51 of file CUDAClusterizationAlgProviderTool.cxx.

52{
53
54 ATH_MSG_VERBOSE("Constructing CUDA traccc measurement sorting algorithm");
55 traccc::memory_resource mr{m_deviceMR->mr(), &m_hostMR->mr()};
56 auto copy = m_copy->copy(ctx);
57
58 return std::make_pair(copy, std::make_shared<traccc::cuda::measurement_sorting_algorithm>(
59 mr,
60 *copy,
61 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
62 makeActsAthenaLogger(this, "TracccMeasurementSortingCUDA")));
63
64}

◆ initialize()

StatusCode ActsTrk::CUDAClusterizationAlgProviderTool::initialize ( )
overridevirtual

Definition at line 14 of file CUDAClusterizationAlgProviderTool.cxx.

15{
16 ATH_MSG_DEBUG("Initializing.");
17
18 ATH_CHECK(m_hostMR.retrieve());
19 ATH_CHECK(m_deviceMR.retrieve());
20 ATH_CHECK(m_copy.retrieve());
21 ATH_CHECK(m_streamTool.retrieve());
22
23 ATH_MSG_DEBUG("Successfully initialized");
24 return StatusCode::SUCCESS;
25}
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_clusteringConfig

traccc::clustering_config ActsTrk::CUDAClusterizationAlgProviderTool::m_clusteringConfig {}
private

Definition at line 36 of file CUDAClusterizationAlgProviderTool.h.

36{};

◆ m_copy

ToolHandle<AthDevice::ICopyTool> ActsTrk::CUDAClusterizationAlgProviderTool::m_copy
private
Initial value:
{
this, "CopyProviderTool", "", "Vecmem copy provider tool"}

Definition at line 42 of file CUDAClusterizationAlgProviderTool.h.

42 {
43 this, "CopyProviderTool", "", "Vecmem copy provider tool"};

◆ m_deviceMR

ToolHandle<AthDevice::IMemoryResourceTool> ActsTrk::CUDAClusterizationAlgProviderTool::m_deviceMR
private
Initial value:
{
this, "DeviceMR", "", "Device memory resource tool"}

Definition at line 40 of file CUDAClusterizationAlgProviderTool.h.

40 {
41 this, "DeviceMR", "", "Device memory resource tool"};

◆ m_hostMR

ToolHandle<AthDevice::IMemoryResourceTool> ActsTrk::CUDAClusterizationAlgProviderTool::m_hostMR
private
Initial value:
{
this, "HostMR", "", "Host memory resource tool"}

Definition at line 38 of file CUDAClusterizationAlgProviderTool.h.

38 {
39 this, "HostMR", "", "Host memory resource tool"};

◆ m_streamTool

ToolHandle<AthCUDA::IStreamTool> ActsTrk::CUDAClusterizationAlgProviderTool::m_streamTool
private
Initial value:
{
this, "StreamTool", "", "CUDA stream provider tool"}

Definition at line 44 of file CUDAClusterizationAlgProviderTool.h.

44 {
45 this, "StreamTool", "", "CUDA stream provider tool"};

The documentation for this class was generated from the following files: