\doxysection{gko::\+index\+\_\+set\texorpdfstring{$<$}{<} Index\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1index__set}{}\label{classgko_1_1index__set}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}


An index set class represents an ordered set of intervals.  




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

\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}\label{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7} 
using {\bfseries index\+\_\+type} = Index\+Type
\begin{DoxyCompactList}\small\item\em The type of elements stored in the index set. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec) noexcept
\begin{DoxyCompactList}\small\item\em Creates an empty \doxylink{classgko_1_1index__set}{index\+\_\+set} tied to the specified \doxylink{classgko_1_1Executor}{Executor}. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_aa07de100efebfe572fe54e8a062a804f}{index\+\_\+set}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{gko::\+\+Executor}} $>$ exec, std::\+initializer\+\_\+list$<$ Index\+Type $>$ init\+\_\+list, const bool is\+\_\+sorted=false)
\begin{DoxyCompactList}\small\item\em Creates an index set on the specified executor from the initializer list. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_acea38519c712e560b25b765649c42ea1}{index\+\_\+set}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{gko::\+\+Executor}} $>$ exec, const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} size, const \doxymbox{\hyperlink{classgko_1_1array}{gko::\+array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&indices, const bool is\+\_\+sorted=false)
\begin{DoxyCompactList}\small\item\em Creates an index set on the specified executor and the given size. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_aed2f14574eed7c641b7bfffbba4f99aa}{index\+\_\+set}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const index\+\_\+set \&other)
\begin{DoxyCompactList}\small\item\em Creates a copy of the input \doxylink{classgko_1_1index__set}{index\+\_\+set} on a different executor. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a091b7afcf15de1d01446251717e198e8}{index\+\_\+set}} (const index\+\_\+set \&other)
\begin{DoxyCompactList}\small\item\em Creates a copy of the input \doxylink{classgko_1_1index__set}{index\+\_\+set}. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_abd4ef83780066ef0dfa12d5f60ac5977}{index\+\_\+set}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, index\+\_\+set \&\&other)
\begin{DoxyCompactList}\small\item\em Moves the input \doxylink{classgko_1_1index__set}{index\+\_\+set} to a different executor. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a882cb2e0e9ba975255bda9e117643520}{index\+\_\+set}} (index\+\_\+set \&\&other)
\begin{DoxyCompactList}\small\item\em Moves the input \doxylink{classgko_1_1index__set}{index\+\_\+set}. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} \& \doxymbox{\hyperlink{classgko_1_1index__set_ac6e64938ef36436b232b608eaab56fa3}{operator=}} (const \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} \&other)
\begin{DoxyCompactList}\small\item\em Copies data from another \doxylink{classgko_1_1index__set}{index\+\_\+set}. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} \& \doxymbox{\hyperlink{classgko_1_1index__set_a13051e756a89e63eb26ddd4a15685218}{operator=}} (\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} \&\&other)
\begin{DoxyCompactList}\small\item\em Moves data from another \doxylink{classgko_1_1index__set}{index\+\_\+set}. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1index__set_a53df61fd93487ab81379091e3d985337}{clear}} () noexcept
\begin{DoxyCompactList}\small\item\em Deallocates all data used by the \doxylink{classgko_1_1index__set}{index\+\_\+set}. \end{DoxyCompactList}\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set_a4e9d134d6d40aa2fbf0c5958f8894987}{get\+\_\+executor}} () const
\begin{DoxyCompactList}\small\item\em Returns the executor of the \doxylink{classgko_1_1index__set}{index\+\_\+set}. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set_aee50346d39861298d22e886f849a05d5}{get\+\_\+size}} () const
\begin{DoxyCompactList}\small\item\em Returns the size of the index set space. \end{DoxyCompactList}\item 
bool \doxymbox{\hyperlink{classgko_1_1index__set_acc4a1e96758b704d89ca101815110f7f}{is\+\_\+contiguous}} () const
\begin{DoxyCompactList}\small\item\em Returns if the index set is contiguous. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set_a2e4c41ed2f1e634143a117fac6fcebb6}{get\+\_\+num\+\_\+elems}} () const
\begin{DoxyCompactList}\small\item\em Return the actual number of indices stored in the index set. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set_a363bf8e031a2fe0be1b5bee3ede1f5a0}{get\+\_\+global\+\_\+index}} (\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} local\+\_\+index) const
\begin{DoxyCompactList}\small\item\em Return the global index given a local index. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set_a6b60c4666b52d0c17897f10462e99790}{get\+\_\+local\+\_\+index}} (\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} global\+\_\+index) const
\begin{DoxyCompactList}\small\item\em Return the local index given a global index. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set_ad9f135e24c34dfea392947753b526954}{map\+\_\+local\+\_\+to\+\_\+global}} (const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&local\+\_\+indices, const bool is\+\_\+sorted=false) const
\begin{DoxyCompactList}\small\item\em This is an array version of the scalar function above. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set_a937ba1ccb516edd695f0e959d9db9d4c}{map\+\_\+global\+\_\+to\+\_\+local}} (const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&global\+\_\+indices, const bool is\+\_\+sorted=false) const
\begin{DoxyCompactList}\small\item\em This is an array version of the scalar function above. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set_a1bb5e4dc6c65c8aeca7babb2593d351e}{to\+\_\+global\+\_\+indices}} () const
\begin{DoxyCompactList}\small\item\em This function allows the user obtain a decompressed global\+\_\+indices array from the indices stored in the index set. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ bool $>$ \doxymbox{\hyperlink{classgko_1_1index__set_a36a1e9d8710a44345e509ba5d0f6d18e}{contains}} (const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&global\+\_\+indices, const bool is\+\_\+sorted=false) const
\begin{DoxyCompactList}\small\item\em Checks if the individual global indeices exist in the index set. \end{DoxyCompactList}\item 
bool \doxymbox{\hyperlink{classgko_1_1index__set_ac0e92beeb23525dec8474c3342aca1c1}{contains}} (const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} global\+\_\+index) const
\begin{DoxyCompactList}\small\item\em Checks if the global index exists in the index set. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set_ab9dbcb5d70fa42c47a5c02abf46637af}{get\+\_\+num\+\_\+subsets}} () const
\begin{DoxyCompactList}\small\item\em Returns the number of subsets stored in the index set. \end{DoxyCompactList}\item 
const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1index__set_a27fd675f983b1f4a08b092d9597164e0}{get\+\_\+subsets\+\_\+begin}} () const
\begin{DoxyCompactList}\small\item\em Returns a pointer to the beginning indices of the subsets. \end{DoxyCompactList}\item 
const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1index__set_a48e034c2e240ef436334e11ef60c88cc}{get\+\_\+subsets\+\_\+end}} () const
\begin{DoxyCompactList}\small\item\em Returns a pointer to the end indices of the subsets. \end{DoxyCompactList}\item 
const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1index__set_ae604850ee9f80d9bef7bcc87ea55ff98}{get\+\_\+superset\+\_\+indices}} () const
\begin{DoxyCompactList}\small\item\em Returns a pointer to the cumulative indices of the superset of the subsets. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Index\+Type = int32$>$\newline
class gko::\+index\+\_\+set$<$ Index\+Type $>$}
An index set class represents an ordered set of intervals. 

