\doxysection{gko::\+experimental::\+distributed Namespace Reference}
\hypertarget{namespacegko_1_1experimental_1_1distributed}{}\label{namespacegko_1_1experimental_1_1distributed}\index{gko::experimental::distributed@{gko::experimental::distributed}}


The distributed namespace.  


\doxysubsubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_1_1preconditioner}{preconditioner}}
\begin{DoxyCompactList}\small\item\em The Preconditioner namespace. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}
\begin{DoxyCompactList}\small\item\em Represents a partition of a range of indices \+[0, size) into a disjoint set of parts. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1DistributedBase}{Distributed\+Base}}
\begin{DoxyCompactList}\small\item\em A base class for distributed objects. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map}{index\+\_\+map}}
\begin{DoxyCompactList}\small\item\em This class defines mappings between global and local indices. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector}}
\begin{DoxyCompactList}\small\item\em \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector} is a format which explicitly stores (multiple) distributed column vectors in a dense storage format. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Matrix}{Matrix}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1experimental_1_1distributed_1_1Matrix}{Matrix} class defines a (MPI-\/)distributed matrix. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1RowGatherer}{Row\+Gatherer}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1experimental_1_1distributed_1_1RowGatherer}{distributed::\+\+Row\+Gatherer} gathers the rows of \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{distributed::\+\+Vector} that are located on other processes. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a13b7760affb031fee59d385754eaaffb}\label{namespacegko_1_1experimental_1_1distributed_a13b7760affb031fee59d385754eaaffb} 
using {\bfseries comm\+\_\+index\+\_\+type}
\begin{DoxyCompactList}\small\item\em Make \doxylink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{mpi::\+comm\+\_\+index\+\_\+type} available in this namespace. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum class \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b}{index\+\_\+space}} \{ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947baf5ddaf0ca7929578b408c909429f68f2}{local}}
, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba9182221a9ec0a65321d5a206c9c174ca}{non\+\_\+local}}
, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba507d922378ecab8e10b81dcbc2ff8bf3}{combined}}
 \}
\begin{DoxyCompactList}\small\item\em Index space classification for the locally stored indices. \end{DoxyCompactList}\item 
enum class \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a4b66bc2bbe95fe0a818a5f4423acbb4e}{assembly\+\_\+mode}} \{ {\bfseries communicate}
, {\bfseries local\+\_\+only}
 \}
