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

Tool providing HIP-based traccc spacepoint formation algorithm. More...

#include <HIPSPFormationAlgProviderTool.h>

Inheritance diagram for ActsTrk::HIPSPFormationAlgProviderTool:
Collaboration diagram for ActsTrk::HIPSPFormationAlgProviderTool:

Public Member Functions

virtual StatusCode initialize () override
 Function initializing the algorithm.
virtual DeviceAlgorithmT< traccc::device::silicon_pixel_spacepoint_formation_algorithm > getAlgorithm (const EventContext &ctx) const override
 Function constructing the traccc hip clusterization algorithm.

Private Attributes

The host and device memory resources tool to use for memory

allocations

ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
The device copy tool to use
ToolHandle< AthDevice::ICopyTool > m_copy
The hip stream provider tool
ToolHandle< AthHIP::IStreamTool > m_streamTool

Detailed Description

Tool providing HIP-based traccc spacepoint formation algorithm.

This tool constructs the traccc device spacepoint formation algorithm, configured to run on with HIP backend. It relies on separate tools to provide the host/device memory resources and the vecmem copy object.

Currently only pixel spacepoint formation is implemented in Traccc

Definition at line 31 of file HIPSPFormationAlgProviderTool.h.

Member Function Documentation

◆ getAlgorithm()

DeviceAlgorithmT< traccc::device::silicon_pixel_spacepoint_formation_algorithm > ActsTrk::HIPSPFormationAlgProviderTool::getAlgorithm ( const EventContext & ctx) const
overridevirtual

Function constructing the traccc hip clusterization algorithm.

Returns
hip spacepoint formation algorithm and vecmem copy object

Definition at line 29 of file HIPSPFormationAlgProviderTool.cxx.

29 {
30
32 "Constructing HIP traccc pixel spacepoint formation algorithm");
33
34 auto copy = m_copy->copy(ctx);
35
36 return {copy,
37 std::make_shared<
38 traccc::hip::silicon_pixel_spacepoint_formation_algorithm>(
39 traccc::memory_resource{m_MRs->mainMR(), m_MRs->hostMR()}, *copy,
40 traccc::hip::stream_wrapper{m_streamTool->stream(ctx)},
41 makeActsAthenaLogger(this, "TracccSPFormationHIP"))};
42}
#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)
Definition Logger.cxx:64
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
bool copy
Definition calibdata.py:26

◆ initialize()

StatusCode ActsTrk::HIPSPFormationAlgProviderTool::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 16 of file HIPSPFormationAlgProviderTool.cxx.

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

Member Data Documentation

◆ m_copy

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

Definition at line 52 of file HIPSPFormationAlgProviderTool.h.

52 {this, "CopyProviderTool", "",
53 "Vecmem copy provider tool"};

◆ m_MRs

ToolHandle<AthDevice::IMemoryResourcesTool> ActsTrk::HIPSPFormationAlgProviderTool::m_MRs
private
Initial value:
{
this, "MemoryResourcesTool", "",
"The memory resources tool to use for allocating memory on the device"}

Definition at line 47 of file HIPSPFormationAlgProviderTool.h.

47 {
48 this, "MemoryResourcesTool", "",
49 "The memory resources tool to use for allocating memory on the device"};

◆ m_streamTool

ToolHandle<AthHIP::IStreamTool> ActsTrk::HIPSPFormationAlgProviderTool::m_streamTool
private
Initial value:
{this, "StreamTool", "",
"HIP stream provider tool"}

Definition at line 55 of file HIPSPFormationAlgProviderTool.h.

55 {this, "StreamTool", "",
56 "HIP stream provider tool"};

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