The index set contains subsets which store the starting and end points of a range, \+[a,b), storing the first index and one past the last index. As the index set only stores the end-\/points of ranges, it can be quite efficient in terms of storage.

This class is particularly useful in storing continuous ranges. For example, consider the index set (1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 18, 19, 20, 21, 42). Instead of storing the entire array of indices, one can store intervals (\+[1,9), \+[10,13), \+[18,22), \+[42,43)), thereby only using half the storage.

We store three arrays, one (subsets\+\_\+begin) with the starting indices of the subsets in the index set, another (subsets\+\_\+end) storing one index beyond the end indices of the subsets and the last (superset\+\_\+cumulative\+\_\+indices) storing the cumulative number of indices in the subsequent subsets with an initial zero which speeds up the querying. Additionally, the arrays containing the range boundaries (subsets\+\_\+begin, subsets\+\_\+end) are stored in a sorted fashion.

Therefore the storage would look as follows

\begin{quote}
\doxylink{classgko_1_1index__set}{index\+\_\+set} = (1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 18, 19, 20, 21, 42) subsets\+\_\+begin = \{1, 10, 18, 42\} subsets\+\_\+end = \{9, 13, 22, 43\} superset\+\_\+cumulative\+\_\+indices = \{0, 8, 11, 15, 16\} \end{quote}