\begin{DoxyCompactList}\small\item\em \doxylink{namespacegko_1_1experimental_1_1distributed_a4b66bc2bbe95fe0a818a5f4423acbb4e}{assembly\+\_\+mode} defines how the read\+\_\+distributed function of the distributed matrix treats non-\/local indices in the (device\+\_\+)\doxylink{structgko_1_1matrix__data}{matrix\+\_\+data}:\+ \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Value\+Type$>$ }\\gko::\+detail::\+temporary\+\_\+conversion$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector}}$<$ Value\+Type $>$ $>$ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1}{make\+\_\+temporary\+\_\+conversion}} (\doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}})
\begin{DoxyCompactList}\small\item\em Convert the given \doxylink{classgko_1_1LinOp}{Lin\+Op} from \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$...$>$} to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Value\+Type$>$ }\\gko::\+detail::\+temporary\+\_\+conversion$<$ const \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector}}$<$ Value\+Type $>$ $>$ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a38521559ec782871cee97d15656cbd49}{make\+\_\+temporary\+\_\+conversion}} (const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}})
\begin{DoxyCompactList}\small\item\em Convert the given \doxylink{classgko_1_1LinOp}{Lin\+Op} from \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$...$>$} to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}.    \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Value\+Type, typename Function, typename... Args$>$ }\\void \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}{precision\+\_\+dispatch}} (Function fn, Args \texorpdfstring{$\ast$}{*}... linops)
\begin{DoxyCompactList}\small\item\em Calls the given function with each given argument \doxylink{classgko_1_1LinOp}{Lin\+Op} temporarily converted into \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$} as parameters. \end{DoxyCompactList}\item 
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a7663e792beec02510b042dc298681882}\label{namespacegko_1_1experimental_1_1distributed_a7663e792beec02510b042dc298681882} 
{\footnotesize template$<$typename Value\+Type, typename Function$>$ }\\void {\bfseries mixed\+\_\+precision\+\_\+dispatch} (Function fn, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}in, \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}out)
\item 
{\footnotesize template$<$typename Value\+Type, typename Function$>$ }\\void \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a6348d5cfc6451aa9f12509e5658de943}{precision\+\_\+dispatch\+\_\+real\+\_\+complex}} (Function fn, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}in, \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}out)
\begin{DoxyCompactList}\small\item\em Calls the given function with the given Lin\+Ops temporarily converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} as parameters. \end{DoxyCompactList}\item 
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a06178dd9c578230500c69926185cade6}\label{namespacegko_1_1experimental_1_1distributed_a06178dd9c578230500c69926185cade6} 
{\footnotesize template$<$typename Value\+Type, typename Function$>$ }\\void {\bfseries mixed\+\_\+precision\+\_\+dispatch\+\_\+real\+\_\+complex} (Function fn, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}in, \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}out)
\item 
{\footnotesize template$<$typename Value\+Type, typename Function$>$ }\\void \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a87ee066b077fed30ab6e2da949faef6e}{precision\+\_\+dispatch\+\_\+real\+\_\+complex}} (Function fn, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}alpha, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}in, \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}out)
\begin{DoxyCompactList}\small\item\em Calls the given function with the given Lin\+Ops temporarily converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} as parameters.    \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Value\+Type, typename Function$>$ }\\void \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a76b1f78aad396f2a87ae070e0b11c1f3}{precision\+\_\+dispatch\+\_\+real\+\_\+complex}} (Function fn, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}alpha, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}in, const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}beta, \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}out)
\begin{DoxyCompactList}\small\item\em Calls the given function with the given Lin\+Ops temporarily converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} as parameters.    \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Value\+Type, typename Local\+Index\+Type, typename Global\+Index\+Type$>$ }\\\doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data}}$<$ Value\+Type, Global\+Index\+Type $>$ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_aae57602561df89a74decb3316696981b}{assemble\+\_\+rows\+\_\+from\+\_\+neighbors}} (\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{mpi::\+communicator}} comm, const \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data}}$<$ Value\+Type, Global\+Index\+Type $>$ \&input, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}$<$ Local\+Index\+Type, Global\+Index\+Type $>$ $>$ partition)
\begin{DoxyCompactList}\small\item\em Assembles \doxylink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data} entries owned by this MPI rank from other ranks and communicates entries located on this MPI rank owned by other ranks to their respective owners. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Local\+Index\+Type, typename Global\+Index\+Type$>$ }\\std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}$<$ Local\+Index\+Type, Global\+Index\+Type $>$ $>$ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_ae0368295654a9d8455731832a88ffc8c}{build\+\_\+partition\+\_\+from\+\_\+local\+\_\+range}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{mpi::\+communicator}} comm, \doxymbox{\hyperlink{structgko_1_1span}{span}} local\+\_\+range)
\begin{DoxyCompactList}\small\item\em Builds a partition from a local range. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Local\+Index\+Type, typename Global\+Index\+Type$>$ }\\std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}$<$ Local\+Index\+Type, Global\+Index\+Type $>$ $>$ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a6fff69d2898fefe193012da079a2fef0}{build\+\_\+partition\+\_\+from\+\_\+local\+\_\+size}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{mpi::\+communicator}} comm, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} local\+\_\+size)
\begin{DoxyCompactList}\small\item\em Builds a partition from a local size. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The distributed namespace. 

