\doxysection{executor.\+hpp}
\hypertarget{executor_8hpp_source}{}\label{executor_8hpp_source}\index{ginkgo/core/base/executor.hpp@{ginkgo/core/base/executor.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2025\ 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\_EXECUTOR\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_BASE\_EXECUTOR\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <array>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <atomic>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <iostream>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <memory>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <mutex>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <sstream>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <string>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <tuple>}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ <type\_traits>}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/device.hpp>}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/fwd\_decls.hpp>}}
\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/machine\_topology.hpp>}}
\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/memory.hpp>}}
\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/scoped\_device\_id\_guard.hpp>}}
\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#include\ <ginkgo/core/log/logger.hpp>}}
\DoxyCodeLine{00027\ \textcolor{preprocessor}{\#include\ <ginkgo/core/synthesizer/containers.hpp>}}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ }
\DoxyCodeLine{00030\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00034\ \textcolor{keyword}{enum\ class}\ \doxymbox{\hyperlink{namespacegko_aa2543f42cbbe1a9373dc46d04c112bee}{log\_propagation\_mode}}\ \{}
\DoxyCodeLine{00040\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_aa2543f42cbbe1a9373dc46d04c112beeac7561db7a418dd39b2201dfe110ab4a4}{never}},}
\DoxyCodeLine{00046\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_aa2543f42cbbe1a9373dc46d04c112beea2bd9c0ed00116be1258e0cc66617d7c8}{automatic}}}
\DoxyCodeLine{00047\ \};}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00062\ \textcolor{keyword}{enum\ class}\ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ \{\ device,\ unified\_global,\ unified\_host\ \};}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \textcolor{preprocessor}{\#ifdef\ NDEBUG}}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \textcolor{comment}{//\ When\ in\ release,\ prefer\ device\ allocations}}
\DoxyCodeLine{00068\ \textcolor{keyword}{constexpr}\ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ default\_cuda\_alloc\_mode\ =\ allocation\_mode::device;}
\DoxyCodeLine{00069\ }
\DoxyCodeLine{00070\ \textcolor{keyword}{constexpr}\ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ default\_hip\_alloc\_mode\ =\ allocation\_mode::device;}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \textcolor{comment}{//\ When\ in\ debug,\ always\ UM\ allocations.}}
\DoxyCodeLine{00075\ \textcolor{keyword}{constexpr}\ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ default\_cuda\_alloc\_mode\ =}
\DoxyCodeLine{00076\ \ \ \ \ allocation\_mode::unified\_global;}
\DoxyCodeLine{00077\ }
\DoxyCodeLine{00078\ \textcolor{preprocessor}{\#if\ (GINKGO\_HIP\_PLATFORM\_HCC\ ==\ 1)}}
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00080\ \textcolor{comment}{//\ HIP\ on\ AMD\ GPUs\ does\ not\ support\ UM,\ so\ always\ prefer\ device\ allocations.}}
\DoxyCodeLine{00081\ \textcolor{keyword}{constexpr}\ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ default\_hip\_alloc\_mode\ =\ allocation\_mode::device;}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ \textcolor{comment}{//\ HIP\ on\ NVIDIA\ GPUs\ supports\ UM,\ so\ prefer\ UM\ allocations.}}
\DoxyCodeLine{00086\ \textcolor{keyword}{constexpr}\ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ default\_hip\_alloc\_mode\ =}
\DoxyCodeLine{00087\ \ \ \ \ allocation\_mode::unified\_global;}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00093\ }
\DoxyCodeLine{00094\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00101\ \textcolor{keyword}{enum\ class}\ dpcpp\_queue\_property\ \{}
\DoxyCodeLine{00105\ \ \ \ \ in\_order\ =\ 1,}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00110\ \ \ \ \ enable\_profiling\ =\ 2}
\DoxyCodeLine{00111\ \};}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ GKO\_ATTRIBUTES\ GKO\_INLINE\ dpcpp\_queue\_property\ operator|(dpcpp\_queue\_property\ a,}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dpcpp\_queue\_property\ b)}
\DoxyCodeLine{00115\ \{}
\DoxyCodeLine{00116\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{static\_cast<}dpcpp\_queue\_property\textcolor{keyword}{>}(\textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{int}\textcolor{keyword}{>}(a)\ |}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{int}\textcolor{keyword}{>}(b));}
\DoxyCodeLine{00118\ \}}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00124\ \textcolor{preprocessor}{\#define\ GKO\_FORWARD\_DECLARE(\_type,\ ...)\ class\ \_type}}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_FORWARD\_DECLARE);}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00128\ \textcolor{preprocessor}{\#undef\ GKO\_FORWARD\_DECLARE}}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ }
\DoxyCodeLine{00131\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1ReferenceExecutor}{ReferenceExecutor}};}
\DoxyCodeLine{00132\ }
\DoxyCodeLine{00133\ }
\DoxyCodeLine{00134\ \textcolor{keyword}{namespace\ }detail\ \{}
\DoxyCodeLine{00135\ }
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00137\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}>}
\DoxyCodeLine{00138\ \textcolor{keyword}{class\ }ExecutorBase;}
\DoxyCodeLine{00139\ }
\DoxyCodeLine{00140\ }
\DoxyCodeLine{00141\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{00142\ }
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00258\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1Operation}{Operation}}\ \{}
\DoxyCodeLine{00259\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00260\ \textcolor{preprocessor}{\#define\ GKO\_DECLARE\_RUN\_OVERLOAD(\_type,\ ...)\ \(\backslash\)}}
\DoxyCodeLine{00261\ \textcolor{preprocessor}{\ \ \ \ virtual\ void\ run(std::shared\_ptr<const\ \_type>)\ const}}
\DoxyCodeLine{00262\ }
\DoxyCodeLine{00263\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_DECLARE\_RUN\_OVERLOAD);}
\DoxyCodeLine{00264\ }
\DoxyCodeLine{00265\ \textcolor{preprocessor}{\#undef\ GKO\_DECLARE\_RUN\_OVERLOAD}}
\DoxyCodeLine{00266\ }
\DoxyCodeLine{00267\ \ \ \ \ \textcolor{comment}{//\ ReferenceExecutor\ overload\ can\ be\ defaulted\ to\ OmpExecutor's}}
\DoxyCodeLine{00268\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ ReferenceExecutor>\ executor)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00269\ }
\DoxyCodeLine{00275\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \doxymbox{\hyperlink{classgko_1_1Operation_ada3255c1fbae4a203627c0affce1aa23}{get\_name}}()\ const\ noexcept;}
\DoxyCodeLine{00276\ \};}
\DoxyCodeLine{00277\ }
\DoxyCodeLine{00278\ }
\DoxyCodeLine{00279\ namespace\ detail\ \{}
\DoxyCodeLine{00280\ }
\DoxyCodeLine{00281\ }
\DoxyCodeLine{00291\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Closure>}
\DoxyCodeLine{00292\ \textcolor{keyword}{class\ }RegisteredOperation\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}}\ \{}
\DoxyCodeLine{00293\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00300\ \ \ \ \ RegisteredOperation(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ name,\ Closure\ op)}
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ :\ name\_(name),\ op\_(std::move(op))}
\DoxyCodeLine{00302\ \ \ \ \ \{\}}
\DoxyCodeLine{00303\ }
\DoxyCodeLine{00304\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \doxymbox{\hyperlink{classgko_1_1Operation_ada3255c1fbae4a203627c0affce1aa23}{get\_name}}()\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \textcolor{keyword}{override}\ \{\ \textcolor{keywordflow}{return}\ name\_;\ \}}
\DoxyCodeLine{00305\ }
\DoxyCodeLine{00306\ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ ReferenceExecutor>\ exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00307\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ op\_(exec);}
\DoxyCodeLine{00309\ \ \ \ \ \}}
\DoxyCodeLine{00310\ }
\DoxyCodeLine{00311\ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ OmpExecutor>\ exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00312\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00313\ \ \ \ \ \ \ \ \ op\_(exec);}
\DoxyCodeLine{00314\ \ \ \ \ \}}
\DoxyCodeLine{00315\ }
\DoxyCodeLine{00316\ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ CudaExecutor>\ exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00317\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ op\_(exec);}
\DoxyCodeLine{00319\ \ \ \ \ \}}
\DoxyCodeLine{00320\ }
\DoxyCodeLine{00321\ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ HipExecutor>\ exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00322\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ op\_(exec);}
\DoxyCodeLine{00324\ \ \ \ \ \}}
\DoxyCodeLine{00325\ }
\DoxyCodeLine{00326\ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ DpcppExecutor>\ exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00327\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00328\ \ \ \ \ \ \ \ \ op\_(exec);}
\DoxyCodeLine{00329\ \ \ \ \ \}}
\DoxyCodeLine{00330\ }
\DoxyCodeLine{00331\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00332\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ name\_;}
\DoxyCodeLine{00333\ \ \ \ \ Closure\ op\_;}
\DoxyCodeLine{00334\ \};}
\DoxyCodeLine{00335\ }
\DoxyCodeLine{00336\ }
\DoxyCodeLine{00337\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Closure>}
\DoxyCodeLine{00338\ RegisteredOperation<Closure>\ make\_register\_operation(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ name,}
\DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Closure\ op)}
\DoxyCodeLine{00340\ \{}
\DoxyCodeLine{00341\ \ \ \ \ \textcolor{keywordflow}{return}\ RegisteredOperation<Closure>\{name,\ std::move(op)\};}
\DoxyCodeLine{00342\ \}}
\DoxyCodeLine{00343\ }
\DoxyCodeLine{00344\ }
\DoxyCodeLine{00345\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{00346\ }
\DoxyCodeLine{00347\ }
\DoxyCodeLine{00419\ \textcolor{preprocessor}{\#define\ GKO\_REGISTER\_OPERATION(\_name,\ \_kernel)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00420\ \textcolor{preprocessor}{\ \ \ \ template\ <typename...\ Args>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00421\ \textcolor{preprocessor}{\ \ \ \ auto\ make\_\#\#\_name(Args\&\&...\ args)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00422\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00423\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ return\ ::gko::detail::make\_register\_operation(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00424\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \#\_kernel,\ [\&args...](auto\ exec)\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00425\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ using\ exec\_type\ =\ decltype(exec);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00426\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (std::is\_same<\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00427\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec\_type,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00428\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ ::gko::ReferenceExecutor>>::\ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00429\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value)\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00430\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::gko::kernels::reference::\_kernel(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00431\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::dynamic\_pointer\_cast<\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00432\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ ::gko::ReferenceExecutor>(exec),\ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00433\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<Args>(args)...);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00434\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ if\ (std::is\_same<\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00435\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec\_type,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00436\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ ::gko::OmpExecutor>>::\ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00437\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value)\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00438\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::gko::kernels::omp::\_kernel(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00439\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::dynamic\_pointer\_cast<const\ ::gko::OmpExecutor>(\ \ \ \(\backslash\)}}
\DoxyCodeLine{00440\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00441\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<Args>(args)...);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00442\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ if\ (std::is\_same<\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00443\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec\_type,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00444\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ ::gko::CudaExecutor>>::\ \ \ \(\backslash\)}}
\DoxyCodeLine{00445\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value)\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00446\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::gko::kernels::cuda::\_kernel(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00447\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::dynamic\_pointer\_cast<const\ ::gko::CudaExecutor>(\ \ \(\backslash\)}}
\DoxyCodeLine{00448\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00449\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<Args>(args)...);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00450\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ if\ (std::is\_same<\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00451\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec\_type,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00452\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ ::gko::HipExecutor>>::\ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00453\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value)\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00454\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::gko::kernels::hip::\_kernel(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00455\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::dynamic\_pointer\_cast<const\ ::gko::HipExecutor>(\ \ \ \(\backslash\)}}
\DoxyCodeLine{00456\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00457\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<Args>(args)...);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00458\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ if\ (std::is\_same<\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00459\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec\_type,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00460\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ ::gko::DpcppExecutor>>::\ \ \(\backslash\)}}
\DoxyCodeLine{00461\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value)\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00462\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::gko::kernels::dpcpp::\_kernel(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00463\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::dynamic\_pointer\_cast<const\ ::gko::DpcppExecutor>(\ \(\backslash\)}}
\DoxyCodeLine{00464\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00465\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<Args>(args)...);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00466\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00467\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_NOT\_IMPLEMENTED;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00468\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00469\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \});\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00470\ \textcolor{preprocessor}{\ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00471\ \textcolor{preprocessor}{\ \ \ \ static\_assert(true,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00472\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}This\ assert\ is\ used\ to\ counter\ the\ false\ positive\ extra\ "{}\ \ \ \(\backslash\)}}
\DoxyCodeLine{00473\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}semi-\/colon\ warnings"{})}}
\DoxyCodeLine{00474\ }
\DoxyCodeLine{00475\ }
\DoxyCodeLine{00513\ \textcolor{preprocessor}{\#define\ GKO\_REGISTER\_HOST\_OPERATION(\_name,\ \_kernel)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00514\ \textcolor{preprocessor}{\ \ \ \ template\ <typename...\ Args>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00515\ \textcolor{preprocessor}{\ \ \ \ auto\ make\_\#\#\_name(Args\&\&...\ args)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00516\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00517\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ return\ ::gko::detail::make\_register\_operation(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00518\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \#\_kernel,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00519\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ [\&args...](auto)\ \{\ \_kernel(std::forward<Args>(args)...);\ \});\ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00520\ \textcolor{preprocessor}{\ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00521\ \textcolor{preprocessor}{\ \ \ \ static\_assert(true,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00522\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}This\ assert\ is\ used\ to\ counter\ the\ false\ positive\ extra\ "{}\ \(\backslash\)}}
\DoxyCodeLine{00523\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}semi-\/colon\ warnings"{})}}
\DoxyCodeLine{00524\ }
\DoxyCodeLine{00525\ }
\DoxyCodeLine{00526\ \textcolor{preprocessor}{\#define\ GKO\_DECLARE\_EXECUTOR\_FRIEND(\_type,\ ...)\ friend\ class\ \_type}}
\DoxyCodeLine{00527\ }
\DoxyCodeLine{00615\ \textcolor{keyword}{class\ }Executor\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1log_1_1EnableLogging}{log::EnableLogging}}<Executor>\ \{}
\DoxyCodeLine{00616\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00617\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }detail::ExecutorBase;}
\DoxyCodeLine{00618\ }
\DoxyCodeLine{00619\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_DECLARE\_EXECUTOR\_FRIEND);}
\DoxyCodeLine{00620\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }ReferenceExecutor;}
\DoxyCodeLine{00621\ }
\DoxyCodeLine{00622\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00623\ \ \ \ \ \textcolor{keyword}{virtual}\ \string~Executor()\ =\ \textcolor{keywordflow}{default};}
\DoxyCodeLine{00624\ }
\DoxyCodeLine{00625\ \ \ \ \ Executor()\ =\ \textcolor{keywordflow}{default};}
\DoxyCodeLine{00626\ \ \ \ \ Executor(Executor\&)\ =\ \textcolor{keyword}{delete};}
\DoxyCodeLine{00627\ \ \ \ \ Executor(Executor\&\&)\ =\ \textcolor{keyword}{delete};}
\DoxyCodeLine{00628\ \ \ \ \ Executor\&\ operator=(Executor\&)\ =\ \textcolor{keyword}{delete};}
\DoxyCodeLine{00629\ \ \ \ \ Executor\&\ operator=(Executor\&\&)\ =\ \textcolor{keyword}{delete};}
\DoxyCodeLine{00630\ }
\DoxyCodeLine{00636\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{run}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}}\&\ op)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00637\ }
\DoxyCodeLine{00652\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ClosureOmp,\ \textcolor{keyword}{typename}\ ClosureCuda,\ \textcolor{keyword}{typename}\ ClosureHip,}
\DoxyCodeLine{00653\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ ClosureDpcpp>}
\DoxyCodeLine{00654\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{00655\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Please\ use\ the\ overload\ with\ std::string\ as\ first\ parameter."{}})}
\DoxyCodeLine{00656\ \ \ \ \ void\ \doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{run}}(const\ ClosureOmp\&\ op\_omp,\ const\ ClosureCuda\&\ op\_cuda,}
\DoxyCodeLine{00657\ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ ClosureHip\&\ op\_hip,\ const\ ClosureDpcpp\&\ op\_dpcpp)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00658\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00659\ \ \ \ \ \ \ \ \ LambdaOperation<ClosureOmp,\ ClosureOmp,\ ClosureCuda,\ ClosureHip,}
\DoxyCodeLine{00660\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ClosureDpcpp>}
\DoxyCodeLine{00661\ \ \ \ \ \ \ \ \ \ \ \ \ op(op\_omp,\ op\_cuda,\ op\_hip,\ op\_dpcpp);}
\DoxyCodeLine{00662\ \ \ \ \ \ \ \ \ this-\/>run(op);}
\DoxyCodeLine{00663\ \ \ \ \ \}}
\DoxyCodeLine{00664\ }
\DoxyCodeLine{00681\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ClosureReference,\ \textcolor{keyword}{typename}\ ClosureOmp,}
\DoxyCodeLine{00682\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ ClosureCuda,\ \textcolor{keyword}{typename}\ ClosureHip,\ \textcolor{keyword}{typename}\ ClosureDpcpp>}
\DoxyCodeLine{00683\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_abe906f109824da54447e504ff88aa97f}{run}}(std::string\ name,\ \textcolor{keyword}{const}\ ClosureReference\&\ op\_ref,}
\DoxyCodeLine{00684\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ ClosureOmp\&\ op\_omp,\ \textcolor{keyword}{const}\ ClosureCuda\&\ op\_cuda,}
\DoxyCodeLine{00685\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ ClosureHip\&\ op\_hip,\ \textcolor{keyword}{const}\ ClosureDpcpp\&\ op\_dpcpp)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00686\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00687\ \ \ \ \ \ \ \ \ LambdaOperation<ClosureReference,\ ClosureOmp,\ ClosureCuda,\ ClosureHip,}
\DoxyCodeLine{00688\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ClosureDpcpp>}
\DoxyCodeLine{00689\ \ \ \ \ \ \ \ \ \ \ \ \ op(std::move(name),\ op\_ref,\ op\_omp,\ op\_cuda,\ op\_hip,\ op\_dpcpp);}
\DoxyCodeLine{00690\ \ \ \ \ \ \ \ \ this-\/>run(op);}
\DoxyCodeLine{00691\ \ \ \ \ \}}
\DoxyCodeLine{00692\ }
\DoxyCodeLine{00704\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00705\ \ \ \ \ T*\ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_elems)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00706\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00707\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ log<log::Logger::allocation\_started>(}
\DoxyCodeLine{00708\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{this},\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T));}
\DoxyCodeLine{00709\ \ \ \ \ \ \ \ \ T*\ allocated\ =\ \textcolor{keyword}{static\_cast<}T*\textcolor{keyword}{>}(this-\/>raw\_alloc(num\_elems\ *\ \textcolor{keyword}{sizeof}(T)));}
\DoxyCodeLine{00710\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ log<log::Logger::allocation\_completed>(}
\DoxyCodeLine{00711\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{this},\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T),\ \textcolor{keyword}{reinterpret\_cast<}\doxymbox{\hyperlink{namespacegko_a70648f1299a0c1297e2bf86f47264626}{uintptr}}\textcolor{keyword}{>}(allocated));}
\DoxyCodeLine{00712\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ allocated;}
\DoxyCodeLine{00713\ \ \ \ \ \}}
\DoxyCodeLine{00714\ }
\DoxyCodeLine{00722\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a0befe43d21c93e199d1620eaae4ccc0c}{free}}(\textcolor{keywordtype}{void}*\ ptr)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00723\ \ \ \ \ \{}
\DoxyCodeLine{00724\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ log<log::Logger::free\_started>(}
\DoxyCodeLine{00725\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{this},\ \textcolor{keyword}{reinterpret\_cast<}\doxymbox{\hyperlink{namespacegko_a70648f1299a0c1297e2bf86f47264626}{uintptr}}\textcolor{keyword}{>}(ptr));}
\DoxyCodeLine{00726\ \ \ \ \ \ \ \ \ this-\/>raw\_free(ptr);}
\DoxyCodeLine{00727\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ log<log::Logger::free\_completed>(}
\DoxyCodeLine{00728\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{this},\ \textcolor{keyword}{reinterpret\_cast<}\doxymbox{\hyperlink{namespacegko_a70648f1299a0c1297e2bf86f47264626}{uintptr}}\textcolor{keyword}{>}(ptr));}
\DoxyCodeLine{00729\ \ \ \ \ \}}
\DoxyCodeLine{00730\ }
\DoxyCodeLine{00743\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00744\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a8050a118e6ac312a768ec56d3d3aae20}{copy\_from}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ Executor>}}\ src\_exec,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_elems,}
\DoxyCodeLine{00745\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ T*\ src\_ptr,\ T*\ dest\_ptr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00746\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00747\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ src\_loc\ =\ \textcolor{keyword}{reinterpret\_cast<}\doxymbox{\hyperlink{namespacegko_a70648f1299a0c1297e2bf86f47264626}{uintptr}}\textcolor{keyword}{>}(src\_ptr);}
\DoxyCodeLine{00748\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ dest\_loc\ =\ \textcolor{keyword}{reinterpret\_cast<}\doxymbox{\hyperlink{namespacegko_a70648f1299a0c1297e2bf86f47264626}{uintptr}}\textcolor{keyword}{>}(dest\_ptr);}
\DoxyCodeLine{00749\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ log<log::Logger::copy\_started>(}
\DoxyCodeLine{00750\ \ \ \ \ \ \ \ \ \ \ \ \ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ \textcolor{keyword}{this},\ src\_loc,\ dest\_loc,\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T));}
\DoxyCodeLine{00751\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{this}\ !=\ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}())\ \{}
\DoxyCodeLine{00752\ \ \ \ \ \ \ \ \ \ \ \ \ src\_exec-\/>template\ log<log::Logger::copy\_started>(}
\DoxyCodeLine{00753\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ \textcolor{keyword}{this},\ src\_loc,\ dest\_loc,\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T));}
\DoxyCodeLine{00754\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00755\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{try}\ \{}
\DoxyCodeLine{00756\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>raw\_copy\_from(src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T),\ src\_ptr,}
\DoxyCodeLine{00757\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dest\_ptr);}
\DoxyCodeLine{00758\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{catch}\ (\doxymbox{\hyperlink{classgko_1_1NotSupported}{NotSupported}}\&)\ \{}
\DoxyCodeLine{00759\ \textcolor{preprocessor}{\#if\ (GKO\_VERBOSE\_LEVEL\ >=\ 1)\ \&\&\ !defined(NDEBUG)}}
\DoxyCodeLine{00760\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Unoptimized\ copy.\ Try\ to\ go\ through\ the\ masters.}}
\DoxyCodeLine{00761\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ output\ to\ log\ when\ verbose\ >=\ 1\ and\ debug\ build}}
\DoxyCodeLine{00762\ \ \ \ \ \ \ \ \ \ \ \ \ std::cerr\ <<\ \textcolor{stringliteral}{"{}Not\ direct\ copy.\ Try\ to\ copy\ data\ from\ the\ masters."{}}}
\DoxyCodeLine{00763\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ std::endl;}
\DoxyCodeLine{00764\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00765\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ src\_master\ =\ src\_exec-\/>get\_master().\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}();}
\DoxyCodeLine{00766\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (num\_elems\ >\ 0\ \&\&\ src\_master\ !=\ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}())\ \{}
\DoxyCodeLine{00767\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}*\ master\_ptr\ =\ src\_exec-\/>get\_master()-\/>alloc<T>(num\_elems);}
\DoxyCodeLine{00768\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ src\_master-\/>copy\_from<T>(src\_exec,\ num\_elems,\ src\_ptr,}
\DoxyCodeLine{00769\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ master\_ptr);}
\DoxyCodeLine{00770\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1Executor_a8050a118e6ac312a768ec56d3d3aae20}{copy\_from<T>}}(src\_master,\ num\_elems,\ master\_ptr,\ dest\_ptr);}
\DoxyCodeLine{00771\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ src\_master-\/>free(master\_ptr);}
\DoxyCodeLine{00772\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00773\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00774\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ log<log::Logger::copy\_completed>(}
\DoxyCodeLine{00775\ \ \ \ \ \ \ \ \ \ \ \ \ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ \textcolor{keyword}{this},\ src\_loc,\ dest\_loc,\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T));}
\DoxyCodeLine{00776\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{this}\ !=\ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}())\ \{}
\DoxyCodeLine{00777\ \ \ \ \ \ \ \ \ \ \ \ \ src\_exec-\/>template\ log<log::Logger::copy\_completed>(}
\DoxyCodeLine{00778\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ src\_exec.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ \textcolor{keyword}{this},\ src\_loc,\ dest\_loc,\ num\_elems\ *\ \textcolor{keyword}{sizeof}(T));}
\DoxyCodeLine{00779\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00780\ \ \ \ \ \}}
\DoxyCodeLine{00781\ }
\DoxyCodeLine{00793\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00794\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a45377b6ee4c1d1852ec299ce2133eabb}{copy}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_elems,\ \textcolor{keyword}{const}\ T*\ src\_ptr,\ T*\ dest\_ptr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00795\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00796\ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1Executor_a8050a118e6ac312a768ec56d3d3aae20}{copy\_from}}(\textcolor{keyword}{this},\ num\_elems,\ src\_ptr,\ dest\_ptr);}
\DoxyCodeLine{00797\ \ \ \ \ \}}
\DoxyCodeLine{00798\ }
\DoxyCodeLine{00808\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00809\ \ \ \ \ T\ \doxymbox{\hyperlink{classgko_1_1Executor_ab5ee27c7997a4e109831e27c42242073}{copy\_val\_to\_host}}(\textcolor{keyword}{const}\ T*\ ptr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00810\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00811\ \ \ \ \ \ \ \ \ T\ out\{\};}
\DoxyCodeLine{00812\ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1Executor_aa23172c7579fe4a9a41af8eba62ed54f}{get\_master}}()-\/>copy\_from(\textcolor{keyword}{this},\ 1,\ ptr,\ \&out);}
\DoxyCodeLine{00813\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ out;}
\DoxyCodeLine{00814\ \ \ \ \ \}}
\DoxyCodeLine{00815\ }
\DoxyCodeLine{00820\ \ \ \ \ \textcolor{keyword}{virtual}\ std::shared\_ptr<Executor>\ \doxymbox{\hyperlink{classgko_1_1Executor_aa23172c7579fe4a9a41af8eba62ed54f}{get\_master}}()\ noexcept\ =\ 0;}
\DoxyCodeLine{00821\ }
\DoxyCodeLine{00825\ \ \ \ \ virtual\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ Executor>\ \doxymbox{\hyperlink{classgko_1_1Executor_aa23172c7579fe4a9a41af8eba62ed54f}{get\_master}}()\ const\ noexcept\ =\ 0;}
\DoxyCodeLine{00826\ }
\DoxyCodeLine{00830\ \ \ \ \ virtual\ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a24eeee7648c0f0fd07c9866d07154875}{synchronize}}()\ const\ =\ 0;}
\DoxyCodeLine{00831\ }
\DoxyCodeLine{00838\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a520dad04b7e74f285ab0956873a5413d}{add\_logger}}(\doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ log::Logger>\ logger)\textcolor{keyword}{\ override}}
\DoxyCodeLine{00839\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00840\ \ \ \ \ \ \ \ \ this-\/>propagating\_logger\_refcount\_.fetch\_add(}
\DoxyCodeLine{00841\ \ \ \ \ \ \ \ \ \ \ \ \ logger-\/>needs\_propagation()\ ?\ 1\ :\ 0);}
\DoxyCodeLine{00842\ \ \ \ \ \ \ \ \ this-\/>EnableLogging<Executor>::add\_logger(logger);}
\DoxyCodeLine{00843\ \ \ \ \ \}}
\DoxyCodeLine{00844\ }
\DoxyCodeLine{00851\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_af04cdc1a9af6c8efc34ddebb9e7aaf00}{remove\_logger}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1log_1_1Logger}{log::Logger}}*\ logger)\textcolor{keyword}{\ override}}
\DoxyCodeLine{00852\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00853\ \ \ \ \ \ \ \ \ this-\/>propagating\_logger\_refcount\_.fetch\_sub(}
\DoxyCodeLine{00854\ \ \ \ \ \ \ \ \ \ \ \ \ logger-\/>\doxymbox{\hyperlink{classgko_1_1log_1_1Logger_a6f60c7a79a4716836d232558c58777d0}{needs\_propagation}}()\ ?\ 1\ :\ 0);}
\DoxyCodeLine{00855\ \ \ \ \ \ \ \ \ this-\/>EnableLogging<Executor>::remove\_logger(logger);}
\DoxyCodeLine{00856\ \ \ \ \ \}}
\DoxyCodeLine{00857\ }
\DoxyCodeLine{00858\ \ \ \ \ \textcolor{keyword}{using\ }EnableLogging<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>::remove\_logger;}
\DoxyCodeLine{00859\ }
\DoxyCodeLine{00867\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1Executor_a8801d54a4ac842def0b88d643b37b1db}{set\_log\_propagation\_mode}}(\doxymbox{\hyperlink{namespacegko_aa2543f42cbbe1a9373dc46d04c112bee}{log\_propagation\_mode}}\ mode)}
\DoxyCodeLine{00868\ \ \ \ \ \{}
\DoxyCodeLine{00869\ \ \ \ \ \ \ \ \ log\_propagation\_mode\_\ =\ mode;}
\DoxyCodeLine{00870\ \ \ \ \ \}}
\DoxyCodeLine{00871\ }
\DoxyCodeLine{00879\ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{classgko_1_1Executor_a3d59329aa9e2db037f2ebb6748bf4a5b}{should\_propagate\_log}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00880\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00881\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>propagating\_logger\_refcount\_.load()\ >\ 0\ \&\&}
\DoxyCodeLine{00882\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log\_propagation\_mode\_\ ==\ \doxymbox{\hyperlink{namespacegko_aa2543f42cbbe1a9373dc46d04c112beea2bd9c0ed00116be1258e0cc66617d7c8}{log\_propagation\_mode::automatic}};}
\DoxyCodeLine{00883\ \ \ \ \ \}}
\DoxyCodeLine{00884\ }
\DoxyCodeLine{00892\ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{classgko_1_1Executor_a452d0a9f4ea10ea3c3ba5c820e1e8d10}{memory\_accessible}}(\textcolor{keyword}{const}\ std::shared\_ptr<const\ Executor>\&\ other)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00893\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00894\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>verify\_memory\_from(other.get());}
\DoxyCodeLine{00895\ \ \ \ \ \}}
\DoxyCodeLine{00896\ }
\DoxyCodeLine{00897\ \ \ \ \ \textcolor{keyword}{virtual}\ \doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\_device\_id\_guard}}\ get\_scoped\_device\_id\_guard()\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00898\ }
\DoxyCodeLine{00900\ \ \ \ \ \textcolor{keyword}{virtual}\ std::string\ \doxymbox{\hyperlink{classgko_1_1Executor_a9b25713dfacc7914b69115f815e616b0}{get\_description}}()\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00901\ }
\DoxyCodeLine{00902\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00907\ \ \ \ \ \textcolor{keyword}{struct\ }exec\_info\ \{}
\DoxyCodeLine{00911\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id\ =\ -\/1;}
\DoxyCodeLine{00912\ }
\DoxyCodeLine{00916\ \ \ \ \ \ \ \ \ std::string\ device\_type;}
\DoxyCodeLine{00917\ }
\DoxyCodeLine{00921\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ numa\_node\ =\ -\/1;}
\DoxyCodeLine{00922\ }
\DoxyCodeLine{00931\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ num\_computing\_units\ =\ -\/1;}
\DoxyCodeLine{00932\ }
\DoxyCodeLine{00944\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ num\_pu\_per\_cu\ =\ -\/1;}
\DoxyCodeLine{00945\ }
\DoxyCodeLine{00954\ \ \ \ \ \ \ \ \ std::vector<int>\ subgroup\_sizes\{\};}
\DoxyCodeLine{00955\ }
\DoxyCodeLine{00964\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ max\_subgroup\_size\ =\ -\/1;}
\DoxyCodeLine{00965\ }
\DoxyCodeLine{00976\ \ \ \ \ \ \ \ \ std::vector<int>\ max\_workitem\_sizes\{\};}
\DoxyCodeLine{00977\ }
\DoxyCodeLine{00987\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ max\_workgroup\_size;}
\DoxyCodeLine{00988\ }
\DoxyCodeLine{00992\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ major\ =\ -\/1;}
\DoxyCodeLine{00993\ }
\DoxyCodeLine{00997\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ minor\ =\ -\/1;}
\DoxyCodeLine{00998\ }
\DoxyCodeLine{01004\ \ \ \ \ \ \ \ \ std::string\ pci\_bus\_id\ =\ std::string(13,\ \textcolor{charliteral}{'x'});}
\DoxyCodeLine{01005\ }
\DoxyCodeLine{01016\ \ \ \ \ \ \ \ \ std::vector<int>\ closest\_pu\_ids\{\};}
\DoxyCodeLine{01017\ \ \ \ \ \};}
\DoxyCodeLine{01018\ }
\DoxyCodeLine{01024\ \ \ \ \ \textcolor{keyword}{const}\ exec\_info\&\ get\_exec\_info()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ this-\/>exec\_info\_;\ \}}
\DoxyCodeLine{01025\ }
\DoxyCodeLine{01035\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}*\ raw\_alloc(size\_type\ size)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{01036\ }
\DoxyCodeLine{01044\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ raw\_free(\textcolor{keywordtype}{void}*\ ptr)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ =\ 0;}
\DoxyCodeLine{01045\ }
\DoxyCodeLine{01056\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ raw\_copy\_from(\textcolor{keyword}{const}\ Executor*\ src\_exec,\ size\_type\ n\_bytes,}
\DoxyCodeLine{01057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{void}*\ src\_ptr,\ \textcolor{keywordtype}{void}*\ dest\_ptr)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{01058\ }
\DoxyCodeLine{01068\ \textcolor{preprocessor}{\#define\ GKO\_ENABLE\_RAW\_COPY\_TO(\_exec\_type,\ ...)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01069\ \textcolor{preprocessor}{\ \ \ \ virtual\ void\ raw\_copy\_to(const\ \_exec\_type*\ dest\_exec,\ size\_type\ n\_bytes,\ \(\backslash\)}}
\DoxyCodeLine{01070\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ void*\ src\_ptr,\ void*\ dest\_ptr)\ const\ =\ 0}}
\DoxyCodeLine{01071\ }
\DoxyCodeLine{01072\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_ENABLE\_RAW\_COPY\_TO);}
\DoxyCodeLine{01073\ }
\DoxyCodeLine{01074\ \textcolor{preprocessor}{\#undef\ GKO\_ENABLE\_RAW\_COPY\_TO}}
\DoxyCodeLine{01075\ }
\DoxyCodeLine{01083\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{bool}\ verify\_memory\_from(\textcolor{keyword}{const}\ Executor*\ src\_exec)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{01084\ }
\DoxyCodeLine{01094\ \textcolor{preprocessor}{\#define\ GKO\_ENABLE\_VERIFY\_MEMORY\_TO(\_exec\_type,\ ...)\ \(\backslash\)}}
\DoxyCodeLine{01095\ \textcolor{preprocessor}{\ \ \ \ virtual\ bool\ verify\_memory\_to(const\ \_exec\_type*\ dest\_exec)\ const\ =\ 0}}
\DoxyCodeLine{01096\ }
\DoxyCodeLine{01097\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_ENABLE\_VERIFY\_MEMORY\_TO);}
\DoxyCodeLine{01098\ }
\DoxyCodeLine{01099\ \ \ \ \ GKO\_ENABLE\_VERIFY\_MEMORY\_TO(ReferenceExecutor,\ ref);}
\DoxyCodeLine{01100\ }
\DoxyCodeLine{01101\ \textcolor{preprocessor}{\#undef\ GKO\_ENABLE\_VERIFY\_MEMORY\_TO}}
\DoxyCodeLine{01102\ }
\DoxyCodeLine{01109\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ populate\_exec\_info(\textcolor{keyword}{const}\ machine\_topology*\ mach\_topo)\ =\ 0;}
\DoxyCodeLine{01110\ }
\DoxyCodeLine{01116\ \ \ \ \ exec\_info\&\ get\_exec\_info()\ \{\ \textcolor{keywordflow}{return}\ this-\/>exec\_info\_;\ \}}
\DoxyCodeLine{01117\ }
\DoxyCodeLine{01118\ \ \ \ \ exec\_info\ exec\_info\_;}
\DoxyCodeLine{01119\ }
\DoxyCodeLine{01120\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_aa2543f42cbbe1a9373dc46d04c112bee}{log\_propagation\_mode}}\ log\_propagation\_mode\_\{log\_propagation\_mode::automatic\};}
\DoxyCodeLine{01121\ }
\DoxyCodeLine{01122\ \ \ \ \ std::atomic<int>\ propagating\_logger\_refcount\_\{\};}
\DoxyCodeLine{01123\ }
\DoxyCodeLine{01124\ \textcolor{keyword}{private}:}
\DoxyCodeLine{01139\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ClosureReference,\ \textcolor{keyword}{typename}\ ClosureOmp,}
\DoxyCodeLine{01140\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ ClosureCuda,\ \textcolor{keyword}{typename}\ ClosureHip,\ \textcolor{keyword}{typename}\ ClosureDpcpp>}
\DoxyCodeLine{01141\ \ \ \ \ \textcolor{keyword}{class\ }LambdaOperation\ :\ \textcolor{keyword}{public}\ Operation\ \{}
\DoxyCodeLine{01142\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{01143\ \ \ \ \ \ \ \ \ LambdaOperation(std::string\ name,\ \textcolor{keyword}{const}\ ClosureReference\&\ op\_ref,}
\DoxyCodeLine{01144\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ ClosureOmp\&\ op\_omp,\ \textcolor{keyword}{const}\ ClosureCuda\&\ op\_cuda,}
\DoxyCodeLine{01145\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ ClosureHip\&\ op\_hip,\ \textcolor{keyword}{const}\ ClosureDpcpp\&\ op\_dpcpp)}
\DoxyCodeLine{01146\ \ \ \ \ \ \ \ \ \ \ \ \ :\ name\_(std::move(name)),}
\DoxyCodeLine{01147\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ op\_ref\_(op\_ref),}
\DoxyCodeLine{01148\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ op\_omp\_(op\_omp),}
\DoxyCodeLine{01149\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ op\_cuda\_(op\_cuda),}
\DoxyCodeLine{01150\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ op\_hip\_(op\_hip),}
\DoxyCodeLine{01151\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ op\_dpcpp\_(op\_dpcpp)}
\DoxyCodeLine{01152\ \ \ \ \ \ \ \ \ \{\}}
\DoxyCodeLine{01153\ }
\DoxyCodeLine{01164\ \ \ \ \ \ \ \ \ LambdaOperation(\textcolor{keyword}{const}\ ClosureOmp\&\ op\_omp,\ \textcolor{keyword}{const}\ ClosureCuda\&\ op\_cuda,}
\DoxyCodeLine{01165\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ ClosureHip\&\ op\_hip,\ \textcolor{keyword}{const}\ ClosureDpcpp\&\ op\_dpcpp)}
\DoxyCodeLine{01166\ \ \ \ \ \ \ \ \ \ \ \ \ :\ LambdaOperation(\textcolor{stringliteral}{"{}unnamed"{}},\ op\_omp,\ op\_omp,\ op\_cuda,\ op\_hip,}
\DoxyCodeLine{01167\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ op\_dpcpp)}
\DoxyCodeLine{01168\ \ \ \ \ \ \ \ \ \{\}}
\DoxyCodeLine{01169\ }
\DoxyCodeLine{01170\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ OmpExecutor>)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01171\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{01172\ \ \ \ \ \ \ \ \ \ \ \ \ op\_omp\_();}
\DoxyCodeLine{01173\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01174\ }
\DoxyCodeLine{01175\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ ReferenceExecutor>)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01176\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{01177\ \ \ \ \ \ \ \ \ \ \ \ \ op\_ref\_();}
\DoxyCodeLine{01178\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01179\ }
\DoxyCodeLine{01180\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ CudaExecutor>)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01181\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{01182\ \ \ \ \ \ \ \ \ \ \ \ \ op\_cuda\_();}
\DoxyCodeLine{01183\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01184\ }
\DoxyCodeLine{01185\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ HipExecutor>)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01186\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{01187\ \ \ \ \ \ \ \ \ \ \ \ \ op\_hip\_();}
\DoxyCodeLine{01188\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01189\ }
\DoxyCodeLine{01190\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ run(std::shared\_ptr<const\ DpcppExecutor>)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01191\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{01192\ \ \ \ \ \ \ \ \ \ \ \ \ op\_dpcpp\_();}
\DoxyCodeLine{01193\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01194\ }
\DoxyCodeLine{01195\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ get\_name()\ const\ noexcept\textcolor{keyword}{\ override\ }\{\ \textcolor{keywordflow}{return}\ name\_.c\_str();\ \}}
\DoxyCodeLine{01196\ }
\DoxyCodeLine{01197\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{01198\ \ \ \ \ \ \ \ \ std::string\ name\_;}
\DoxyCodeLine{01199\ \ \ \ \ \ \ \ \ ClosureReference\ op\_ref\_;}
\DoxyCodeLine{01200\ \ \ \ \ \ \ \ \ ClosureOmp\ op\_omp\_;}
\DoxyCodeLine{01201\ \ \ \ \ \ \ \ \ ClosureCuda\ op\_cuda\_;}
\DoxyCodeLine{01202\ \ \ \ \ \ \ \ \ ClosureHip\ op\_hip\_;}
\DoxyCodeLine{01203\ \ \ \ \ \ \ \ \ ClosureDpcpp\ op\_dpcpp\_;}
\DoxyCodeLine{01204\ \ \ \ \ \};}
\DoxyCodeLine{01205\ \};}
\DoxyCodeLine{01206\ }
\DoxyCodeLine{01207\ }
\DoxyCodeLine{01216\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{01217\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1executor__deleter_a260f79ed87560fefc48d52b072bbb776}{executor\_deleter}}\ \{}
\DoxyCodeLine{01218\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01219\ \ \ \ \ \textcolor{keyword}{using\ }pointer\ =\ T*;}
\DoxyCodeLine{01220\ }
\DoxyCodeLine{01226\ \ \ \ \ \textcolor{keyword}{explicit}\ \doxymbox{\hyperlink{classgko_1_1executor__deleter_a260f79ed87560fefc48d52b072bbb776}{executor\_deleter}}(std::shared\_ptr<const\ Executor>\ exec)}
\DoxyCodeLine{01227\ \ \ \ \ \ \ \ \ :\ exec\_\{exec\}}
\DoxyCodeLine{01228\ \ \ \ \ \{\}}
\DoxyCodeLine{01229\ }
\DoxyCodeLine{01235\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1executor__deleter_aaefa9d9f1c8ae4f4723668d5f946e5c0}{operator()}}(pointer\ ptr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{01236\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01237\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (exec\_)\ \{}
\DoxyCodeLine{01238\ \ \ \ \ \ \ \ \ \ \ \ \ exec\_-\/>free(ptr);}
\DoxyCodeLine{01239\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01240\ \ \ \ \ \}}
\DoxyCodeLine{01241\ }
\DoxyCodeLine{01242\ \textcolor{keyword}{private}:}
\DoxyCodeLine{01243\ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec\_;}
\DoxyCodeLine{01244\ \};}
\DoxyCodeLine{01245\ }
\DoxyCodeLine{01246\ \textcolor{comment}{//\ a\ specialization\ for\ arrays}}
\DoxyCodeLine{01247\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{01248\ \textcolor{keyword}{class\ }executor\_deleter<T[]>\ \{}
\DoxyCodeLine{01249\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01250\ \ \ \ \ \textcolor{keyword}{using\ }pointer\ =\ T[];}
\DoxyCodeLine{01251\ }
\DoxyCodeLine{01252\ \ \ \ \ \textcolor{keyword}{explicit}\ executor\_deleter(std::shared\_ptr<const\ Executor>\ exec)}
\DoxyCodeLine{01253\ \ \ \ \ \ \ \ \ :\ exec\_\{exec\}}
\DoxyCodeLine{01254\ \ \ \ \ \{\}}
\DoxyCodeLine{01255\ }
\DoxyCodeLine{01256\ \ \ \ \ \textcolor{keywordtype}{void}\ operator()(pointer\ ptr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{01257\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01258\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (exec\_)\ \{}
\DoxyCodeLine{01259\ \ \ \ \ \ \ \ \ \ \ \ \ exec\_-\/>free(ptr);}
\DoxyCodeLine{01260\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01261\ \ \ \ \ \}}
\DoxyCodeLine{01262\ }
\DoxyCodeLine{01263\ \textcolor{keyword}{private}:}
\DoxyCodeLine{01264\ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec\_;}
\DoxyCodeLine{01265\ \};}
\DoxyCodeLine{01266\ }
\DoxyCodeLine{01267\ }
\DoxyCodeLine{01268\ \textcolor{keyword}{namespace\ }detail\ \{}
\DoxyCodeLine{01269\ }
\DoxyCodeLine{01270\ }
\DoxyCodeLine{01271\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ConcreteExecutor>}
\DoxyCodeLine{01272\ \textcolor{keyword}{class\ }ExecutorBase\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}\ \{}
\DoxyCodeLine{01273\ \ \ \ \ \textcolor{comment}{//\ friend\ class\ is\ not\ in\ the\ nearest\ enclosing\ namesace,\ so\ we\ write\ the}}
\DoxyCodeLine{01274\ \ \ \ \ \textcolor{comment}{//\ full\ name}}
\DoxyCodeLine{01275\ \ \ \ \ \textcolor{keyword}{friend}\ class\ ::gko::OmpExecutor;}
\DoxyCodeLine{01276\ \ \ \ \ \textcolor{keyword}{friend}\ class\ ::gko::HipExecutor;}
\DoxyCodeLine{01277\ \ \ \ \ \textcolor{keyword}{friend}\ class\ ::gko::DpcppExecutor;}
\DoxyCodeLine{01278\ \ \ \ \ \textcolor{keyword}{friend}\ class\ ::gko::CudaExecutor;}
\DoxyCodeLine{01279\ \ \ \ \ \textcolor{keyword}{friend}\ class\ ::gko::ReferenceExecutor;}
\DoxyCodeLine{01280\ }
\DoxyCodeLine{01281\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01282\ \ \ \ \ \textcolor{keywordtype}{void}\ run(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}}\&\ op)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01283\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01284\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ \doxymbox{\hyperlink{namespacegko_1_1log}{log<log::Logger::operation\_launched>}}(\textcolor{keyword}{this},\ \&op);}
\DoxyCodeLine{01285\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ scope\_guard\ =\ get\_scoped\_device\_id\_guard();}
\DoxyCodeLine{01286\ \ \ \ \ \ \ \ \ op.run(self()-\/>shared\_from\_this());}
\DoxyCodeLine{01287\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ \doxymbox{\hyperlink{namespacegko_1_1log}{log<log::Logger::operation\_completed>}}(\textcolor{keyword}{this},\ \&op);}
\DoxyCodeLine{01288\ \ \ \ \ \}}
\DoxyCodeLine{01289\ }
\DoxyCodeLine{01290\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{01291\ \ \ \ \ \textcolor{keywordtype}{void}\ raw\_copy\_from(\textcolor{keyword}{const}\ Executor*\ src\_exec,\ size\_type\ n\_bytes,}
\DoxyCodeLine{01292\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{void}*\ src\_ptr,\ \textcolor{keywordtype}{void}*\ dest\_ptr)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01293\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01294\ \ \ \ \ \ \ \ \ src\_exec-\/>raw\_copy\_to(self(),\ n\_bytes,\ src\_ptr,\ dest\_ptr);}
\DoxyCodeLine{01295\ \ \ \ \ \}}
\DoxyCodeLine{01296\ }
\DoxyCodeLine{01297\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{bool}\ verify\_memory\_from(\textcolor{keyword}{const}\ Executor*\ src\_exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01298\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01299\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ src\_exec-\/>verify\_memory\_to(self());}
\DoxyCodeLine{01300\ \ \ \ \ \}}
\DoxyCodeLine{01301\ }
\DoxyCodeLine{01302\ \textcolor{keyword}{private}:}
\DoxyCodeLine{01303\ \ \ \ \ ConcreteExecutor*\ self()\ noexcept}
\DoxyCodeLine{01304\ \ \ \ \ \{}
\DoxyCodeLine{01305\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{static\_cast<}ConcreteExecutor*\textcolor{keyword}{>}(\textcolor{keyword}{this});}
\DoxyCodeLine{01306\ \ \ \ \ \}}
\DoxyCodeLine{01307\ }
\DoxyCodeLine{01308\ \ \ \ \ \textcolor{keyword}{const}\ ConcreteExecutor*\ self()\ const\ noexcept}
\DoxyCodeLine{01309\ \ \ \ \ \{}
\DoxyCodeLine{01310\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{static\_cast<}\textcolor{keyword}{const\ }ConcreteExecutor*\textcolor{keyword}{>}(\textcolor{keyword}{this});}
\DoxyCodeLine{01311\ \ \ \ \ \}}
\DoxyCodeLine{01312\ \};}
\DoxyCodeLine{01313\ }
\DoxyCodeLine{01314\ \textcolor{preprocessor}{\#undef\ GKO\_DECLARE\_EXECUTOR\_FRIEND}}
\DoxyCodeLine{01315\ }
\DoxyCodeLine{01316\ }
\DoxyCodeLine{01324\ \textcolor{keyword}{class\ }EnableDeviceReset\ \{}
\DoxyCodeLine{01325\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01331\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{01332\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}device\_reset\ is\ no\ longer\ supported,\ call\ "{}}}
\DoxyCodeLine{01333\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}cudaDeviceReset/hipDeviceReset\ manually"{}})}
\DoxyCodeLine{01334\ \ \ \ \ void\ set\_device\_reset(\textcolor{keywordtype}{bool}\ device\_reset)\ \{\}}
\DoxyCodeLine{01335\ }
\DoxyCodeLine{01341\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{01342\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}device\_reset\ is\ no\ longer\ supported,\ call\ "{}}}
\DoxyCodeLine{01343\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}cudaDeviceReset/hipDeviceReset\ manually"{}})}
\DoxyCodeLine{01344\ \ \ \ \ bool\ get\_device\_reset()\ \{\ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};\ \}}
\DoxyCodeLine{01345\ }
\DoxyCodeLine{01346\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{01352\ \ \ \ \ EnableDeviceReset()\ \{\}}
\DoxyCodeLine{01353\ }
\DoxyCodeLine{01354\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{01355\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}device\_reset\ is\ no\ longer\ supported,\ call\ "{}}}
\DoxyCodeLine{01356\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}cudaDeviceReset/hipDeviceReset\ manually"{}})}
\DoxyCodeLine{01357\ \ \ \ \ EnableDeviceReset(\textcolor{keywordtype}{bool}\ device\_reset)\ \{\}}
\DoxyCodeLine{01358\ \};}
\DoxyCodeLine{01359\ }
\DoxyCodeLine{01360\ }
\DoxyCodeLine{01361\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{01362\ }
\DoxyCodeLine{01363\ }
\DoxyCodeLine{01364\ \textcolor{preprocessor}{\#define\ GKO\_OVERRIDE\_RAW\_COPY\_TO(\_executor\_type,\ ...)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01365\ \textcolor{preprocessor}{\ \ \ \ void\ raw\_copy\_to(const\ \_executor\_type*\ dest\_exec,\ size\_type\ n\_bytes,\ \(\backslash\)}}
\DoxyCodeLine{01366\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ void*\ src\_ptr,\ void*\ dest\_ptr)\ const\ override}}
\DoxyCodeLine{01367\ }
\DoxyCodeLine{01368\ }
\DoxyCodeLine{01369\ \textcolor{preprocessor}{\#define\ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(dest\_,\ bool\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01370\ \textcolor{preprocessor}{\ \ \ \ virtual\ bool\ verify\_memory\_to(const\ dest\_*\ other)\ const\ override\ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01371\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01372\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ return\ bool\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01373\ \textcolor{preprocessor}{\ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01374\ \textcolor{preprocessor}{\ \ \ \ static\_assert(true,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{01375\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}This\ assert\ is\ used\ to\ counter\ the\ false\ positive\ extra\ "{}\ \(\backslash\)}}
\DoxyCodeLine{01376\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}semi-\/colon\ warnings"{})}}
\DoxyCodeLine{01377\ }
\DoxyCodeLine{01378\ }
\DoxyCodeLine{01386\ \textcolor{keyword}{class\ }OmpExecutor\ :\ \textcolor{keyword}{public}\ detail::ExecutorBase<OmpExecutor>,}
\DoxyCodeLine{01387\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ std::enable\_shared\_from\_this<OmpExecutor>\ \{}
\DoxyCodeLine{01388\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }detail::ExecutorBase<OmpExecutor>;}
\DoxyCodeLine{01389\ }
\DoxyCodeLine{01390\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01391\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{Executor::run}};}
\DoxyCodeLine{01392\ }
\DoxyCodeLine{01396\ \ \ \ \ \textcolor{keyword}{static}\ std::shared\_ptr<OmpExecutor>\ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_af977cb680e0427ca4eb71eb7b1266211}{create}}(}
\DoxyCodeLine{01397\ \ \ \ \ \ \ \ \ std::shared\_ptr<CpuAllocatorBase>\ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}\ =}
\DoxyCodeLine{01398\ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<CpuAllocator>())}
\DoxyCodeLine{01399\ \ \ \ \ \{}
\DoxyCodeLine{01400\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::shared\_ptr<OmpExecutor>(\textcolor{keyword}{new}\ OmpExecutor(std::move(\doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}})));}
\DoxyCodeLine{01401\ \ \ \ \ \}}
\DoxyCodeLine{01402\ }
\DoxyCodeLine{01403\ \ \ \ \ std::shared\_ptr<Executor>\ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a9db279007ed52b4e116c918e370f6474}{get\_master}}()\ noexcept\ override;}
\DoxyCodeLine{01404\ }
\DoxyCodeLine{01405\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a9db279007ed52b4e116c918e370f6474}{get\_master}}()\ const\ noexcept\ override;}
\DoxyCodeLine{01406\ }
\DoxyCodeLine{01407\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_ad4e421dcc3d1e5c7e396167a122e57ae}{synchronize}}()\ const\ override;}
\DoxyCodeLine{01408\ }
\DoxyCodeLine{01409\ \ \ \ \ \textcolor{keywordtype}{int}\ get\_num\_cores()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01410\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01411\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units;}
\DoxyCodeLine{01412\ \ \ \ \ \}}
\DoxyCodeLine{01413\ }
\DoxyCodeLine{01414\ \ \ \ \ \textcolor{keywordtype}{int}\ get\_num\_threads\_per\_core()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01415\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01416\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_pu\_per\_cu;}
\DoxyCodeLine{01417\ \ \ \ \ \}}
\DoxyCodeLine{01418\ }
\DoxyCodeLine{01419\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ get\_num\_omp\_threads();}
\DoxyCodeLine{01420\ }
\DoxyCodeLine{01421\ \ \ \ \ scoped\_device\_id\_guard\ get\_scoped\_device\_id\_guard()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01422\ }
\DoxyCodeLine{01423\ \ \ \ \ std::string\ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a157fbc623333a1658f8a3915e7b2da2d}{get\_description}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01424\ }
\DoxyCodeLine{01425\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{01426\ \ \ \ \ OmpExecutor(std::shared\_ptr<CpuAllocatorBase>\ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}})}
\DoxyCodeLine{01427\ \ \ \ \ \ \ \ \ :\ alloc\_\{\doxymbox{\hyperlink{namespacestd}{std}}::move(\doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}})\}}
\DoxyCodeLine{01428\ \ \ \ \ \{}
\DoxyCodeLine{01429\ \ \ \ \ \ \ \ \ this-\/>OmpExecutor::populate\_exec\_info(\doxymbox{\hyperlink{classgko_1_1machine__topology_a78ca968f9890a1e3d6758136ead05982}{machine\_topology::get\_instance}}());}
\DoxyCodeLine{01430\ \ \ \ \ \}}
\DoxyCodeLine{01431\ }
\DoxyCodeLine{01432\ \ \ \ \ \textcolor{keywordtype}{void}\ populate\_exec\_info(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1machine__topology}{machine\_topology}}*\ mach\_topo)\ \textcolor{keyword}{override};}
\DoxyCodeLine{01433\ }
\DoxyCodeLine{01434\ \ \ \ \ \textcolor{keywordtype}{void}*\ raw\_alloc(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01435\ }
\DoxyCodeLine{01436\ \ \ \ \ \textcolor{keywordtype}{void}\ raw\_free(\textcolor{keywordtype}{void}*\ ptr)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \textcolor{keyword}{override};}
\DoxyCodeLine{01437\ }
\DoxyCodeLine{01438\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_OVERRIDE\_RAW\_COPY\_TO);}
\DoxyCodeLine{01439\ }
\DoxyCodeLine{01440\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(\doxymbox{\hyperlink{classgko_1_1OmpExecutor}{OmpExecutor}},\ \textcolor{keyword}{true});}
\DoxyCodeLine{01441\ }
\DoxyCodeLine{01442\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(\doxymbox{\hyperlink{classgko_1_1ReferenceExecutor}{ReferenceExecutor}},\ \textcolor{keyword}{false});}
\DoxyCodeLine{01443\ }
\DoxyCodeLine{01444\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(\doxymbox{\hyperlink{classgko_1_1HipExecutor}{HipExecutor}},\ \textcolor{keyword}{false});}
\DoxyCodeLine{01445\ }
\DoxyCodeLine{01446\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(\doxymbox{\hyperlink{classgko_1_1CudaExecutor}{CudaExecutor}},\ \textcolor{keyword}{false});}
\DoxyCodeLine{01447\ }
\DoxyCodeLine{01448\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor}{DpcppExecutor}}*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01449\ }
\DoxyCodeLine{01450\ \ \ \ \ std::shared\_ptr<CpuAllocatorBase>\ alloc\_;}
\DoxyCodeLine{01451\ \};}
\DoxyCodeLine{01452\ }
\DoxyCodeLine{01453\ }
\DoxyCodeLine{01454\ \textcolor{keyword}{namespace\ }kernels\ \{}
\DoxyCodeLine{01455\ \textcolor{keyword}{namespace\ }omp\ \{}
\DoxyCodeLine{01456\ \textcolor{keyword}{using\ }DefaultExecutor\ =\ OmpExecutor;}
\DoxyCodeLine{01457\ \}\ \ \textcolor{comment}{//\ namespace\ omp}}
\DoxyCodeLine{01458\ \}\ \ \textcolor{comment}{//\ namespace\ kernels}}
\DoxyCodeLine{01459\ }
\DoxyCodeLine{01460\ }
\DoxyCodeLine{01468\ \textcolor{keyword}{class\ }ReferenceExecutor\ :\ \textcolor{keyword}{public}\ OmpExecutor\ \{}
\DoxyCodeLine{01469\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01470\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{Executor::run}};}
\DoxyCodeLine{01471\ }
\DoxyCodeLine{01472\ \ \ \ \ \textcolor{keyword}{static}\ std::shared\_ptr<ReferenceExecutor>\ create(}
\DoxyCodeLine{01473\ \ \ \ \ \ \ \ \ std::shared\_ptr<CpuAllocatorBase>\ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}\ =}
\DoxyCodeLine{01474\ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<CpuAllocator>())}
\DoxyCodeLine{01475\ \ \ \ \ \{}
\DoxyCodeLine{01476\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::shared\_ptr<ReferenceExecutor>(}
\DoxyCodeLine{01477\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{new}\ ReferenceExecutor(std::move(\doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}})));}
\DoxyCodeLine{01478\ \ \ \ \ \}}
\DoxyCodeLine{01479\ }
\DoxyCodeLine{01480\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\_device\_id\_guard}}\ get\_scoped\_device\_id\_guard()\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01481\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01482\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \{\textcolor{keyword}{this},\ 0\};}
\DoxyCodeLine{01483\ \ \ \ \ \}}
\DoxyCodeLine{01484\ }
\DoxyCodeLine{01485\ \ \ \ \ std::string\ \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_a84e5353b33e9d648476aed0e76999358}{get\_description}}()\textcolor{keyword}{\ const\ override\ }\{\ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}ReferenceExecutor"{}};\ \}}
\DoxyCodeLine{01486\ }
\DoxyCodeLine{01487\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_a82b41b42dbd26e8ac5b0146de79e5d34}{run}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}}\&\ op)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01488\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01489\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ \doxymbox{\hyperlink{namespacegko_1_1log}{log<log::Logger::operation\_launched>}}(\textcolor{keyword}{this},\ \&op);}
\DoxyCodeLine{01490\ \ \ \ \ \ \ \ \ op.run(std::static\_pointer\_cast<const\ ReferenceExecutor>(}
\DoxyCodeLine{01491\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>shared\_from\_this()));}
\DoxyCodeLine{01492\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ \doxymbox{\hyperlink{namespacegko_1_1log}{log<log::Logger::operation\_completed>}}(\textcolor{keyword}{this},\ \&op);}
\DoxyCodeLine{01493\ \ \ \ \ \}}
\DoxyCodeLine{01494\ }
\DoxyCodeLine{01495\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{01496\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor}{ReferenceExecutor}}(std::shared\_ptr<CpuAllocatorBase>\ alloc)}
\DoxyCodeLine{01497\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1OmpExecutor}{OmpExecutor}}\{\doxymbox{\hyperlink{namespacestd}{std}}::move(alloc)\}}
\DoxyCodeLine{01498\ \ \ \ \ \{}
\DoxyCodeLine{01499\ \ \ \ \ \ \ \ \ this-\/>ReferenceExecutor::populate\_exec\_info(}
\DoxyCodeLine{01500\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1machine__topology_a78ca968f9890a1e3d6758136ead05982}{machine\_topology::get\_instance}}());}
\DoxyCodeLine{01501\ \ \ \ \ \}}
\DoxyCodeLine{01502\ }
\DoxyCodeLine{01503\ \ \ \ \ \textcolor{keywordtype}{void}\ populate\_exec\_info(\textcolor{keyword}{const}\ machine\_topology*)\textcolor{keyword}{\ override}}
\DoxyCodeLine{01504\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01505\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().device\_id\ =\ -\/1;}
\DoxyCodeLine{01506\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_computing\_units\ =\ 1;}
\DoxyCodeLine{01507\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_pu\_per\_cu\ =\ 1;}
\DoxyCodeLine{01508\ \ \ \ \ \}}
\DoxyCodeLine{01509\ }
\DoxyCodeLine{01510\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_from(\textcolor{keyword}{const}\ Executor*\ src\_exec)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{01511\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01512\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ src\_exec-\/>verify\_memory\_to(\textcolor{keyword}{this});}
\DoxyCodeLine{01513\ \ \ \ \ \}}
\DoxyCodeLine{01514\ }
\DoxyCodeLine{01515\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(ReferenceExecutor,\ \textcolor{keyword}{true});}
\DoxyCodeLine{01516\ }
\DoxyCodeLine{01517\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(OmpExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01518\ }
\DoxyCodeLine{01519\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(DpcppExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01520\ }
\DoxyCodeLine{01521\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(CudaExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01522\ }
\DoxyCodeLine{01523\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(HipExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01524\ \};}
\DoxyCodeLine{01525\ }
\DoxyCodeLine{01526\ }
\DoxyCodeLine{01527\ \textcolor{keyword}{namespace\ }kernels\ \{}
\DoxyCodeLine{01528\ \textcolor{keyword}{namespace\ }reference\ \{}
\DoxyCodeLine{01529\ \textcolor{keyword}{using\ }DefaultExecutor\ =\ ReferenceExecutor;}
\DoxyCodeLine{01530\ \}\ \ \textcolor{comment}{//\ namespace\ reference}}
\DoxyCodeLine{01531\ \}\ \ \textcolor{comment}{//\ namespace\ kernels}}
\DoxyCodeLine{01532\ }
\DoxyCodeLine{01533\ }
\DoxyCodeLine{01540\ \textcolor{keyword}{class\ }CudaExecutor\ :\ \textcolor{keyword}{public}\ detail::ExecutorBase<CudaExecutor>,}
\DoxyCodeLine{01541\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ std::enable\_shared\_from\_this<CudaExecutor>,}
\DoxyCodeLine{01542\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ detail::EnableDeviceReset\ \{}
\DoxyCodeLine{01543\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }detail::ExecutorBase<CudaExecutor>;}
\DoxyCodeLine{01544\ }
\DoxyCodeLine{01545\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01546\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{Executor::run}};}
\DoxyCodeLine{01547\ }
\DoxyCodeLine{01559\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{01560\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}calling\ this\ CudaExecutor::create\ method\ is\ deprecated,\ because"{}}}
\DoxyCodeLine{01561\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}device\_reset\ no\ longer\ has\ an\ effect"{}}}
\DoxyCodeLine{01562\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}call\ CudaExecutor::create("{}}}
\DoxyCodeLine{01563\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ int\ device\_id,\ std::shared\_ptr<Executor>\ master,"{}}}
\DoxyCodeLine{01564\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ std::shared\_ptr<CudaAllocatorBase>\ alloc,"{}}}
\DoxyCodeLine{01565\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ CUstream\_st*\ stream);"{}}}
\DoxyCodeLine{01566\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}instead"{}})}
\DoxyCodeLine{01567\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<CudaExecutor>\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}{create}}(}
\DoxyCodeLine{01568\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id,\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ master,\ \textcolor{keywordtype}{bool}\ device\_reset,}
\DoxyCodeLine{01569\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ alloc\_mode\ =\ default\_cuda\_alloc\_mode,}
\DoxyCodeLine{01570\ \ \ \ \ \ \ \ \ CUstream\_st*\ stream\ =\ \textcolor{keywordtype}{nullptr});}
\DoxyCodeLine{01571\ }
\DoxyCodeLine{01581\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<CudaExecutor>\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}{create}}(}
\DoxyCodeLine{01582\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id,\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ master,}
\DoxyCodeLine{01583\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1CudaAllocatorBase}{CudaAllocatorBase}}>\ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}\ =}
\DoxyCodeLine{01584\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::make\_shared<\doxymbox{\hyperlink{classgko_1_1CudaAllocator}{CudaAllocator}}>(),}
\DoxyCodeLine{01585\ \ \ \ \ \ \ \ \ CUstream\_st*\ stream\ =\ \textcolor{keywordtype}{nullptr});}
\DoxyCodeLine{01586\ }
\DoxyCodeLine{01587\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}{get\_master}}()\ noexcept\ override;}
\DoxyCodeLine{01588\ }
\DoxyCodeLine{01589\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}{get\_master}}()\ const\ noexcept\ override;}
\DoxyCodeLine{01590\ }
\DoxyCodeLine{01591\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a903cf7e3460b14677c0bce5ca08a1b81}{synchronize}}()\ const\ override;}
\DoxyCodeLine{01592\ }
\DoxyCodeLine{01593\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\_device\_id\_guard}}\ get\_scoped\_device\_id\_guard()\ const\ override;}
\DoxyCodeLine{01594\ }
\DoxyCodeLine{01595\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{string}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_ac429a47e4fab2f11df0dd09fc9652a19}{get\_description}}()\ const\ override;}
\DoxyCodeLine{01596\ }
\DoxyCodeLine{01600\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a7cfa915eadd2329eb897dc1ee2712488}{get\_device\_id}}()\ const\ noexcept}
\DoxyCodeLine{01601\ \ \ \ \ \{}
\DoxyCodeLine{01602\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().device\_id;}
\DoxyCodeLine{01603\ \ \ \ \ \}}
\DoxyCodeLine{01604\ }
\DoxyCodeLine{01608\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aef0258494d14de0e56149b920c5173e5}{get\_num\_devices}}();}
\DoxyCodeLine{01609\ }
\DoxyCodeLine{01613\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a245c1c35a18e6534d87ef6e9cad24f7c}{get\_num\_warps\_per\_sm}}()\ const\ noexcept}
\DoxyCodeLine{01614\ \ \ \ \ \{}
\DoxyCodeLine{01615\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_pu\_per\_cu;}
\DoxyCodeLine{01616\ \ \ \ \ \}}
\DoxyCodeLine{01617\ }
\DoxyCodeLine{01621\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a449c2bf9c51b58a04fdb8b4a73377820}{get\_num\_multiprocessor}}()\ const\ noexcept}
\DoxyCodeLine{01622\ \ \ \ \ \{}
\DoxyCodeLine{01623\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units;}
\DoxyCodeLine{01624\ \ \ \ \ \}}
\DoxyCodeLine{01625\ }
\DoxyCodeLine{01629\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aa9d77db0b87322a8bef12380029b5310}{get\_num\_warps}}()\ const\ noexcept}
\DoxyCodeLine{01630\ \ \ \ \ \{}
\DoxyCodeLine{01631\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units\ *}
\DoxyCodeLine{01632\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_pu\_per\_cu;}
\DoxyCodeLine{01633\ \ \ \ \ \}}
\DoxyCodeLine{01634\ }
\DoxyCodeLine{01638\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6a3894e9f4d98b5f7523e067c88ef521}{get\_warp\_size}}()\ const\ noexcept}
\DoxyCodeLine{01639\ \ \ \ \ \{}
\DoxyCodeLine{01640\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().max\_subgroup\_size;}
\DoxyCodeLine{01641\ \ \ \ \ \}}
\DoxyCodeLine{01642\ }
\DoxyCodeLine{01646\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a3868f53f82b6398acb1ba1f9647a6e46}{get\_major\_version}}()\ const\ noexcept}
\DoxyCodeLine{01647\ \ \ \ \ \{}
\DoxyCodeLine{01648\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().major;}
\DoxyCodeLine{01649\ \ \ \ \ \}}
\DoxyCodeLine{01650\ }
\DoxyCodeLine{01654\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aa7d7a5cd7aeb38b8ab8fe3e4d1538481}{get\_minor\_version}}()\ const\ noexcept}
\DoxyCodeLine{01655\ \ \ \ \ \{}
\DoxyCodeLine{01656\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().minor;}
\DoxyCodeLine{01657\ \ \ \ \ \}}
\DoxyCodeLine{01658\ }
\DoxyCodeLine{01662\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a0e4dc9ea3719ebd8fe9e393629bf6c7c}{get\_compute\_capability}}()\ const\ noexcept}
\DoxyCodeLine{01663\ \ \ \ \ \{}
\DoxyCodeLine{01664\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>\doxymbox{\hyperlink{classgko_1_1CudaExecutor_a3868f53f82b6398acb1ba1f9647a6e46}{get\_major\_version}}()\ *\ 10\ +\ this-\/>\doxymbox{\hyperlink{classgko_1_1CudaExecutor_aa7d7a5cd7aeb38b8ab8fe3e4d1538481}{get\_minor\_version}}();}
\DoxyCodeLine{01665\ \ \ \ \ \}}
\DoxyCodeLine{01666\ }
\DoxyCodeLine{01672\ \ \ \ \ GKO\_DEPRECATED(\textcolor{stringliteral}{"{}use\ get\_blas\_handle()\ instead"{}})}
\DoxyCodeLine{01673\ \ \ \ \ cublasContext*\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a}{get\_cublas\_handle}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a1251802b1fa34107d00927e8bd3bd9a2}{get\_blas\_handle}}();\ \}}
\DoxyCodeLine{01674\ }
\DoxyCodeLine{01678\ \ \ \ \ cublasContext*\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a1251802b1fa34107d00927e8bd3bd9a2}{get\_blas\_handle}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ cublas\_handle\_.get();\ \}}
\DoxyCodeLine{01679\ }
\DoxyCodeLine{01685\ \ \ \ \ GKO\_DEPRECATED(\textcolor{stringliteral}{"{}use\ get\_sparselib\_handle()\ instead"{}})}
\DoxyCodeLine{01686\ \ \ \ \ cusparseContext*\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006}{get\_cusparse\_handle}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01687\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01688\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a0d41c86eba6b19b906bf3044c8f5bec2}{get\_sparselib\_handle}}();}
\DoxyCodeLine{01689\ \ \ \ \ \}}
\DoxyCodeLine{01690\ }
\DoxyCodeLine{01694\ \ \ \ \ cusparseContext*\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a0d41c86eba6b19b906bf3044c8f5bec2}{get\_sparselib\_handle}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01695\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01696\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ cusparse\_handle\_.get();}
\DoxyCodeLine{01697\ \ \ \ \ \}}
\DoxyCodeLine{01698\ }
\DoxyCodeLine{01704\ \ \ \ \ std::vector<int>\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a14c70ca95b76c22ec3c5857e04cfea8e}{get\_closest\_pus}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01705\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01706\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().closest\_pu\_ids;}
\DoxyCodeLine{01707\ \ \ \ \ \}}
\DoxyCodeLine{01708\ }
\DoxyCodeLine{01714\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a23a13ee1b82ea850660da25376d6cf4e}{get\_closest\_numa}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().numa\_node;\ \}}
\DoxyCodeLine{01715\ }
\DoxyCodeLine{01722\ \ \ \ \ CUstream\_st*\ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a935159e4376a4cd01408af020d0fc627}{get\_stream}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ stream\_;\ \}}
\DoxyCodeLine{01723\ }
\DoxyCodeLine{01724\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{01725\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_gpu\_property();}
\DoxyCodeLine{01726\ }
\DoxyCodeLine{01727\ \ \ \ \ \textcolor{keywordtype}{void}\ init\_handles();}
\DoxyCodeLine{01728\ }
\DoxyCodeLine{01729\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1CudaExecutor}{CudaExecutor}}(\textcolor{keywordtype}{int}\ device\_id,\ std::shared\_ptr<Executor>\ master,}
\DoxyCodeLine{01730\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<CudaAllocatorBase>\ alloc,\ CUstream\_st*\ stream)}
\DoxyCodeLine{01731\ \ \ \ \ \ \ \ \ :\ master\_(master),\ alloc\_\{\doxymbox{\hyperlink{namespacestd}{std}}::move(alloc)\},\ stream\_\{stream\}}
\DoxyCodeLine{01732\ \ \ \ \ \{}
\DoxyCodeLine{01733\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().device\_id\ =\ device\_id;}
\DoxyCodeLine{01734\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_computing\_units\ =\ 0;}
\DoxyCodeLine{01735\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_pu\_per\_cu\ =\ 0;}
\DoxyCodeLine{01736\ \ \ \ \ \ \ \ \ this-\/>CudaExecutor::populate\_exec\_info(}
\DoxyCodeLine{01737\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1machine__topology_a78ca968f9890a1e3d6758136ead05982}{machine\_topology::get\_instance}}());}
\DoxyCodeLine{01738\ \ \ \ \ \ \ \ \ this-\/>set\_gpu\_property();}
\DoxyCodeLine{01739\ \ \ \ \ \ \ \ \ this-\/>init\_handles();}
\DoxyCodeLine{01740\ \ \ \ \ \}}
\DoxyCodeLine{01741\ }
\DoxyCodeLine{01742\ \ \ \ \ \textcolor{keywordtype}{void}*\ raw\_alloc(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01743\ }
\DoxyCodeLine{01744\ \ \ \ \ \textcolor{keywordtype}{void}\ raw\_free(\textcolor{keywordtype}{void}*\ ptr)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \textcolor{keyword}{override};}
\DoxyCodeLine{01745\ }
\DoxyCodeLine{01746\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_OVERRIDE\_RAW\_COPY\_TO);}
\DoxyCodeLine{01747\ }
\DoxyCodeLine{01748\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(OmpExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01749\ }
\DoxyCodeLine{01750\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(ReferenceExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01751\ }
\DoxyCodeLine{01752\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(DpcppExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01753\ }
\DoxyCodeLine{01754\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ HipExecutor*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01755\ }
\DoxyCodeLine{01756\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ CudaExecutor*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01757\ }
\DoxyCodeLine{01758\ \ \ \ \ \textcolor{keywordtype}{void}\ populate\_exec\_info(\textcolor{keyword}{const}\ machine\_topology*\ mach\_topo)\ \textcolor{keyword}{override};}
\DoxyCodeLine{01759\ }
\DoxyCodeLine{01760\ \textcolor{keyword}{private}:}
\DoxyCodeLine{01761\ \ \ \ \ std::shared\_ptr<Executor>\ master\_;}
\DoxyCodeLine{01762\ }
\DoxyCodeLine{01763\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{01764\ \ \ \ \ \textcolor{keyword}{using\ }handle\_manager\ =\ std::unique\_ptr<T,\ std::function<void(T*)>>;}
\DoxyCodeLine{01765\ \ \ \ \ handle\_manager<cublasContext>\ cublas\_handle\_;}
\DoxyCodeLine{01766\ \ \ \ \ handle\_manager<cusparseContext>\ cusparse\_handle\_;}
\DoxyCodeLine{01767\ \ \ \ \ std::shared\_ptr<CudaAllocatorBase>\ alloc\_;}
\DoxyCodeLine{01768\ \ \ \ \ CUstream\_st*\ stream\_;}
\DoxyCodeLine{01769\ \};}
\DoxyCodeLine{01770\ }
\DoxyCodeLine{01771\ }
\DoxyCodeLine{01772\ \textcolor{keyword}{namespace\ }kernels\ \{}
\DoxyCodeLine{01773\ \textcolor{keyword}{namespace\ }cuda\ \{}
\DoxyCodeLine{01774\ \textcolor{keyword}{using\ }DefaultExecutor\ =\ CudaExecutor;}
\DoxyCodeLine{01775\ \}\ \ \textcolor{comment}{//\ namespace\ cuda}}
\DoxyCodeLine{01776\ \}\ \ \textcolor{comment}{//\ namespace\ kernels}}
\DoxyCodeLine{01777\ }
\DoxyCodeLine{01778\ }
\DoxyCodeLine{01785\ \textcolor{keyword}{class\ }HipExecutor\ :\ \textcolor{keyword}{public}\ detail::ExecutorBase<HipExecutor>,}
\DoxyCodeLine{01786\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ std::enable\_shared\_from\_this<HipExecutor>,}
\DoxyCodeLine{01787\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ detail::EnableDeviceReset\ \{}
\DoxyCodeLine{01788\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }detail::ExecutorBase<HipExecutor>;}
\DoxyCodeLine{01789\ }
\DoxyCodeLine{01790\ \textcolor{keyword}{public}:}
\DoxyCodeLine{01791\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{Executor::run}};}
\DoxyCodeLine{01792\ }
\DoxyCodeLine{01804\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{01805\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}device\_reset\ is\ deprecated\ entirely,\ call\ hipDeviceReset\ directly.\ "{}}}
\DoxyCodeLine{01806\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}alloc\_mode\ was\ replaced\ by\ the\ Allocator\ type\ "{}}}
\DoxyCodeLine{01807\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}hierarchy."{}})}
\DoxyCodeLine{01808\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<HipExecutor>\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a8afc5210bf8dd8aedfceab4b73f0047b}{create}}(}
\DoxyCodeLine{01809\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id,\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ master,\ \textcolor{keywordtype}{bool}\ device\_reset,}
\DoxyCodeLine{01810\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\_mode}}\ alloc\_mode\ =\ default\_hip\_alloc\_mode,}
\DoxyCodeLine{01811\ \ \ \ \ \ \ \ \ GKO\_HIP\_STREAM\_STRUCT*\ stream\ =\ \textcolor{keywordtype}{nullptr});}
\DoxyCodeLine{01812\ }
\DoxyCodeLine{01813\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<HipExecutor>\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a8afc5210bf8dd8aedfceab4b73f0047b}{create}}(}
\DoxyCodeLine{01814\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id,\ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ master,}
\DoxyCodeLine{01815\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1HipAllocatorBase}{HipAllocatorBase}}>\ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}\ =}
\DoxyCodeLine{01816\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::make\_shared<\doxymbox{\hyperlink{classgko_1_1HipAllocator}{HipAllocator}}>(),}
\DoxyCodeLine{01817\ \ \ \ \ \ \ \ \ GKO\_HIP\_STREAM\_STRUCT*\ stream\ =\ \textcolor{keywordtype}{nullptr});}
\DoxyCodeLine{01818\ }
\DoxyCodeLine{01819\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<\doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_aa7f1d797dbce7f64f0bd458d55b42db5}{get\_master}}()\ noexcept\ override;}
\DoxyCodeLine{01820\ }
\DoxyCodeLine{01821\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_aa7f1d797dbce7f64f0bd458d55b42db5}{get\_master}}()\ const\ noexcept\ override;}
\DoxyCodeLine{01822\ }
\DoxyCodeLine{01823\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a0ea0ec8722767138953110b52d325b4a}{synchronize}}()\ const\ override;}
\DoxyCodeLine{01824\ }
\DoxyCodeLine{01825\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\_device\_id\_guard}}\ get\_scoped\_device\_id\_guard()\ const\ override;}
\DoxyCodeLine{01826\ }
\DoxyCodeLine{01827\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{string}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a205464163af208922487c35a6d198418}{get\_description}}()\ const\ override;}
\DoxyCodeLine{01828\ }
\DoxyCodeLine{01832\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a37a35665c3983e56105c6acea9de73c6}{get\_device\_id}}()\ const\ noexcept}
\DoxyCodeLine{01833\ \ \ \ \ \{}
\DoxyCodeLine{01834\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().device\_id;}
\DoxyCodeLine{01835\ \ \ \ \ \}}
\DoxyCodeLine{01836\ }
\DoxyCodeLine{01840\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a7b34cbd84692dafa2290e6630754aa97}{get\_num\_devices}}();}
\DoxyCodeLine{01841\ }
\DoxyCodeLine{01845\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a43bc417378f1c0f07ef49d2856ddd37c}{get\_num\_warps\_per\_sm}}()\ const\ noexcept}
\DoxyCodeLine{01846\ \ \ \ \ \{}
\DoxyCodeLine{01847\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_pu\_per\_cu;}
\DoxyCodeLine{01848\ \ \ \ \ \}}
\DoxyCodeLine{01849\ }
\DoxyCodeLine{01853\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_ac69c763f9d90e948d03ed1e5ed23903c}{get\_num\_multiprocessor}}()\ const\ noexcept}
\DoxyCodeLine{01854\ \ \ \ \ \{}
\DoxyCodeLine{01855\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units;}
\DoxyCodeLine{01856\ \ \ \ \ \}}
\DoxyCodeLine{01857\ }
\DoxyCodeLine{01861\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a4cdda4e0d7031ab353555193927d0975}{get\_major\_version}}()\ const\ noexcept}
\DoxyCodeLine{01862\ \ \ \ \ \{}
\DoxyCodeLine{01863\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().major;}
\DoxyCodeLine{01864\ \ \ \ \ \}}
\DoxyCodeLine{01865\ }
\DoxyCodeLine{01869\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a78f3bfa05f6d38c286309436781a6f7a}{get\_minor\_version}}()\ const\ noexcept}
\DoxyCodeLine{01870\ \ \ \ \ \{}
\DoxyCodeLine{01871\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().minor;}
\DoxyCodeLine{01872\ \ \ \ \ \}}
\DoxyCodeLine{01873\ }
\DoxyCodeLine{01877\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_add2eb69abc3225f1ab7e5b01d9ebb307}{get\_num\_warps}}()\ const\ noexcept}
\DoxyCodeLine{01878\ \ \ \ \ \{}
\DoxyCodeLine{01879\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units\ *}
\DoxyCodeLine{01880\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_pu\_per\_cu;}
\DoxyCodeLine{01881\ \ \ \ \ \}}
\DoxyCodeLine{01882\ }
\DoxyCodeLine{01886\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_ae470cdfd4273b02b2563101d6146db26}{get\_warp\_size}}()\ const\ noexcept}
\DoxyCodeLine{01887\ \ \ \ \ \{}
\DoxyCodeLine{01888\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().max\_subgroup\_size;}
\DoxyCodeLine{01889\ \ \ \ \ \}}
\DoxyCodeLine{01890\ }
\DoxyCodeLine{01896\ \ \ \ \ GKO\_DEPRECATED(\textcolor{stringliteral}{"{}use\ get\_blas\_handle()\ instead"{}})}
\DoxyCodeLine{01897\ \ \ \ \ hipblasContext*\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_aecd53c50e8c23e18a0ee9b1907a6f936}{get\_hipblas\_handle}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_ac9f490d7994dc2449d89b23e1470e10f}{get\_blas\_handle}}();\ \}}
\DoxyCodeLine{01898\ }
\DoxyCodeLine{01902\ \ \ \ \ hipblasContext*\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_ac9f490d7994dc2449d89b23e1470e10f}{get\_blas\_handle}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ hipblas\_handle\_.get();\ \}}
\DoxyCodeLine{01903\ }
\DoxyCodeLine{01909\ \ \ \ \ GKO\_DEPRECATED(\textcolor{stringliteral}{"{}use\ get\_sparselib\_handle()\ instead"{}})}
\DoxyCodeLine{01910\ \ \ \ \ hipsparseContext*\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_addb09880cd9944899e1115636598cc06}{get\_hipsparse\_handle}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01911\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01912\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_aa6f204632ad7562b49d72675024ea2d7}{get\_sparselib\_handle}}();}
\DoxyCodeLine{01913\ \ \ \ \ \}}
\DoxyCodeLine{01914\ }
\DoxyCodeLine{01918\ \ \ \ \ hipsparseContext*\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_aa6f204632ad7562b49d72675024ea2d7}{get\_sparselib\_handle}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01919\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01920\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ hipsparse\_handle\_.get();}
\DoxyCodeLine{01921\ \ \ \ \ \}}
\DoxyCodeLine{01922\ }
\DoxyCodeLine{01928\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_ae39be6e255dfe5ecf6fe542da914afec}{get\_closest\_numa}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().numa\_node;\ \}}
\DoxyCodeLine{01929\ }
\DoxyCodeLine{01935\ \ \ \ \ std::vector<int>\ \doxymbox{\hyperlink{classgko_1_1HipExecutor_a739d2395233434cb6fbf9e90684ca052}{get\_closest\_pus}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{01936\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{01937\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().closest\_pu\_ids;}
\DoxyCodeLine{01938\ \ \ \ \ \}}
\DoxyCodeLine{01939\ }
\DoxyCodeLine{01940\ \ \ \ \ GKO\_HIP\_STREAM\_STRUCT*\ get\_stream()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ stream\_;\ \}}
\DoxyCodeLine{01941\ }
\DoxyCodeLine{01942\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{01943\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_gpu\_property();}
\DoxyCodeLine{01944\ }
\DoxyCodeLine{01945\ \ \ \ \ \textcolor{keywordtype}{void}\ init\_handles();}
\DoxyCodeLine{01946\ }
\DoxyCodeLine{01947\ \ \ \ \ HipExecutor(\textcolor{keywordtype}{int}\ device\_id,\ std::shared\_ptr<Executor>\ master,}
\DoxyCodeLine{01948\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<HipAllocatorBase>\ alloc,}
\DoxyCodeLine{01949\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_HIP\_STREAM\_STRUCT*\ stream)}
\DoxyCodeLine{01950\ \ \ \ \ \ \ \ \ :\ master\_\{\doxymbox{\hyperlink{namespacestd}{std}}::move(master)\},\ alloc\_\{\doxymbox{\hyperlink{namespacestd}{std}}::move(alloc)\},\ stream\_\{stream\}}
\DoxyCodeLine{01951\ \ \ \ \ \{}
\DoxyCodeLine{01952\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().device\_id\ =\ device\_id;}
\DoxyCodeLine{01953\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_computing\_units\ =\ 0;}
\DoxyCodeLine{01954\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_pu\_per\_cu\ =\ 0;}
\DoxyCodeLine{01955\ \ \ \ \ \ \ \ \ this-\/>HipExecutor::populate\_exec\_info(machine\_topology::get\_instance());}
\DoxyCodeLine{01956\ \ \ \ \ \ \ \ \ this-\/>set\_gpu\_property();}
\DoxyCodeLine{01957\ \ \ \ \ \ \ \ \ this-\/>init\_handles();}
\DoxyCodeLine{01958\ \ \ \ \ \}}
\DoxyCodeLine{01959\ }
\DoxyCodeLine{01960\ \ \ \ \ \textcolor{keywordtype}{void}*\ raw\_alloc(size\_type\ size)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01961\ }
\DoxyCodeLine{01962\ \ \ \ \ \textcolor{keywordtype}{void}\ raw\_free(\textcolor{keywordtype}{void}*\ ptr)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \textcolor{keyword}{override};}
\DoxyCodeLine{01963\ }
\DoxyCodeLine{01964\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_OVERRIDE\_RAW\_COPY\_TO);}
\DoxyCodeLine{01965\ }
\DoxyCodeLine{01966\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(OmpExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01967\ }
\DoxyCodeLine{01968\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(ReferenceExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01969\ }
\DoxyCodeLine{01970\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(DpcppExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{01971\ }
\DoxyCodeLine{01972\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ CudaExecutor*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01973\ }
\DoxyCodeLine{01974\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ HipExecutor*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{01975\ }
\DoxyCodeLine{01976\ \ \ \ \ \textcolor{keywordtype}{void}\ populate\_exec\_info(\textcolor{keyword}{const}\ machine\_topology*\ mach\_topo)\ \textcolor{keyword}{override};}
\DoxyCodeLine{01977\ }
\DoxyCodeLine{01978\ \textcolor{keyword}{private}:}
\DoxyCodeLine{01979\ \ \ \ \ std::shared\_ptr<Executor>\ master\_;}
\DoxyCodeLine{01980\ }
\DoxyCodeLine{01981\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{01982\ \ \ \ \ \textcolor{keyword}{using\ }handle\_manager\ =\ std::unique\_ptr<T,\ std::function<void(T*)>>;}
\DoxyCodeLine{01983\ \ \ \ \ handle\_manager<hipblasContext>\ hipblas\_handle\_;}
\DoxyCodeLine{01984\ \ \ \ \ handle\_manager<hipsparseContext>\ hipsparse\_handle\_;}
\DoxyCodeLine{01985\ \ \ \ \ std::shared\_ptr<HipAllocatorBase>\ alloc\_;}
\DoxyCodeLine{01986\ \ \ \ \ GKO\_HIP\_STREAM\_STRUCT*\ stream\_;}
\DoxyCodeLine{01987\ \};}
\DoxyCodeLine{01988\ }
\DoxyCodeLine{01989\ }
\DoxyCodeLine{01990\ \textcolor{keyword}{namespace\ }kernels\ \{}
\DoxyCodeLine{01991\ \textcolor{keyword}{namespace\ }hip\ \{}
\DoxyCodeLine{01992\ \textcolor{keyword}{using\ }DefaultExecutor\ =\ HipExecutor;}
\DoxyCodeLine{01993\ \}\ \ \textcolor{comment}{//\ namespace\ hip}}
\DoxyCodeLine{01994\ \}\ \ \textcolor{comment}{//\ namespace\ kernels}}
\DoxyCodeLine{01995\ }
\DoxyCodeLine{01996\ }
\DoxyCodeLine{02003\ \textcolor{keyword}{class\ }DpcppExecutor\ :\ \textcolor{keyword}{public}\ detail::ExecutorBase<DpcppExecutor>,}
\DoxyCodeLine{02004\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ std::enable\_shared\_from\_this<DpcppExecutor>\ \{}
\DoxyCodeLine{02005\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }detail::ExecutorBase<DpcppExecutor>;}
\DoxyCodeLine{02006\ }
\DoxyCodeLine{02007\ \textcolor{keyword}{public}:}
\DoxyCodeLine{02008\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{Executor::run}};}
\DoxyCodeLine{02009\ }
\DoxyCodeLine{02019\ \ \ \ \ \textcolor{keyword}{static}\ std::shared\_ptr<DpcppExecutor>\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_af69a356ee07f641010df5d2e9e518bb0}{create}}(}
\DoxyCodeLine{02020\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id,\ std::shared\_ptr<Executor>\ master,}
\DoxyCodeLine{02021\ \ \ \ \ \ \ \ \ std::string\ device\_type\ =\ \textcolor{stringliteral}{"{}all"{}},}
\DoxyCodeLine{02022\ \ \ \ \ \ \ \ \ dpcpp\_queue\_property\ property\ =\ dpcpp\_queue\_property::in\_order);}
\DoxyCodeLine{02023\ }
\DoxyCodeLine{02024\ \ \ \ \ std::shared\_ptr<Executor>\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a97089607eb590386ab646edea67d58cb}{get\_master}}()\ noexcept\ override;}
\DoxyCodeLine{02025\ }
\DoxyCodeLine{02026\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a97089607eb590386ab646edea67d58cb}{get\_master}}()\ const\ noexcept\ override;}
\DoxyCodeLine{02027\ }
\DoxyCodeLine{02028\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a6b2a82c46748ddbf097fa2da3ec64d90}{synchronize}}()\ const\ override;}
\DoxyCodeLine{02029\ }
\DoxyCodeLine{02030\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\_device\_id\_guard}}\ get\_scoped\_device\_id\_guard()\ const\ override;}
\DoxyCodeLine{02031\ }
\DoxyCodeLine{02032\ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{string}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a30330475d4668e72586456434171b6d6}{get\_description}}()\ const\ override;}
\DoxyCodeLine{02033\ }
\DoxyCodeLine{02039\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_aefdd7095f2d18ff8e4ab8354006f305b}{get\_device\_id}}()\ const\ noexcept}
\DoxyCodeLine{02040\ \ \ \ \ \{}
\DoxyCodeLine{02041\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().device\_id;}
\DoxyCodeLine{02042\ \ \ \ \ \}}
\DoxyCodeLine{02043\ }
\DoxyCodeLine{02044\ \ \ \ \ sycl::queue*\ get\_queue()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ queue\_.get();\ \}}
\DoxyCodeLine{02045\ }
\DoxyCodeLine{02053\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_adf306338233c8e8aca0dec96aefe5d93}{get\_num\_devices}}(std::string\ device\_type);}
\DoxyCodeLine{02054\ }
\DoxyCodeLine{02060\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<int>\&\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a04ffb17d22dd9c0f970f25fb77535f33}{get\_subgroup\_sizes}}()\ const\ noexcept}
\DoxyCodeLine{02061\ \ \ \ \ \{}
\DoxyCodeLine{02062\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().subgroup\_sizes;}
\DoxyCodeLine{02063\ \ \ \ \ \}}
\DoxyCodeLine{02064\ }
\DoxyCodeLine{02070\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a1a9ef86016a05905955e2d05812bf00d}{get\_num\_computing\_units}}()\ const\ noexcept}
\DoxyCodeLine{02071\ \ \ \ \ \{}
\DoxyCodeLine{02072\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units;}
\DoxyCodeLine{02073\ \ \ \ \ \}}
\DoxyCodeLine{02074\ }
\DoxyCodeLine{02078\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a5539608a0027a5ff6b1330d9595e7e58}{get\_num\_subgroups}}()\ const\ noexcept}
\DoxyCodeLine{02079\ \ \ \ \ \{}
\DoxyCodeLine{02080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().num\_computing\_units\ *}
\DoxyCodeLine{02081\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().num\_pu\_per\_cu;}
\DoxyCodeLine{02082\ \ \ \ \ \}}
\DoxyCodeLine{02083\ }
\DoxyCodeLine{02089\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<int>\&\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a7803d98c1a2ac3356468557ec6e08d3f}{get\_max\_workitem\_sizes}}()\ const\ noexcept}
\DoxyCodeLine{02090\ \ \ \ \ \{}
\DoxyCodeLine{02091\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().max\_workitem\_sizes;}
\DoxyCodeLine{02092\ \ \ \ \ \}}
\DoxyCodeLine{02093\ }
\DoxyCodeLine{02099\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a2a4b81ed45477d3c4d38a340cb994ec5}{get\_max\_workgroup\_size}}()\ const\ noexcept}
\DoxyCodeLine{02100\ \ \ \ \ \{}
\DoxyCodeLine{02101\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().max\_workgroup\_size;}
\DoxyCodeLine{02102\ \ \ \ \ \}}
\DoxyCodeLine{02103\ }
\DoxyCodeLine{02109\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_a950a8f15ace58f5f54af3a9b52a11998}{get\_max\_subgroup\_size}}()\ const\ noexcept}
\DoxyCodeLine{02110\ \ \ \ \ \{}
\DoxyCodeLine{02111\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().max\_subgroup\_size;}
\DoxyCodeLine{02112\ \ \ \ \ \}}
\DoxyCodeLine{02113\ }
\DoxyCodeLine{02119\ \ \ \ \ std::string\ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor_ab6ff2a7bc51dca54ef9cce5c836ade2f}{get\_device\_type}}()\ const\ noexcept}
\DoxyCodeLine{02120\ \ \ \ \ \{}
\DoxyCodeLine{02121\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>get\_exec\_info().device\_type;}
\DoxyCodeLine{02122\ \ \ \ \ \}}
\DoxyCodeLine{02123\ }
\DoxyCodeLine{02124\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{02125\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_device\_property(}
\DoxyCodeLine{02126\ \ \ \ \ \ \ \ \ dpcpp\_queue\_property\ property\ =\ dpcpp\_queue\_property::in\_order);}
\DoxyCodeLine{02127\ }
\DoxyCodeLine{02128\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1DpcppExecutor}{DpcppExecutor}}(}
\DoxyCodeLine{02129\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ device\_id,\ std::shared\_ptr<Executor>\ master,}
\DoxyCodeLine{02130\ \ \ \ \ \ \ \ \ std::string\ device\_type\ =\ \textcolor{stringliteral}{"{}all"{}},}
\DoxyCodeLine{02131\ \ \ \ \ \ \ \ \ dpcpp\_queue\_property\ property\ =\ dpcpp\_queue\_property::in\_order)}
\DoxyCodeLine{02132\ \ \ \ \ \ \ \ \ :\ master\_(master)}
\DoxyCodeLine{02133\ \ \ \ \ \{}
\DoxyCodeLine{02134\ \ \ \ \ \ \ \ \ std::for\_each(device\_type.begin(),\ device\_type.end(),}
\DoxyCodeLine{02135\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keywordtype}{char}\&\ c)\ \{\ c\ =\ std::tolower(c);\ \});}
\DoxyCodeLine{02136\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().device\_type\ =\ std::string(device\_type);}
\DoxyCodeLine{02137\ \ \ \ \ \ \ \ \ this-\/>get\_exec\_info().device\_id\ =\ device\_id;}
\DoxyCodeLine{02138\ \ \ \ \ \ \ \ \ this-\/>set\_device\_property(property);}
\DoxyCodeLine{02139\ \ \ \ \ \}}
\DoxyCodeLine{02140\ }
\DoxyCodeLine{02141\ \ \ \ \ \textcolor{keywordtype}{void}\ populate\_exec\_info(\textcolor{keyword}{const}\ machine\_topology*\ mach\_topo)\ \textcolor{keyword}{override};}
\DoxyCodeLine{02142\ }
\DoxyCodeLine{02143\ \ \ \ \ \textcolor{keywordtype}{void}*\ raw\_alloc(size\_type\ size)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{02144\ }
\DoxyCodeLine{02145\ \ \ \ \ \textcolor{keywordtype}{void}\ raw\_free(\textcolor{keywordtype}{void}*\ ptr)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}\ \textcolor{keyword}{override};}
\DoxyCodeLine{02146\ }
\DoxyCodeLine{02147\ \ \ \ \ GKO\_ENABLE\_FOR\_ALL\_EXECUTORS(GKO\_OVERRIDE\_RAW\_COPY\_TO);}
\DoxyCodeLine{02148\ }
\DoxyCodeLine{02149\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(CudaExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{02150\ }
\DoxyCodeLine{02151\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(HipExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{02152\ }
\DoxyCodeLine{02153\ \ \ \ \ GKO\_DEFAULT\_OVERRIDE\_VERIFY\_MEMORY(ReferenceExecutor,\ \textcolor{keyword}{false});}
\DoxyCodeLine{02154\ }
\DoxyCodeLine{02155\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ OmpExecutor*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{02156\ }
\DoxyCodeLine{02157\ \ \ \ \ \textcolor{keywordtype}{bool}\ verify\_memory\_to(\textcolor{keyword}{const}\ DpcppExecutor*\ dest\_exec)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{02158\ }
\DoxyCodeLine{02159\ \textcolor{keyword}{private}:}
\DoxyCodeLine{02160\ \ \ \ \ std::shared\_ptr<Executor>\ master\_;}
\DoxyCodeLine{02161\ }
\DoxyCodeLine{02162\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{02163\ \ \ \ \ \textcolor{keyword}{using\ }queue\_manager\ =\ std::unique\_ptr<T,\ std::function<void(T*)>>;}
\DoxyCodeLine{02164\ \ \ \ \ queue\_manager<sycl::queue>\ queue\_;}
\DoxyCodeLine{02165\ \};}
\DoxyCodeLine{02166\ }
\DoxyCodeLine{02167\ }
\DoxyCodeLine{02168\ \textcolor{keyword}{namespace\ }kernels\ \{}
\DoxyCodeLine{02169\ \textcolor{keyword}{namespace\ }dpcpp\ \{}
\DoxyCodeLine{02170\ \textcolor{keyword}{using\ }DefaultExecutor\ =\ DpcppExecutor;}
\DoxyCodeLine{02171\ \}\ \ \textcolor{comment}{//\ namespace\ dpcpp}}
\DoxyCodeLine{02172\ \}\ \ \textcolor{comment}{//\ namespace\ kernels}}
\DoxyCodeLine{02173\ }
\DoxyCodeLine{02174\ }
\DoxyCodeLine{02175\ \textcolor{preprocessor}{\#undef\ GKO\_OVERRIDE\_RAW\_COPY\_TO}}
\DoxyCodeLine{02176\ }
\DoxyCodeLine{02177\ }
\DoxyCodeLine{02178\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{02179\ }
\DoxyCodeLine{02180\ }
\DoxyCodeLine{02181\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_BASE\_EXECUTOR\_HPP\_}}

\end{DoxyCode}