\begin{DoxyTemplParams}{Template Parameters}
{\em \doxylink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} & type of the indices being stored in the index set. \\
\hline
\end{DoxyTemplParams}


\label{doc-constructors}
\Hypertarget{classgko_1_1index__set_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [1/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}, {\ttfamily [noexcept]}}



Creates an empty \doxylink{classgko_1_1index__set}{index\+\_\+set} tied to the specified \doxylink{classgko_1_1Executor}{Executor}. 


\begin{DoxyParams}{Parameters}
{\em exec} & the \doxylink{classgko_1_1Executor}{Executor} where the \doxylink{classgko_1_1index__set}{index\+\_\+set} data is allocated \\
\hline
\end{DoxyParams}


Referenced by \doxymbox{\hyperlink{classgko_1_1index__set_a091b7afcf15de1d01446251717e198e8}{index\+\_\+set()}}, \doxymbox{\hyperlink{classgko_1_1index__set_a882cb2e0e9ba975255bda9e117643520}{index\+\_\+set()}}, \doxymbox{\hyperlink{classgko_1_1index__set_aed2f14574eed7c641b7bfffbba4f99aa}{index\+\_\+set()}}, \doxymbox{\hyperlink{classgko_1_1index__set_abd4ef83780066ef0dfa12d5f60ac5977}{index\+\_\+set()}}, \doxymbox{\hyperlink{classgko_1_1index__set_ac6e64938ef36436b232b608eaab56fa3}{operator=()}}, and \doxymbox{\hyperlink{classgko_1_1index__set_a13051e756a89e63eb26ddd4a15685218}{operator=()}}.

\Hypertarget{classgko_1_1index__set_aa07de100efebfe572fe54e8a062a804f}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [2/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_aa07de100efebfe572fe54e8a062a804f} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{gko::\+\+Executor}} $>$}]{exec}{, }\item[{std::\+initializer\+\_\+list$<$ Index\+Type $>$}]{init\+\_\+list}{, }\item[{const bool}]{is\+\_\+sorted}{ = {\ttfamily false}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



Creates an index set on the specified executor from the initializer list. 


\begin{DoxyParams}{Parameters}
{\em exec} & the \doxylink{classgko_1_1Executor}{Executor} where the index set data will be allocated \\
\hline
{\em init\+\_\+list} & the indices that the index set should hold in an initializer\+\_\+list. \\
\hline
{\em is\+\_\+sorted} & a parameter that specifies if the indices array is sorted or not. {\ttfamily true} if sorted. \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1index__set_a4e9d134d6d40aa2fbf0c5958f8894987}{get\+\_\+executor()}}.

\Hypertarget{classgko_1_1index__set_acea38519c712e560b25b765649c42ea1}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [3/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_acea38519c712e560b25b765649c42ea1} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{gko::\+\+Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}}}]{size}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1array}{gko::\+array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&}]{indices}{, }\item[{const bool}]{is\+\_\+sorted}{ = {\ttfamily false}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



Creates an index set on the specified executor and the given size. 


\begin{DoxyParams}{Parameters}
{\em exec} & the \doxylink{classgko_1_1Executor}{Executor} where the index set data will be allocated \\
\hline
{\em size} & the maximum index the index set it allowed to hold. This is the size of the index space. \\
\hline
{\em indices} & the indices that the index set should hold. \\
\hline
{\em is\+\_\+sorted} & a parameter that specifies if the indices array is sorted or not. {\ttfamily true} if sorted. \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{gko::\+array$<$ Value\+Type $>$::\+get\+\_\+size()}}.

\Hypertarget{classgko_1_1index__set_aed2f14574eed7c641b7bfffbba4f99aa}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [4/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_aed2f14574eed7c641b7bfffbba4f99aa} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const index\+\_\+set$<$ Index\+Type $>$ \&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Creates a copy of the input \doxylink{classgko_1_1index__set}{index\+\_\+set} on a different executor. 