\label{doc-enum-members}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_doc-enum-members}
\doxysubsection{Enumeration Type Documentation}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a4b66bc2bbe95fe0a818a5f4423acbb4e}\index{gko::experimental::distributed@{gko::experimental::distributed}!assembly\_mode@{assembly\_mode}}
\index{assembly\_mode@{assembly\_mode}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{assembly\_mode}{assembly\_mode}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a4b66bc2bbe95fe0a818a5f4423acbb4e} 
enum class \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a4b66bc2bbe95fe0a818a5f4423acbb4e}{gko::\+experimental::\+distributed::\+assembly\+\_\+mode}}\hspace{0.3cm}{\ttfamily [strong]}}



\doxylink{namespacegko_1_1experimental_1_1distributed_a4b66bc2bbe95fe0a818a5f4423acbb4e}{assembly\+\_\+mode} defines how the read\+\_\+distributed function of the distributed matrix treats non-\/local indices in the (device\+\_\+)\doxylink{structgko_1_1matrix__data}{matrix\+\_\+data}:\+ 


\begin{DoxyItemize}
\item {\ttfamily communicate} communicates the overlap between ranks and adds up all local contributions. Indices smaller than 0 or larger than the global size of the matrix are ignored.
\item {\ttfamily local\+\_\+only} does not communicate any overlap but ignores all non-\/local indices. 
\end{DoxyItemize}\Hypertarget{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b}\index{gko::experimental::distributed@{gko::experimental::distributed}!index\_space@{index\_space}}
\index{index\_space@{index\_space}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{index\_space}{index\_space}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b} 
enum class \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b}{gko::\+experimental::\+distributed::\+index\+\_\+space}}\hspace{0.3cm}{\ttfamily [strong]}}



Index space classification for the locally stored indices. 

The definitions of the enum values is clarified in \doxylink{classgko_1_1experimental_1_1distributed_1_1index__map}{index\+\_\+map}. \begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{local@{local}!gko::experimental::distributed@{gko::experimental::distributed}}
\index{gko::experimental::distributed@{gko::experimental::distributed}!local@{local}}
}\Hypertarget{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947baf5ddaf0ca7929578b408c909429f68f2}\label{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947baf5ddaf0ca7929578b408c909429f68f2} 
local&indices that are locally owned \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{non\_local@{non\_local}!gko::experimental::distributed@{gko::experimental::distributed}}
\index{gko::experimental::distributed@{gko::experimental::distributed}!non\_local@{non\_local}}
}\Hypertarget{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba9182221a9ec0a65321d5a206c9c174ca}\label{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba9182221a9ec0a65321d5a206c9c174ca} 
non\+\_\+local&indices that are owned by other processes \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{combined@{combined}!gko::experimental::distributed@{gko::experimental::distributed}}
\index{gko::experimental::distributed@{gko::experimental::distributed}!combined@{combined}}
}\Hypertarget{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba507d922378ecab8e10b81dcbc2ff8bf3}\label{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba507d922378ecab8e10b81dcbc2ff8bf3} 
combined&both local and non\+\_\+local indices \\
\hline

\end{DoxyEnumFields}


\label{doc-func-members}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_aae57602561df89a74decb3316696981b}\index{gko::experimental::distributed@{gko::experimental::distributed}!assemble\_rows\_from\_neighbors@{assemble\_rows\_from\_neighbors}}
\index{assemble\_rows\_from\_neighbors@{assemble\_rows\_from\_neighbors}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{assemble\_rows\_from\_neighbors()}{assemble\_rows\_from\_neighbors()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_aae57602561df89a74decb3316696981b} 
template$<$typename Value\+Type, typename Local\+Index\+Type, typename Global\+Index\+Type$>$ \\
\doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data}}$<$ Value\+Type, Global\+Index\+Type $>$ gko::\+experimental::\+distributed::\+assemble\+\_\+rows\+\_\+from\+\_\+neighbors (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{mpi::\+communicator}}}]{comm}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data}}$<$ Value\+Type, Global\+Index\+Type $>$ \&}]{input}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}$<$ Local\+Index\+Type, Global\+Index\+Type $>$ $>$}]{partition}{}\end{DoxyParamCaption})}



