\doxysection{gko::\+experimental::\+mpi Namespace Reference}
\hypertarget{namespacegko_1_1experimental_1_1mpi}{}\label{namespacegko_1_1experimental_1_1mpi}\index{gko::experimental::mpi@{gko::experimental::mpi}}


The mpi namespace, contains wrapper for many MPI functions.  


\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl}{type\+\_\+impl}}
\begin{DoxyCompactList}\small\item\em A struct that is used to determine the MPI\+\_\+\+Datatype of a specified type. \end{DoxyCompactList}\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01char_01_4}{type\+\_\+impl$<$ char $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01unsigned_01char_01_4}{type\+\_\+impl$<$ unsigned char $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01unsigned_01_4}{type\+\_\+impl$<$ unsigned $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01int_01_4}{type\+\_\+impl$<$ int $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01unsigned_01short_01_4}{type\+\_\+impl$<$ unsigned short $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01unsigned_01long_01_4}{type\+\_\+impl$<$ unsigned long $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01long_01_4}{type\+\_\+impl$<$ long $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01long_01long_01_4}{type\+\_\+impl$<$ long long $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01unsigned_01long_01long_01_4}{type\+\_\+impl$<$ unsigned long long $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01float_01_4}{type\+\_\+impl$<$ float $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01double_01_4}{type\+\_\+impl$<$ double $>$}}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1type__impl_3_01long_01double_01_4}{type\+\_\+impl$<$ long double $>$}}
\item 
struct {\bfseries type\+\_\+impl$<$ std::\+complex$<$ float $>$ $>$}
\item 
struct {\bfseries type\+\_\+impl$<$ std::\+complex$<$ double $>$ $>$}
\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1contiguous__type}{contiguous\+\_\+type}}
\begin{DoxyCompactList}\small\item\em A move-\/only wrapper for a contiguous MPI\+\_\+\+Datatype. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment}{environment}}
\begin{DoxyCompactList}\small\item\em Class that sets up and finalizes the MPI environment. \end{DoxyCompactList}\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1status}{status}}
\begin{DoxyCompactList}\small\item\em The status struct is a light wrapper around the MPI\+\_\+\+Status struct. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1request}{request}}
\begin{DoxyCompactList}\small\item\em The request class is a light, move-\/only wrapper around the MPI\+\_\+\+Request handle. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{communicator}}
\begin{DoxyCompactList}\small\item\em A thin wrapper of MPI\+\_\+\+Comm that supports most MPI calls. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1window}{window}}
\begin{DoxyCompactList}\small\item\em This class wraps the MPI\+\_\+\+Window class with RAII functionality. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1CollectiveCommunicator}{Collective\+Communicator}}
\begin{DoxyCompactList}\small\item\em Interface for a collective communicator. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator}{Dense\+Communicator}}
\begin{DoxyCompactList}\small\item\em A \doxylink{classgko_1_1experimental_1_1mpi_1_1CollectiveCommunicator}{Collective\+Communicator} that uses a dense communication. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1NeighborhoodCommunicator}{Neighborhood\+Communicator}}
\begin{DoxyCompactList}\small\item\em A \doxylink{classgko_1_1experimental_1_1mpi_1_1CollectiveCommunicator}{Collective\+Communicator} that uses a neighborhood topology. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
using \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{comm\+\_\+index\+\_\+type}} = int
\begin{DoxyCompactList}\small\item\em Index type for enumerating processes in a distributed application. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{namespacegko_1_1experimental_1_1mpi_ab7c53f651b07ca2e9cd171981268aefb}\label{namespacegko_1_1experimental_1_1mpi_ab7c53f651b07ca2e9cd171981268aefb} 
enum class \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_ab7c53f651b07ca2e9cd171981268aefb}{thread\+\_\+type}} \{ {\bfseries serialized} = MPI\+\_\+\+THREAD\+\_\+\+SERIALIZED
, {\bfseries funneled} = MPI\+\_\+\+THREAD\+\_\+\+FUNNELED
, {\bfseries single} = MPI\+\_\+\+THREAD\+\_\+\+SINGLE
, {\bfseries multiple} = MPI\+\_\+\+THREAD\+\_\+\+MULTIPLE
 \}