\begin{DoxyParams}{Parameters}
{\em exec} & the executor where the new \doxylink{classgko_1_1index__set}{index\+\_\+set} will be created \\
\hline
{\em other} & the \doxylink{classgko_1_1index__set}{index\+\_\+set} to copy from \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set()}}.

\Hypertarget{classgko_1_1index__set_a091b7afcf15de1d01446251717e198e8}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [5/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a091b7afcf15de1d01446251717e198e8} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{const index\+\_\+set$<$ Index\+Type $>$ \&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Creates a copy of the input \doxylink{classgko_1_1index__set}{index\+\_\+set}. 


\begin{DoxyParams}{Parameters}
{\em other} & the \doxylink{classgko_1_1index__set}{index\+\_\+set} to copy from \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1index__set_a4e9d134d6d40aa2fbf0c5958f8894987}{get\+\_\+executor()}}, and \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set()}}.

\Hypertarget{classgko_1_1index__set_abd4ef83780066ef0dfa12d5f60ac5977}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [6/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_abd4ef83780066ef0dfa12d5f60ac5977} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{index\+\_\+set$<$ Index\+Type $>$ \&\&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves the input \doxylink{classgko_1_1index__set}{index\+\_\+set} to a different executor. 


\begin{DoxyParams}{Parameters}
{\em exec} & the executor where the new \doxylink{classgko_1_1index__set}{index\+\_\+set} will be moved to \\
\hline
{\em other} & the \doxylink{classgko_1_1index__set}{index\+\_\+set} to move from \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set()}}.

\Hypertarget{classgko_1_1index__set_a882cb2e0e9ba975255bda9e117643520}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!index\_set@{index\_set}}
\index{index\_set@{index\_set}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{index\_set()}{index\_set()}\hspace{0.1cm}{\footnotesize\ttfamily [7/7]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a882cb2e0e9ba975255bda9e117643520} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+index\+\_\+set (\begin{DoxyParamCaption}\item[{index\+\_\+set$<$ Index\+Type $>$ \&\&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves the input \doxylink{classgko_1_1index__set}{index\+\_\+set}. 


\begin{DoxyParams}{Parameters}
{\em other} & the \doxylink{classgko_1_1index__set}{index\+\_\+set} to move from \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1index__set_a4e9d134d6d40aa2fbf0c5958f8894987}{get\+\_\+executor()}}, and \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set()}}.



\label{doc-func-members}
\Hypertarget{classgko_1_1index__set_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1index__set_a53df61fd93487ab81379091e3d985337}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!clear@{clear}}
\index{clear@{clear}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{clear()}{clear()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a53df61fd93487ab81379091e3d985337} 
template$<$typename Index\+Type = int32$>$ \\
void \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+clear (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Deallocates all data used by the \doxylink{classgko_1_1index__set}{index\+\_\+set}. 

The \doxylink{classgko_1_1index__set}{index\+\_\+set} is left in a valid, but empty state, so the same \doxylink{classgko_1_1index__set}{index\+\_\+set} can be used to allocate new memory. Calls to \doxylink{classgko_1_1index__set_a27fd675f983b1f4a08b092d9597164e0}{index\+\_\+set::\+get\+\_\+subsets\+\_\+begin()} will return a {\ttfamily nullptr}. \Hypertarget{classgko_1_1index__set_a36a1e9d8710a44345e509ba5d0f6d18e}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!contains@{contains}}
\index{contains@{contains}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{contains()}{contains()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a36a1e9d8710a44345e509ba5d0f6d18e} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ bool $>$ \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+contains (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&}]{global\+\_\+indices}{, }\item[{const bool}]{is\+\_\+sorted}{ = {\ttfamily false}}\end{DoxyParamCaption}) const}



Checks if the individual global indeices exist in the index set. 