Assembles \doxylink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data} entries owned by this MPI rank from other ranks and communicates entries located on this MPI rank owned by other ranks to their respective owners. 

This can be useful e.\+g. in a finite element code where each rank assembles a local contribution to a global system matrix and the global matrix has to be assembled by summing up the local contributions on rank boundaries. The partition used is only relevant for row ownership.


\begin{DoxyParams}{Parameters}
{\em comm} & the communicator used to assemble the global matrix. \\
\hline
{\em input} & the \doxylink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data} structure. \\
\hline
{\em partition} & the partition used to determine row owndership.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the globally assembled \doxylink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data} structure for this MPI rank. 
\end{DoxyReturn}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_ae0368295654a9d8455731832a88ffc8c}\index{gko::experimental::distributed@{gko::experimental::distributed}!build\_partition\_from\_local\_range@{build\_partition\_from\_local\_range}}
\index{build\_partition\_from\_local\_range@{build\_partition\_from\_local\_range}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{build\_partition\_from\_local\_range()}{build\_partition\_from\_local\_range()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_ae0368295654a9d8455731832a88ffc8c} 
template$<$typename Local\+Index\+Type, typename Global\+Index\+Type$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}$<$ Local\+Index\+Type, Global\+Index\+Type $>$ $>$ gko::\+experimental::\+distributed::\+build\+\_\+partition\+\_\+from\+\_\+local\+\_\+range (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{mpi::\+communicator}}}]{comm}{, }\item[{\doxymbox{\hyperlink{structgko_1_1span}{span}}}]{local\+\_\+range}{}\end{DoxyParamCaption})}



Builds a partition from a local range. 


\begin{DoxyParams}{Parameters}
{\em exec} & the \doxylink{classgko_1_1Executor}{Executor} on which the partition should be built. \\
\hline
{\em comm} & the communicator used to determine the global partition. \\
\hline
{\em local\+\_\+range} & the start and end indices of the local range.\\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
This throws, if the resulting partition would contain gaps. That means that for a partition of size {\ttfamily n} every local range {\ttfamily r\+\_\+i = \+[s\+\_\+i, e\+\_\+i)} either {\ttfamily s\+\_\+i != 0} and another local range {\ttfamily r\+\_\+j = \+[s\+\_\+j, e\+\_\+j = s\+\_\+i)} exists, or {\ttfamily e\+\_\+i != n} and another local range {\ttfamily r\+\_\+j = \+[s\+\_\+j = e\+\_\+i, e\+\_\+j)} exists.
\end{DoxyWarning}
\begin{DoxyReturn}{Returns}
a \doxylink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition} where each range has the individual local\+\_\+start and local\+\_\+ends. 
\end{DoxyReturn}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a6fff69d2898fefe193012da079a2fef0}\index{gko::experimental::distributed@{gko::experimental::distributed}!build\_partition\_from\_local\_size@{build\_partition\_from\_local\_size}}
\index{build\_partition\_from\_local\_size@{build\_partition\_from\_local\_size}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{build\_partition\_from\_local\_size()}{build\_partition\_from\_local\_size()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a6fff69d2898fefe193012da079a2fef0} 
template$<$typename Local\+Index\+Type, typename Global\+Index\+Type$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition}}$<$ Local\+Index\+Type, Global\+Index\+Type $>$ $>$ gko::\+experimental::\+distributed::\+build\+\_\+partition\+\_\+from\+\_\+local\+\_\+size (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{mpi::\+communicator}}}]{comm}{, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{local\+\_\+size}{}\end{DoxyParamCaption})}



Builds a partition from a local size. 


