vecmem 1.14.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
select_device.hpp
1/*
2 * VecMem project, part of the ACTS project (R&D line)
3 *
4 * (c) 2021-2022 CERN for the benefit of the ACTS project
5 *
6 * Mozilla Public License Version 2.0
7 */
8
9#pragma once
10
11namespace vecmem::cuda::details {
27public:
35
41
45 int device() const;
46
47private:
52 int m_device;
53};
54} // namespace vecmem::cuda::details
Class with RAII mechanism for selecting a CUDA device.
Definition select_device.hpp:26
~select_device()
Deconstructs the object, returning to the device that was selected before constructing this object.
Definition select_device.cpp:24
int device() const
Identifier for the device being seleced.
Definition select_device.cpp:32