\doxysection{index\+\_\+map.\+hpp}
\hypertarget{index__map_8hpp_source}{}\label{index__map_8hpp_source}\index{ginkgo/core/distributed/index\_map.hpp@{ginkgo/core/distributed/index\_map.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\_INDEX\_MAP\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_DISTRIBUTED\_INDEX\_MAP\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/segmented\_array.hpp>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <ginkgo/core/distributed/partition.hpp>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00014\ \textcolor{keyword}{namespace\ }experimental\ \{}
\DoxyCodeLine{00015\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed}{distributed}}\ \{}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00023\ \textcolor{keyword}{enum\ class}\ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b}{index\_space}}\ \{}
\DoxyCodeLine{00024\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947baf5ddaf0ca7929578b408c909429f68f2}{local}},\ \ \ \ \ \ }
\DoxyCodeLine{00025\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba9182221a9ec0a65321d5a206c9c174ca}{non\_local}},\ \ }
\DoxyCodeLine{00026\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947ba507d922378ecab8e10b81dcbc2ff8bf3}{combined}}\ \ \ \ }
\DoxyCodeLine{00027\ \};}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ }
\DoxyCodeLine{00067\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ LocalIndexType,\ \textcolor{keyword}{typename}\ GlobalIndexType\ =\ \textcolor{keywordtype}{int}64>}
\DoxyCodeLine{00068\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\ \{}
\DoxyCodeLine{00069\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{using\ }partition\_type\ =\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{Partition<LocalIndexType,\ GlobalIndexType>}};}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00082\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<LocalIndexType>}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a89ea973e18352d2e6689f61d9297b478}{map\_to\_local}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<GlobalIndexType>}}\&\ global\_ids,}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b}{index\_space}}\ index\_space\_v)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00096\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<GlobalIndexType>}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_afda7597a392bd9c404142e106860d4d1}{map\_to\_global}}(}
\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<LocalIndexType>}}\&\ local\_idxs,}
\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1distributed_a3d50932cfebdde844b88d2c82b96947b}{index\_space}}\ index\_space\_v)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00099\ }
\DoxyCodeLine{00103\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a78a1f61d47a1d4d750bda99542dba85f}{get\_global\_size}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00108\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a6fd6741d44db285fa6e37b736d2e4f75}{get\_local\_size}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00109\ }
\DoxyCodeLine{00113\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_aaf514d3c047602e2a1a2419439be2c8b}{get\_non\_local\_size}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00114\ }
\DoxyCodeLine{00127\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ partition\_type>\ partition,}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{comm\_index\_type}}\ rank,}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<GlobalIndexType>}}\&\ recv\_connections);}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00135\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_abede5c53ae9431bcd0b90d908e18f81b}{index\_map}}(std::shared\_ptr<const\ Executor>\ exec);}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00142\ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1segmented__array}{segmented\_array<GlobalIndexType>}}\&\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_ada2c797d87e98769728eafa30a2358b1}{get\_remote\_global\_idxs}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00158\ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1segmented__array}{segmented\_array<LocalIndexType>}}\&\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_ade6d462c2a724d3849ee4b06d5293453}{get\_remote\_local\_idxs}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00159\ }
\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<comm\_index\_type>}}\&\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a4b88d46f4a3008ec7c7bba74be1ec6c1}{get\_remote\_target\_ids}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00167\ }
\DoxyCodeLine{00171\ \ \ \ \ std::shared\_ptr<const\ Executor>\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_ae221fd76f25d0338844d26a1073be917}{get\_executor}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00173\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\&\ other);}
\DoxyCodeLine{00174\ }
\DoxyCodeLine{00175\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}(\doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\&\&\ other)\ \textcolor{keyword}{noexcept};}
\DoxyCodeLine{00176\ }
\DoxyCodeLine{00177\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\&\ operator=(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\&\ other);}
\DoxyCodeLine{00178\ }
\DoxyCodeLine{00179\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\&\ operator=(\doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1index__map_a23bd5f3345c6534838ddbfc90334d1d6}{index\_map}}\&\&\ other);}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00182\ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec\_;}
\DoxyCodeLine{00183\ \ \ \ \ std::shared\_ptr<const\ partition\_type>\ partition\_;}
\DoxyCodeLine{00184\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1experimental_1_1mpi_a13b7760affb031fee59d385754eaaffb}{comm\_index\_type}}\ rank\_;}
\DoxyCodeLine{00185\ }
\DoxyCodeLine{00186\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<comm\_index\_type>}}\ remote\_target\_ids\_;}
\DoxyCodeLine{00187\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1segmented__array}{segmented\_array<LocalIndexType>}}\ remote\_local\_idxs\_;}
\DoxyCodeLine{00188\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1segmented__array}{segmented\_array<GlobalIndexType>}}\ remote\_global\_idxs\_;}
\DoxyCodeLine{00189\ \};}
\DoxyCodeLine{00190\ }
\DoxyCodeLine{00191\ }
\DoxyCodeLine{00192\ \}\ \ \textcolor{comment}{//\ namespace\ distributed}}
\DoxyCodeLine{00193\ \}\ \ \textcolor{comment}{//\ namespace\ experimental}}
\DoxyCodeLine{00194\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00195\ }
\DoxyCodeLine{00196\ }
\DoxyCodeLine{00197\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_DISTRIBUTED\_INDEX\_MAP\_HPP\_}}

\end{DoxyCode}