\begin{DoxyParams}{Parameters}
{\em exec} & the \doxylink{classgko_1_1Executor}{Executor} on which the partition should be built. \\
\hline
{\em comm} & the communicator used to determine the global partition. \\
\hline
{\em local\+\_\+range} & the number of the locally owned indices\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \doxylink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition} where each range has the specified local size. More specifically, if this is called on process i with local\+\_\+size {\ttfamily s\+\_\+i}, then the range {\ttfamily i} has size {\ttfamily s\+\_\+i}, and range {\ttfamily r\+\_\+i = \+[start, start + s\+\_\+i)}, where {\ttfamily start = sum\+\_\+j\texorpdfstring{$^\wedge$}{\string^}(i-\/1) s\+\_\+j}. 
\end{DoxyReturn}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a38521559ec782871cee97d15656cbd49}\index{gko::experimental::distributed@{gko::experimental::distributed}!make\_temporary\_conversion@{make\_temporary\_conversion}}
\index{make\_temporary\_conversion@{make\_temporary\_conversion}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{make\_temporary\_conversion()}{make\_temporary\_conversion()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a38521559ec782871cee97d15656cbd49} 
template$<$typename Value\+Type$>$ \\
gko::\+detail::\+temporary\+\_\+conversion$<$ const \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector}}$<$ Value\+Type $>$ $>$ gko::\+experimental::\+distributed::\+make\+\_\+temporary\+\_\+conversion (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{matrix}{}\end{DoxyParamCaption})}



Convert the given \doxylink{classgko_1_1LinOp}{Lin\+Op} from \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$...$>$} to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}.    

The conversion tries to convert the input \doxylink{classgko_1_1LinOp}{Lin\+Op} to all Dense types with value type recursively reachable by \doxylink{namespacegko_a2c2416a808014f8b0647d5e4ba42a735}{next\+\_\+precision\+\_\+base$<$...$>$} starting from the Value\+Type template parameter. This means that all real-\/to-\/real and complex-\/to-\/complex conversions for default precisions are being considered. If the input matrix is non-\/const, the contents of the modified converted object will be converted back to the input matrix when the returned object is destroyed. This may lead to a loss of precision!


\begin{DoxyParams}{Parameters}
{\em \doxylink{namespacegko_1_1matrix}{matrix}} & the input matrix which is supposed to be converted. It is wrapped unchanged if it is already of type \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}, otherwise it will be converted to this type if possible.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a detail::\+temporary\+\_\+conversion pointing to the (potentially converted) object.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \doxylink{classgko_1_1NotSupported}{Not\+Supported}} & if the input matrix cannot be converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\\
\hline
\end{DoxyExceptions}

\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & the value type into whose associated \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector} type to convert the input \doxylink{classgko_1_1LinOp}{Lin\+Op}.    \\
\hline
\end{DoxyTemplParams}
\Hypertarget{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1}\index{gko::experimental::distributed@{gko::experimental::distributed}!make\_temporary\_conversion@{make\_temporary\_conversion}}
\index{make\_temporary\_conversion@{make\_temporary\_conversion}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{make\_temporary\_conversion()}{make\_temporary\_conversion()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1} 
template$<$typename Value\+Type$>$ \\
gko::\+detail::\+temporary\+\_\+conversion$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector}}$<$ Value\+Type $>$ $>$ gko::\+experimental::\+distributed::\+make\+\_\+temporary\+\_\+conversion (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{matrix}{}\end{DoxyParamCaption})}



Convert the given \doxylink{classgko_1_1LinOp}{Lin\+Op} from \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$...$>$} to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}. 

The conversion tries to convert the input \doxylink{classgko_1_1LinOp}{Lin\+Op} to all Dense types with value type recursively reachable by \doxylink{namespacegko_a2c2416a808014f8b0647d5e4ba42a735}{next\+\_\+precision\+\_\+base$<$...$>$} starting from the Value\+Type template parameter. This means that all real-\/to-\/real and complex-\/to-\/complex conversions for default precisions are being considered. If the input matrix is non-\/const, the contents of the modified converted object will be converted back to the input matrix when the returned object is destroyed. This may lead to a loss of precision!


