Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Info.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Info.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 // System include(s).
12 #include <iosfwd>
13 #include <string>
14 #include <vector>
15 
16 namespace Acts {
17 namespace Cuda {
18 
23 class Info {
24  public:
27 
29  Info(const Info&) = delete;
31  Info(Info&&) = delete;
32 
34  Info& operator=(const Info&) = delete;
36  Info& operator=(Info&&) = delete;
37 
39 
41  static Info& instance();
42 
44  struct Device {
46  int id = -1;
52  bool concurrentKernels = false;
54  std::size_t totalMemory = 0;
55  }; // struct Device
56 
58  const std::vector<Device>& devices() const;
59 
60  private:
62  Info();
63 
65  std::vector<Device> m_devices;
66 
67 }; // class Info
68 
70 std::ostream& operator<<(std::ostream& out, const Info::Device& device);
71 
72 } // namespace Cuda
73 } // namespace Acts