\doxysection{device.\+hpp}
\hypertarget{device_8hpp_source}{}\label{device_8hpp_source}\index{ginkgo/core/base/device.hpp@{ginkgo/core/base/device.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2024\ The\ Ginkgo\ authors}}
\DoxyCodeLine{00002\ \textcolor{comment}{//}}
\DoxyCodeLine{00003\ \textcolor{comment}{//\ SPDX-\/License-\/Identifier:\ BSD-\/3-\/Clause}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ GKO\_PUBLIC\_CORE\_BASE\_DEVICE\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_BASE\_DEVICE\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <array>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <cstdint>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <mutex>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <type\_traits>}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/config.hpp>}}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1CudaExecutor}{CudaExecutor}};}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1HipExecutor}{HipExecutor}};}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00029\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1nvidia__device}{nvidia\_device}}\ \{}
\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }CudaExecutor;}
\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }HipExecutor;}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{static}\ std::mutex\&\ get\_mutex(\textcolor{keywordtype}{int}\ i);}
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\&\ get\_num\_execs(\textcolor{keywordtype}{int}\ i);}
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{int}\ max\_devices\ =\ 64;}
\DoxyCodeLine{00053\ \};}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00060\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1amd__device}{amd\_device}}\ \{}
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }HipExecutor;}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{static}\ std::mutex\&\ get\_mutex(\textcolor{keywordtype}{int}\ i);}
\DoxyCodeLine{00072\ }
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\&\ get\_num\_execs(\textcolor{keywordtype}{int}\ i);}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{int}\ max\_devices\ =\ 64;}
\DoxyCodeLine{00083\ \};}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00087\ }
\DoxyCodeLine{00088\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_BASE\_DEVICE\_HPP\_}}

\end{DoxyCode}