\begin{DoxyParams}{Parameters}
{\em \doxylink{namespacegko_1_1matrix}{matrix}} & the input matrix which is supposed to be converted. It is wrapped unchanged if it is already of type \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}, otherwise it will be converted to this type if possible.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a detail::\+temporary\+\_\+conversion pointing to the (potentially converted) object.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \doxylink{classgko_1_1NotSupported}{Not\+Supported}} & if the input matrix cannot be converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\\
\hline
\end{DoxyExceptions}

\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & the value type into whose associated \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{Vector} type to convert the input \doxylink{classgko_1_1LinOp}{Lin\+Op}. \\
\hline
\end{DoxyTemplParams}


Referenced by \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}{precision\+\_\+dispatch()}}, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a76b1f78aad396f2a87ae070e0b11c1f3}{precision\+\_\+dispatch\+\_\+real\+\_\+complex()}}, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a87ee066b077fed30ab6e2da949faef6e}{precision\+\_\+dispatch\+\_\+real\+\_\+complex()}}, and \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a6348d5cfc6451aa9f12509e5658de943}{precision\+\_\+dispatch\+\_\+real\+\_\+complex()}}.

\Hypertarget{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}\index{gko::experimental::distributed@{gko::experimental::distributed}!precision\_dispatch@{precision\_dispatch}}
\index{precision\_dispatch@{precision\_dispatch}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{precision\_dispatch()}{precision\_dispatch()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0} 
template$<$typename Value\+Type, typename Function, typename... Args$>$ \\
void gko::\+experimental::\+distributed::\+precision\+\_\+dispatch (\begin{DoxyParamCaption}\item[{Function}]{fn}{, }\item[{Args \texorpdfstring{$\ast$}{*}...}]{linops}{}\end{DoxyParamCaption})}



Calls the given function with each given argument \doxylink{classgko_1_1LinOp}{Lin\+Op} temporarily converted into \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$} as parameters. 


\begin{DoxyParams}{Parameters}
{\em fn} & the given function. It will be passed one (potentially const) \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} parameter per parameter in the parameter pack {\ttfamily linops}. \\
\hline
{\em linops} & the given arguments to be converted and passed on to fn.\\
\hline
\end{DoxyParams}

\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & the value type to use for the parameters of {\ttfamily fn}. \\
\hline
{\em Function} & the function pointer, lambda or other functor type to call with the converted arguments. \\
\hline
{\em Args} & the argument type list. \\
\hline
\end{DoxyTemplParams}


References \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1}{make\+\_\+temporary\+\_\+conversion()}}.



Referenced by \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a6348d5cfc6451aa9f12509e5658de943}{precision\+\_\+dispatch\+\_\+real\+\_\+complex()}}.

\Hypertarget{namespacegko_1_1experimental_1_1distributed_a76b1f78aad396f2a87ae070e0b11c1f3}\index{gko::experimental::distributed@{gko::experimental::distributed}!precision\_dispatch\_real\_complex@{precision\_dispatch\_real\_complex}}
\index{precision\_dispatch\_real\_complex@{precision\_dispatch\_real\_complex}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{precision\_dispatch\_real\_complex()}{precision\_dispatch\_real\_complex()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a76b1f78aad396f2a87ae070e0b11c1f3} 
template$<$typename Value\+Type, typename Function$>$ \\
void gko::\+experimental::\+distributed::\+precision\+\_\+dispatch\+\_\+real\+\_\+complex (\begin{DoxyParamCaption}\item[{Function}]{fn}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{alpha}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{in}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{beta}{, }\item[{\doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{out}{}\end{DoxyParamCaption})}



Calls the given function with the given Lin\+Ops temporarily converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} as parameters.    

If Value\+Type is real and both input vectors are complex, uses experimental::\+distributed::\+\+Vector::\+get\+\_\+real\+\_\+view() to convert them into real matrices after precision conversion.

\begin{DoxySeeAlso}{See also}
\doxylink{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}{precision\+\_\+dispatch()}    
\end{DoxySeeAlso}


References \doxymbox{\hyperlink{namespacegko_a9b3e79911bb6145d7ba865dbe436b915}{gko::\+is\+\_\+complex()}}, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1}{make\+\_\+temporary\+\_\+conversion()}}, and \doxymbox{\hyperlink{namespacegko_a53160e02553fceb89af3e58435de2aca}{gko::\+make\+\_\+temporary\+\_\+conversion()}}.

