\doxysection{gko::\+experimental::\+mpi::\+environment Class Reference}
\hypertarget{classgko_1_1experimental_1_1mpi_1_1environment}{}\label{classgko_1_1experimental_1_1mpi_1_1environment}\index{gko::experimental::mpi::environment@{gko::experimental::mpi::environment}}


Class that sets up and finalizes the MPI environment.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+base/\+mpi.\+hpp$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
int \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment_a41be6b6a3e956bbfbe69948bc9ea4350}{get\+\_\+provided\+\_\+thread\+\_\+support}} () const
\begin{DoxyCompactList}\small\item\em Return the provided thread support. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb}{environment}} (int \&argc, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}\&argv, const \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_ab7c53f651b07ca2e9cd171981268aefb}{thread\+\_\+type}} thread\+\_\+t=thread\+\_\+type::\+serialized)
\begin{DoxyCompactList}\small\item\em Call MPI\+\_\+\+Init\+\_\+thread and initialize the MPI environment. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a08ffaad353e8a90f5c23f5a1867a225c}\label{classgko_1_1experimental_1_1mpi_1_1environment_a08ffaad353e8a90f5c23f5a1867a225c} 
{\bfseries \texorpdfstring{$\sim$}{\string~}environment} ()
\begin{DoxyCompactList}\small\item\em Call MPI\+\_\+\+Finalize at the end of the scope of this class. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a2e4487a92314f5a891490fcb84710af1}\label{classgko_1_1experimental_1_1mpi_1_1environment_a2e4487a92314f5a891490fcb84710af1} 
{\bfseries environment} (const environment \&)=delete
\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a37cc03e24c3838ab638114d053829f70}\label{classgko_1_1experimental_1_1mpi_1_1environment_a37cc03e24c3838ab638114d053829f70} 
{\bfseries environment} (environment \&\&)=delete
\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_ad04f683c5ee753d015c03cd55b7f7350}\label{classgko_1_1experimental_1_1mpi_1_1environment_ad04f683c5ee753d015c03cd55b7f7350} 
\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb}{environment}} \& {\bfseries operator=} (const \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb}{environment}} \&)=delete
\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_aee2ea6635ab72a6d2ff912e9be477fcb}\label{classgko_1_1experimental_1_1mpi_1_1environment_aee2ea6635ab72a6d2ff912e9be477fcb} 
\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb}{environment}} \& {\bfseries operator=} (\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb}{environment}} \&\&)=delete
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a8e3df70c12ff3101f4fe2c27189968e2}\label{classgko_1_1experimental_1_1mpi_1_1environment_a8e3df70c12ff3101f4fe2c27189968e2} 
static bool {\bfseries is\+\_\+finalized} ()
\item 
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a4279e24ba8a82cf5805471f5e0c62b51}\label{classgko_1_1experimental_1_1mpi_1_1environment_a4279e24ba8a82cf5805471f5e0c62b51} 
static bool {\bfseries is\+\_\+initialized} ()
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Class that sets up and finalizes the MPI environment. 

This class is a simple RAII wrapper to MPI\+\_\+\+Init and MPI\+\_\+\+Finalize.

MPI\+\_\+\+Init must have been called before calling any MPI functions.

\begin{DoxyNote}{Note}
If MPI\+\_\+\+Init has already been called, then this class should not be used. 
\end{DoxyNote}


\label{doc-constructors}
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb}\index{gko::experimental::mpi::environment@{gko::experimental::mpi::environment}!environment@{environment}}
\index{environment@{environment}!gko::experimental::mpi::environment@{gko::experimental::mpi::environment}}
\doxysubsubsection{\texorpdfstring{environment()}{environment()}}
{\footnotesize\ttfamily \label{classgko_1_1experimental_1_1mpi_1_1environment_a9f4864403915e8749c715c3d4a5c06cb} 
gko::\+experimental::\+mpi::\+environment::\+environment (\begin{DoxyParamCaption}\item[{int \&}]{argc}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}\&}]{argv}{, }\item[{const \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_ab7c53f651b07ca2e9cd171981268aefb}{thread\+\_\+type}}}]{thread\+\_\+t}{ = {\ttfamily thread\+\_\+type:\+:\+serialized}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Call MPI\+\_\+\+Init\+\_\+thread and initialize the MPI environment. 


\begin{DoxyParams}{Parameters}
{\em argc} & the number of arguments to the main function. \\
\hline
{\em argv} & the arguments provided to the main function. \\
\hline
{\em thread\+\_\+t} & the type of threading for initialization. See @thread\+\_\+type \\
\hline
\end{DoxyParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1experimental_1_1mpi_1_1environment_a41be6b6a3e956bbfbe69948bc9ea4350}\index{gko::experimental::mpi::environment@{gko::experimental::mpi::environment}!get\_provided\_thread\_support@{get\_provided\_thread\_support}}
\index{get\_provided\_thread\_support@{get\_provided\_thread\_support}!gko::experimental::mpi::environment@{gko::experimental::mpi::environment}}
\doxysubsubsection{\texorpdfstring{get\_provided\_thread\_support()}{get\_provided\_thread\_support()}}
{\footnotesize\ttfamily \label{classgko_1_1experimental_1_1mpi_1_1environment_a41be6b6a3e956bbfbe69948bc9ea4350} 
int gko::\+experimental::\+mpi::\+environment::\+get\+\_\+provided\+\_\+thread\+\_\+support (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the provided thread support. 

\begin{DoxyReturn}{Returns}
the provided thread support 
\end{DoxyReturn}


The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+base/\+mpi.\+hpp\end{DoxyCompactItemize}