\begin{DoxyParams}{Parameters}
{\em global\+\_\+indices} & the indices to check. \\
\hline
{\em is\+\_\+sorted} & a parameter that specifies if the query array is sorted or not. {\ttfamily true} if sorted.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the array that contains element wise whether the corresponding global index in the index set or not. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1index__set_ac0e92beeb23525dec8474c3342aca1c1}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!contains@{contains}}
\index{contains@{contains}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{contains()}{contains()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_ac0e92beeb23525dec8474c3342aca1c1} 
template$<$typename Index\+Type = int32$>$ \\
bool \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+contains (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}}}]{global\+\_\+index}{}\end{DoxyParamCaption}) const}



Checks if the global index exists in the index set. 


\begin{DoxyParams}{Parameters}
{\em global\+\_\+index} & the index to check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
whether the element exists in the index set.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
This single entry query can have significant kernel launch overheads and should be avoided if possible. 
\end{DoxyWarning}
\Hypertarget{classgko_1_1index__set_a4e9d134d6d40aa2fbf0c5958f8894987}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_executor@{get\_executor}}
\index{get\_executor@{get\_executor}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_executor()}{get\_executor()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a4e9d134d6d40aa2fbf0c5958f8894987} 
template$<$typename Index\+Type = int32$>$ \\
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+executor (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the executor of the \doxylink{classgko_1_1index__set}{index\+\_\+set}. 

\begin{DoxyReturn}{Returns}
the executor. 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1index__set_a091b7afcf15de1d01446251717e198e8}{index\+\_\+set()}}, \doxymbox{\hyperlink{classgko_1_1index__set_a882cb2e0e9ba975255bda9e117643520}{index\+\_\+set()}}, and \doxymbox{\hyperlink{classgko_1_1index__set_aa07de100efebfe572fe54e8a062a804f}{index\+\_\+set()}}.

\Hypertarget{classgko_1_1index__set_a363bf8e031a2fe0be1b5bee3ede1f5a0}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_global\_index@{get\_global\_index}}
\index{get\_global\_index@{get\_global\_index}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_global\_index()}{get\_global\_index()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a363bf8e031a2fe0be1b5bee3ede1f5a0} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+global\+\_\+index (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}}}]{local\+\_\+index}{}\end{DoxyParamCaption}) const}



Return the global index given a local index. 

Consider the set idx\+\_\+set = (0, 1, 2, 4, 6, 7, 8, 9). This function returns the element at the global index k stored in the index set. For example, {\ttfamily idx\+\_\+set.\+get\+\_\+global\+\_\+index(0) == 0} {\ttfamily idx\+\_\+set.\+get\+\_\+global\+\_\+index(3) == 4} and {\ttfamily idx\+\_\+set.\+get\+\_\+global\+\_\+index(7) == 9}

\begin{DoxyNote}{Note}
This function returns a scalar value and needs a scalar value. For repeated queries, it is more efficient to use the array functions that take and return arrays which allow for more throughput.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em local\+\_\+index} & the local index. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the global index from the index set.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
This single entry query can have significant kernel launch overheads and should be avoided if possible. 
\end{DoxyWarning}
\Hypertarget{classgko_1_1index__set_a6b60c4666b52d0c17897f10462e99790}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_local\_index@{get\_local\_index}}
\index{get\_local\_index@{get\_local\_index}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_local\_index()}{get\_local\_index()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a6b60c4666b52d0c17897f10462e99790} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+local\+\_\+index (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}}}]{global\+\_\+index}{}\end{DoxyParamCaption}) const}



Return the local index given a global index. 

Consider the set idx\+\_\+set = (0, 1, 2, 4, 6, 7, 8, 9). This function returns the local index in the index set of the provided index set. For example, {\ttfamily idx\+\_\+set.\+get\+\_\+local\+\_\+index(0) == 0} {\ttfamily idx\+\_\+set.\+get\+\_\+local\+\_\+index(4) == 3} and {\ttfamily idx\+\_\+set.\+get\+\_\+local\+\_\+index(6) == 4}.

