ATLAS Offline Software
Loading...
Searching...
No Matches
DeviceAlgorithmT.h
Go to the documentation of this file.
1// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2#ifndef ACTSGPUINTERFACES_DEVICEALGORITHMT_H
3#define ACTSGPUINTERFACES_DEVICEALGORITHMT_H
4
5// VecMem include(s).
6#include <vecmem/utils/copy.hpp>
7
8// System include(s).
9#include <memory>
10
11namespace ActsTrk {
12
14template <typename ALGORITHM_TYPE>
16
17 public:
19 using algorithm_type = ALGORITHM_TYPE;
20
22 DeviceAlgorithmT(std::shared_ptr<const vecmem::copy> copy,
23 std::shared_ptr<const algorithm_type> algorithm)
24 : m_copy(std::move(copy)), m_algorithm(std::move(algorithm)) {}
25
29
34
36 const vecmem::copy& copy() const { return *m_copy; }
37
39 const algorithm_type& algorithm() const { return *m_algorithm; }
40
42 const algorithm_type& operator*() const { return *m_algorithm; }
44 const algorithm_type* operator->() const { return m_algorithm.get(); }
45
46 private:
48 std::shared_ptr<const vecmem::copy> m_copy;
50 std::shared_ptr<const algorithm_type> m_algorithm;
51
52}; // class DeviceAlgorithmT
53
54} // namespace ActsTrk
55
56#endif // ACTSGPUINTERFACES_DEVICEALGORITHMT_H
DeviceAlgorithmT(const DeviceAlgorithmT &)=default
Copy constructor.
DeviceAlgorithmT & operator=(const DeviceAlgorithmT &)=default
Copy assignment operator.
DeviceAlgorithmT(std::shared_ptr< const vecmem::copy > copy, std::shared_ptr< const algorithm_type > algorithm)
Constructor with the algorithm and the copy object that it uses.
const algorithm_type * operator->() const
Access the algorithm with a "pointer formalism".
const algorithm_type & algorithm() const
Get the algorithm itself.
const vecmem::copy & copy() const
Get the copy object that the algorithm uses.
DeviceAlgorithmT & operator=(DeviceAlgorithmT &&)=default
Move assignment operator.
std::shared_ptr< const vecmem::copy > m_copy
The copy object that the algorithm uses.
DeviceAlgorithmT(DeviceAlgorithmT &&)=default
Move constructor.
std::shared_ptr< const algorithm_type > m_algorithm
The algorithm itself.
const algorithm_type & operator*() const
Access the algorithm with a "pointer dereferencing formalism".
ALGORITHM_TYPE algorithm_type
Type of the held algorithm.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
STL namespace.