Ginkgo Generated from branch based on main. Ginkgo version 1.10.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#include <ginkgo/config.hpp>
15
16
17namespace gko {
18
19
20class CudaExecutor;
21
22class HipExecutor;
23
24
30 friend class CudaExecutor;
31 friend class HipExecutor;
32
33private:
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
61 friend class HipExecutor;
62
63private:
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_
This is the Executor subclass which represents the CUDA device.
Definition executor.hpp:1542
This is the Executor subclass which represents the HIP enhanced device.
Definition executor.hpp:1779
amd_device handles the number of executor on Amd devices and have the corresponding recursive_mutex.
Definition device.hpp:60
nvidia_device handles the number of executor on Nvidia devices and have the corresponding recursive_m...
Definition device.hpp:29
The Ginkgo namespace.
Definition abstract_factory.hpp:20