Ginkgo  Generated from pipelines/1589998975 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
device.hpp
1 // SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef GKO_PUBLIC_CORE_BASE_DEVICE_HPP_
6 #define GKO_PUBLIC_CORE_BASE_DEVICE_HPP_
7 
8 
9 #include <array>
10 #include <cstdint>
11 #include <mutex>
12 #include <type_traits>
13 
14 #include <ginkgo/config.hpp>
15 
16 
17 namespace gko {
18 
19 
20 class CudaExecutor;
21 
22 class HipExecutor;
23 
24 
30  friend class CudaExecutor;
31  friend class HipExecutor;
32 
33 private:
41  static std::mutex& get_mutex(int i);
42 
50  static int& get_num_execs(int i);
51 
52  static constexpr int max_devices = 64;
53 };
54 
55 
60 class amd_device {
61  friend class HipExecutor;
62 
63 private:
71  static std::mutex& get_mutex(int i);
72 
80  static int& get_num_execs(int i);
81 
82  static constexpr int max_devices = 64;
83 };
84 
85 
86 } // namespace gko
87 
88 #endif // GKO_PUBLIC_CORE_BASE_DEVICE_HPP_
gko::nvidia_device
nvidia_device handles the number of executor on Nvidia devices and have the corresponding recursive_m...
Definition: device.hpp:29
gko::HipExecutor
This is the Executor subclass which represents the HIP enhanced device.
Definition: executor.hpp:1777
gko::CudaExecutor
This is the Executor subclass which represents the CUDA device.
Definition: executor.hpp:1540
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
gko::amd_device
amd_device handles the number of executor on Amd devices and have the corresponding recursive_mutex.
Definition: device.hpp:60