\begin{DoxyCompactList}\small\item\em This enum specifies the threading type to be used when creating an MPI environment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{namespacegko_1_1experimental_1_1mpi_a7b1bbdde143284165fab4380acba4acc}\label{namespacegko_1_1experimental_1_1mpi_a7b1bbdde143284165fab4380acba4acc} 
constexpr bool {\bfseries is\+\_\+gpu\+\_\+aware} ()
\begin{DoxyCompactList}\small\item\em Return if GPU aware functionality is available. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a0ec0c93a068b2c19da8cb5e874bf9f6c}{map\+\_\+rank\+\_\+to\+\_\+device\+\_\+id}} (MPI\+\_\+\+Comm comm, int num\+\_\+devices)
\begin{DoxyCompactList}\small\item\em Maps each MPI rank to a single device id in a round robin manner. \end{DoxyCompactList}\item 
std::\+vector$<$ \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1status}{status}} $>$ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_aff5fd80940add1e4f08a53bfcd131b01}{wait\+\_\+all}} (std::\+vector$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1request}{request}} $>$ \&req)
\begin{DoxyCompactList}\small\item\em Allows a rank to wait on multiple request handles. \end{DoxyCompactList}\item 
\Hypertarget{namespacegko_1_1experimental_1_1mpi_a379e508c71176773a3f2331cd7975c03}\label{namespacegko_1_1experimental_1_1mpi_a379e508c71176773a3f2331cd7975c03} 
bool {\bfseries requires\+\_\+host\+\_\+buffer} (const std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \&exec, const \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{communicator}} \&comm)
\begin{DoxyCompactList}\small\item\em Checks if the combination of \doxylink{classgko_1_1Executor}{Executor} and communicator requires passing MPI buffers from the host memory. \end{DoxyCompactList}\item 
double \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a508f97387781bb32dd2c7616dee1a786}{get\+\_\+walltime}} ()
\begin{DoxyCompactList}\small\item\em Get the rank in the communicator of the calling process. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The mpi namespace, contains wrapper for many MPI functions. 

\label{doc-typedef-members}
\Hypertarget{namespacegko_1_1experimental_1_1mpi_doc-typedef-members}
\doxysubsection{Typedef Documentation}
\Hypertarget{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}\index{gko::experimental::mpi@{gko::experimental::mpi}!comm\_index\_type@{comm\_index\_type}}
\index{comm\_index\_type@{comm\_index\_type}!gko::experimental::mpi@{gko::experimental::mpi}}
\doxysubsubsection{\texorpdfstring{comm\_index\_type}{comm\_index\_type}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb} 
using \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{gko::\+experimental::\+mpi::\+comm\+\_\+index\+\_\+type}} = int}



Index type for enumerating processes in a distributed application. 

Conforms to the MPI C interface of e.\+g. MPI rank or size 

\label{doc-func-members}
\Hypertarget{namespacegko_1_1experimental_1_1mpi_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{namespacegko_1_1experimental_1_1mpi_a508f97387781bb32dd2c7616dee1a786}\index{gko::experimental::mpi@{gko::experimental::mpi}!get\_walltime@{get\_walltime}}
\index{get\_walltime@{get\_walltime}!gko::experimental::mpi@{gko::experimental::mpi}}
\doxysubsubsection{\texorpdfstring{get\_walltime()}{get\_walltime()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1mpi_a508f97387781bb32dd2c7616dee1a786} 
double gko::\+experimental::\+mpi::\+get\+\_\+walltime (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Get the rank in the communicator of the calling process. 


\begin{DoxyParams}{Parameters}
{\em comm} & the communicator \\
\hline
\end{DoxyParams}
\Hypertarget{namespacegko_1_1experimental_1_1mpi_a0ec0c93a068b2c19da8cb5e874bf9f6c}\index{gko::experimental::mpi@{gko::experimental::mpi}!map\_rank\_to\_device\_id@{map\_rank\_to\_device\_id}}
\index{map\_rank\_to\_device\_id@{map\_rank\_to\_device\_id}!gko::experimental::mpi@{gko::experimental::mpi}}
\doxysubsubsection{\texorpdfstring{map\_rank\_to\_device\_id()}{map\_rank\_to\_device\_id()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1mpi_a0ec0c93a068b2c19da8cb5e874bf9f6c} 
int gko::\+experimental::\+mpi::\+map\+\_\+rank\+\_\+to\+\_\+device\+\_\+id (\begin{DoxyParamCaption}\item[{MPI\+\_\+\+Comm}]{comm}{, }\item[{int}]{num\+\_\+devices}{}\end{DoxyParamCaption})}



Maps each MPI rank to a single device id in a round robin manner. 


\begin{DoxyParams}{Parameters}
{\em comm} & used to determine the node-\/local rank, if no suitable environment variable is available. \\
\hline
{\em num\+\_\+devices} & the number of devices per node. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
device id that this rank should use. 
\end{DoxyReturn}
\Hypertarget{namespacegko_1_1experimental_1_1mpi_aff5fd80940add1e4f08a53bfcd131b01}\index{gko::experimental::mpi@{gko::experimental::mpi}!wait\_all@{wait\_all}}
\index{wait\_all@{wait\_all}!gko::experimental::mpi@{gko::experimental::mpi}}
\doxysubsubsection{\texorpdfstring{wait\_all()}{wait\_all()}}
{\footnotesize\ttfamily \label{namespacegko_1_1experimental_1_1mpi_aff5fd80940add1e4f08a53bfcd131b01} 
std::\+vector$<$ \doxymbox{\hyperlink{structgko_1_1experimental_1_1mpi_1_1status}{status}} $>$ gko::\+experimental::\+mpi::\+wait\+\_\+all (\begin{DoxyParamCaption}\item[{std::\+vector$<$ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1request}{request}} $>$ \&}]{req}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Allows a rank to wait on multiple request handles. 


\begin{DoxyParams}{Parameters}
{\em req} & The vector of request handles to be waited on.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
status The vector of status objects that can be queried. 
\end{DoxyReturn}
