Ginkgo Generated from branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
Loading...
Searching...
No Matches
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
15#include <ginkgo/config.hpp>
16
17
18namespace gko {
19
20
21class CudaExecutor;
22
23class HipExecutor;
24
25
31 friend class CudaExecutor;
32 friend class HipExecutor;
33
34private:
42 static std::mutex& get_mutex(int i);
43
51 static int& get_num_execs(int i);
52
53 static constexpr int max_devices = 64;
54};
55
56
62 friend class HipExecutor;
63
64private:
72 static std::mutex& get_mutex(int i);
73
81 static int& get_num_execs(int i);
82
83 static constexpr int max_devices = 64;
84};
85
86
87} // namespace gko
88
89#endif // GKO_PUBLIC_CORE_BASE_DEVICE_HPP_
This is the Executor subclass which represents the CUDA device.
Definition executor.hpp:1485
This is the Executor subclass which represents the HIP enhanced device.
Definition executor.hpp:1703
amd_device handles the number of executor on Amd devices and have the corresponding recursive_mutex.
Definition device.hpp:61
nvidia_device handles the number of executor on Nvidia devices and have the corresponding recursive_m...
Definition device.hpp:30
The Ginkgo namespace.
Definition abstract_factory.hpp:20