\begin{DoxyNote}{Note}
This function returns a scalar value and needs a scalar value. For repeated queries, it is more efficient to use the array functions that take and return arrays which allow for more throughput.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em global\+\_\+index} & the global index.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the local index of the element in the index set.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
This single entry query can have significant kernel launch overheads and should be avoided if possible. 
\end{DoxyWarning}
\Hypertarget{classgko_1_1index__set_a2e4c41ed2f1e634143a117fac6fcebb6}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_num\_elems@{get\_num\_elems}}
\index{get\_num\_elems@{get\_num\_elems}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_num\_elems()}{get\_num\_elems()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a2e4c41ed2f1e634143a117fac6fcebb6} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+num\+\_\+elems (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the actual number of indices stored in the index set. 

\begin{DoxyReturn}{Returns}
number of indices stored in the index set 
\end{DoxyReturn}
\Hypertarget{classgko_1_1index__set_ab9dbcb5d70fa42c47a5c02abf46637af}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_num\_subsets@{get\_num\_subsets}}
\index{get\_num\_subsets@{get\_num\_subsets}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_num\_subsets()}{get\_num\_subsets()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_ab9dbcb5d70fa42c47a5c02abf46637af} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+num\+\_\+subsets (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the number of subsets stored in the index set. 

\begin{DoxyReturn}{Returns}
the number of stored subsets. 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1index__set_acc4a1e96758b704d89ca101815110f7f}{is\+\_\+contiguous()}}.

\Hypertarget{classgko_1_1index__set_aee50346d39861298d22e886f849a05d5}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_size@{get\_size}}
\index{get\_size@{get\_size}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_size()}{get\_size()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_aee50346d39861298d22e886f849a05d5} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+size (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the size of the index set space. 

\begin{DoxyReturn}{Returns}
the size of the index set space. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1index__set_a27fd675f983b1f4a08b092d9597164e0}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_subsets\_begin@{get\_subsets\_begin}}
\index{get\_subsets\_begin@{get\_subsets\_begin}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_subsets\_begin()}{get\_subsets\_begin()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a27fd675f983b1f4a08b092d9597164e0} 
template$<$typename Index\+Type = int32$>$ \\
const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+subsets\+\_\+begin (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns a pointer to the beginning indices of the subsets. 

\begin{DoxyReturn}{Returns}
a pointer to the beginning indices of the subsets. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1index__set_a48e034c2e240ef436334e11ef60c88cc}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_subsets\_end@{get\_subsets\_end}}
\index{get\_subsets\_end@{get\_subsets\_end}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_subsets\_end()}{get\_subsets\_end()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a48e034c2e240ef436334e11ef60c88cc} 
template$<$typename Index\+Type = int32$>$ \\
const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+subsets\+\_\+end (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns a pointer to the end indices of the subsets. 

\begin{DoxyReturn}{Returns}
a pointer to the end indices of the subsets. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1index__set_ae604850ee9f80d9bef7bcc87ea55ff98}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!get\_superset\_indices@{get\_superset\_indices}}
\index{get\_superset\_indices@{get\_superset\_indices}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_superset\_indices()}{get\_superset\_indices()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_ae604850ee9f80d9bef7bcc87ea55ff98} 
template$<$typename Index\+Type = int32$>$ \\
const \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+get\+\_\+superset\+\_\+indices (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns a pointer to the cumulative indices of the superset of the subsets. 

\begin{DoxyReturn}{Returns}
a pointer to the cumulative indices of the superset of the subsets. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1index__set_acc4a1e96758b704d89ca101815110f7f}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!is\_contiguous@{is\_contiguous}}
\index{is\_contiguous@{is\_contiguous}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{is\_contiguous()}{is\_contiguous()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_acc4a1e96758b704d89ca101815110f7f} 
template$<$typename Index\+Type = int32$>$ \\
bool \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+is\+\_\+contiguous (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns if the index set is contiguous. 

\begin{DoxyReturn}{Returns}
if the index set is contiguous. 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1index__set_ab9dbcb5d70fa42c47a5c02abf46637af}{get\+\_\+num\+\_\+subsets()}}.

\Hypertarget{classgko_1_1index__set_a937ba1ccb516edd695f0e959d9db9d4c}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!map\_global\_to\_local@{map\_global\_to\_local}}
\index{map\_global\_to\_local@{map\_global\_to\_local}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{map\_global\_to\_local()}{map\_global\_to\_local()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a937ba1ccb516edd695f0e959d9db9d4c} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+map\+\_\+global\+\_\+to\+\_\+local (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&}]{global\+\_\+indices}{, }\item[{const bool}]{is\+\_\+sorted}{ = {\ttfamily false}}\end{DoxyParamCaption}) const}



