ATLAS Offline Software
Loading...
Searching...
No Matches
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
6#define ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
7
8// Framework include(s).
10#include "GaudiKernel/ToolHandle.h"
13
14// Device include(s).
18
19// xAOD include(s).
21
22// Traccc include(s).
23#include <traccc/edm/track_collection.hpp>
24
25// CUDA include(s).
26#include <cuda_runtime_api.h>
27
28namespace AthCUDAExamples {
29
40
41 public:
42 // Inherit the base class's constructor(s).
43 using AthReentrantAlgorithm::AthReentrantAlgorithm;
44
47
49 virtual StatusCode initialize() override;
50
52 virtual StatusCode execute(const EventContext& ctx) const override;
53
55
56 private:
59
62 this, "InputContainer", "InDetTrackParticles",
63 "The input track particle container"};
64
66 this, "OutputContainer", "CalibratedInDetTrackParticles",
67 "The output track particle container"};
68
70 ToolHandle<AthDevice::IMemoryResourcesTool> m_mrTool{
71 this, "MemoryResourcesTool", "",
72 "Tool providing the memory resource(s) to use"};
73
75 ToolHandle<AthDevice::ICopyTool> m_hostCopyTool{this, "HostCopyTool", "",
76 "The host copy tool to use"};
77
78 ToolHandle<AthDevice::ICopyTool> m_deviceCopyTool{
79 this, "DeviceCopyTool", "", "The device copy tool to use"};
80
82 ToolHandle<AthCUDA::IStreamTool> m_streamTool{this, "StreamTool", "",
83 "The stream tool to use"};
84
86
87}; // class LinearTransformTaskExampleAlg
88
90StatusCode calibrateOnGPU(
91 cudaStream_t stream,
92 const traccc::edm::track_collection<traccc::default_algebra>::const_view&
93 input,
94 traccc::edm::track_collection<traccc::default_algebra>::view& output);
95
96} // namespace AthCUDAExamples
97
98#endif // ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Example algorithm performing "track particle calibration".
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
ToolHandle< AthDevice::ICopyTool > m_deviceCopyTool
Device copy tool to use.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputKey
The input container.
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrTool
Host memory resource tool to use.
ToolHandle< AthDevice::ICopyTool > m_hostCopyTool
Host copy tool to use.
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outputKey
The output container.
virtual StatusCode initialize() override
Function initialising the algorithm.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
StatusCode calibrateOnGPU(cudaStream_t stream, const traccc::edm::track_collection< traccc::default_algebra >::const_view &input, traccc::edm::track_collection< traccc::default_algebra >::view &output)
Perform the transformation on an NVIDIA GPU.