ginkgo/core/base/device.hpp Source File

ginkgo/core/base/device.hpp Source File#

Reference API: ginkgo/core/base/device.hpp Source File
Reference API
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_
Definition executor.hpp:1542
Definition executor.hpp:1779
Definition device.hpp:60
Definition device.hpp:29
The Ginkgo namespace.
Definition abstract_factory.hpp:20