\Hypertarget{namespacegko_1_1experimental_1_1distributed_a87ee066b077fed30ab6e2da949faef6e}\index{gko::experimental::distributed@{gko::experimental::distributed}!precision\_dispatch\_real\_complex@{precision\_dispatch\_real\_complex}}
\index{precision\_dispatch\_real\_complex@{precision\_dispatch\_real\_complex}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{precision\_dispatch\_real\_complex()}{precision\_dispatch\_real\_complex()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a87ee066b077fed30ab6e2da949faef6e} 
template$<$typename Value\+Type, typename Function$>$ \\
void gko::\+experimental::\+distributed::\+precision\+\_\+dispatch\+\_\+real\+\_\+complex (\begin{DoxyParamCaption}\item[{Function}]{fn}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{alpha}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{in}{, }\item[{\doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{out}{}\end{DoxyParamCaption})}



Calls the given function with the given Lin\+Ops temporarily converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} as parameters.    

If Value\+Type is real and both input vectors are complex, uses experimental::\+distributed::\+\+Vector::\+get\+\_\+real\+\_\+view() to convert them into real matrices after precision conversion.

\begin{DoxySeeAlso}{See also}
\doxylink{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}{precision\+\_\+dispatch()}    
\end{DoxySeeAlso}


References \doxymbox{\hyperlink{namespacegko_a9b3e79911bb6145d7ba865dbe436b915}{gko::\+is\+\_\+complex()}}, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1}{make\+\_\+temporary\+\_\+conversion()}}, and \doxymbox{\hyperlink{namespacegko_a53160e02553fceb89af3e58435de2aca}{gko::\+make\+\_\+temporary\+\_\+conversion()}}.

\Hypertarget{namespacegko_1_1experimental_1_1distributed_a6348d5cfc6451aa9f12509e5658de943}\index{gko::experimental::distributed@{gko::experimental::distributed}!precision\_dispatch\_real\_complex@{precision\_dispatch\_real\_complex}}
\index{precision\_dispatch\_real\_complex@{precision\_dispatch\_real\_complex}!gko::experimental::distributed@{gko::experimental::distributed}}
\doxysubsubsection{\texorpdfstring{precision\_dispatch\_real\_complex()}{precision\_dispatch\_real\_complex()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1distributed_a6348d5cfc6451aa9f12509e5658de943} 
template$<$typename Value\+Type, typename Function$>$ \\
void gko::\+experimental::\+distributed::\+precision\+\_\+dispatch\+\_\+real\+\_\+complex (\begin{DoxyParamCaption}\item[{Function}]{fn}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{in}{, }\item[{\doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} \texorpdfstring{$\ast$}{*}}]{out}{}\end{DoxyParamCaption})}



Calls the given function with the given Lin\+Ops temporarily converted to \doxylink{classgko_1_1experimental_1_1distributed_1_1Vector}{experimental::\+distributed::\+\+Vector$<$\+Value\+Type$>$}\texorpdfstring{$\ast$}{*} as parameters. 

If Value\+Type is real and both input vectors are complex, uses experimental::\+distributed::\+\+Vector::\+get\+\_\+real\+\_\+view() to convert them into real matrices after precision conversion.

\begin{DoxySeeAlso}{See also}
\doxylink{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}{precision\+\_\+dispatch()} 
\end{DoxySeeAlso}


References \doxymbox{\hyperlink{namespacegko_a9b3e79911bb6145d7ba865dbe436b915}{gko::\+is\+\_\+complex()}}, \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a1090c398cde41fae9f7b215f20e21bf1}{make\+\_\+temporary\+\_\+conversion()}}, and \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_ae834447464baacc73ee8d2bc6a0d61a0}{precision\+\_\+dispatch()}}.

