\doxysection{dense\+\_\+communicator.\+hpp}
\hypertarget{dense__communicator_8hpp_source}{}\label{dense__communicator_8hpp_source}\index{ginkgo/core/distributed/dense\_communicator.hpp@{ginkgo/core/distributed/dense\_communicator.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\_DISTRIBUTED\_DENSE\_COMMUNICATOR\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_DISTRIBUTED\_DENSE\_COMMUNICATOR\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/config.hpp>}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#if\ GINKGO\_BUILD\_MPI}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/mpi.hpp>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <ginkgo/core/distributed/collective\_communicator.hpp>}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ <ginkgo/core/distributed/index\_map.hpp>}}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }experimental\ \{}
\DoxyCodeLine{00022\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi}{mpi}}\ \{}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00030\ \textcolor{keyword}{class\ }DenseCommunicator\ final\ :\ \textcolor{keyword}{public}\ CollectiveCommunicator\ \{}
\DoxyCodeLine{00031\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1CollectiveCommunicator_a94f644ab6d92ef607f82de7092a56056}{CollectiveCommunicator::i\_all\_to\_all\_v}};}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \ \ \ \ DenseCommunicator(\textcolor{keyword}{const}\ DenseCommunicator\&\ other)\ =\ \textcolor{keywordflow}{default};}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \ \ \ \ DenseCommunicator(DenseCommunicator\&\&\ other);}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \ \ \ \ DenseCommunicator\&\ operator=(\textcolor{keyword}{const}\ DenseCommunicator\&\ other)\ =\ \textcolor{keywordflow}{default};}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ \ \ \ \ DenseCommunicator\&\ operator=(DenseCommunicator\&\&\ other);}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{explicit}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_a33a2a971df99faf4fb41940a79720691}{DenseCommunicator}}(\doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{communicator}}\ base);}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ LocalIndexType,\ \textcolor{keyword}{typename}\ GlobalIndexType>}
\DoxyCodeLine{00063\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_abaf29c21ad8358299c9b54b4aa77c7af}{DenseCommunicator}}(}
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{communicator}}\ base,}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map}{distributed::index\_map<LocalIndexType,\ GlobalIndexType>}}\&\ imap);}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \ \ \ \ [[nodiscard]]\ std::unique\_ptr<CollectiveCommunicator>\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_afb335f202995227958acb0c7ecc09dc7}{create\_with\_same\_type}}(}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{communicator}}\ base,\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1CollectiveCommunicator_a4eb0fac1710fca957997116855df756e}{index\_map\_ptr}}\ imap)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00069\ }
\DoxyCodeLine{00076\ \ \ \ \ [[nodiscard]]\ std::unique\_ptr<CollectiveCommunicator>\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_a2b218369edacc186a429e37e7cbc548d}{create\_inverse}}()}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00079\ \ \ \ \ [[nodiscard]]\ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{comm\_index\_type}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_a42ea7976b0f0294326e452cc39fecb63}{get\_recv\_size}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \ \ \ \ [[nodiscard]]\ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{comm\_index\_type}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_a69f783c216c743560b9b92c143770648}{get\_send\_size}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_a8855c52b908d3f55bdc0cfd2b0ef902c}{operator==}}(\textcolor{keyword}{const}\ DenseCommunicator\&\ a,}
\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ DenseCommunicator\&\ b);}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00100\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1DenseCommunicator_a2ddefc5a24b2a877a840e07be7e92733}{operator!=}}(\textcolor{keyword}{const}\ DenseCommunicator\&\ a,}
\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ DenseCommunicator\&\ b);}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00103\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00110\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1request}{request}}\ i\_all\_to\_all\_v\_impl(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{void}*\ send\_buffer,\ MPI\_Datatype\ send\_type,}
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}*\ recv\_buffer,}
\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MPI\_Datatype\ recv\_type)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00114\ }
\DoxyCodeLine{00115\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00116\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1mpi_1_1communicator}{communicator}}\ comm\_;}
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \ \ \ \ std::vector<comm\_index\_type>\ send\_sizes\_;}
\DoxyCodeLine{00119\ \ \ \ \ std::vector<comm\_index\_type>\ send\_offsets\_;}
\DoxyCodeLine{00120\ \ \ \ \ std::vector<comm\_index\_type>\ recv\_sizes\_;}
\DoxyCodeLine{00121\ \ \ \ \ std::vector<comm\_index\_type>\ recv\_offsets\_;}
\DoxyCodeLine{00122\ \};}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ \}\ \ \textcolor{comment}{//\ namespace\ mpi}}
\DoxyCodeLine{00126\ \}\ \ \textcolor{comment}{//\ namespace\ experimental}}
\DoxyCodeLine{00127\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00128\ }
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00131\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_DISTRIBUTED\_DENSE\_COMMUNICATOR\_HPP\_}}

\end{DoxyCode}