This is an array version of the scalar function above. 


\begin{DoxyParams}{Parameters}
{\em global\+\_\+indices} & the global index array. \\
\hline
{\em is\+\_\+sorted} & a parameter that specifies if the query array is sorted or not. {\ttfamily true} if sorted.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the local index array from the index set.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
Whenever possible, passing a sorted array is preferred as the queries can be significantly faster. 
\end{DoxyNote}
\Hypertarget{classgko_1_1index__set_ad9f135e24c34dfea392947753b526954}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!map\_local\_to\_global@{map\_local\_to\_global}}
\index{map\_local\_to\_global@{map\_local\_to\_global}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{map\_local\_to\_global()}{map\_local\_to\_global()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_ad9f135e24c34dfea392947753b526954} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+map\+\_\+local\+\_\+to\+\_\+global (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \&}]{local\+\_\+indices}{, }\item[{const bool}]{is\+\_\+sorted}{ = {\ttfamily false}}\end{DoxyParamCaption}) const}



This is an array version of the scalar function above. 


\begin{DoxyParams}{Parameters}
{\em local\+\_\+indices} & the local index array. \\
\hline
{\em is\+\_\+sorted} & a parameter that specifies if the query array is sorted or not. {\ttfamily true} if sorted .\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the global index array from the index set.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
Whenever possible, passing a sorted array is preferred as the queries can be significantly faster. 

Passing local indices from \+[0, size) is equivalent to using the @to\+\_\+global\+\_\+indices function. 
\end{DoxyNote}
\Hypertarget{classgko_1_1index__set_ac6e64938ef36436b232b608eaab56fa3}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!operator=@{operator=}}
\index{operator=@{operator=}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_ac6e64938ef36436b232b608eaab56fa3} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} \& \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+operator= (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}}$<$ Index\+Type $>$ \&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copies data from another \doxylink{classgko_1_1index__set}{index\+\_\+set}. 

The executor of this is preserved. In case this does not have an assigned executor, it will inherit the executor of other.


\begin{DoxyParams}{Parameters}
{\em other} & the \doxylink{classgko_1_1index__set}{index\+\_\+set} to copy from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set()}}.

\Hypertarget{classgko_1_1index__set_a13051e756a89e63eb26ddd4a15685218}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!operator=@{operator=}}
\index{operator=@{operator=}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a13051e756a89e63eb26ddd4a15685218} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}} \& \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+operator= (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set}}$<$ Index\+Type $>$ \&\&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves data from another \doxylink{classgko_1_1index__set}{index\+\_\+set}. 

The executor of this is preserved. In case this does not have an assigned executor, it will inherit the executor of other.


\begin{DoxyParams}{Parameters}
{\em other} & the \doxylink{classgko_1_1index__set}{index\+\_\+set} to move from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1index__set_a6383409f771d79550aacaafc81a5f805}{index\+\_\+set()}}.

\Hypertarget{classgko_1_1index__set_a1bb5e4dc6c65c8aeca7babb2593d351e}\index{gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}!to\_global\_indices@{to\_global\_indices}}
\index{to\_global\_indices@{to\_global\_indices}!gko::index\_set$<$ IndexType $>$@{gko::index\_set$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{to\_global\_indices()}{to\_global\_indices()}}
{\footnotesize\ttfamily \label{classgko_1_1index__set_a1bb5e4dc6c65c8aeca7babb2593d351e} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{classgko_1_1index__set_a41f5311ce2e9fb07ddb618123413bab7}{index\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1index__set}{gko::\+index\+\_\+set}}$<$ Index\+Type $>$::\+to\+\_\+global\+\_\+indices (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const}



This function allows the user obtain a decompressed global\+\_\+indices array from the indices stored in the index set. 

\begin{DoxyReturn}{Returns}
the decompressed set of indices. 
\end{DoxyReturn}


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