\doxysection{matrix\+\_\+data.\+hpp}
\hypertarget{matrix__data_8hpp_source}{}\label{matrix__data_8hpp_source}\index{ginkgo/core/base/matrix\_data.hpp@{ginkgo/core/base/matrix\_data.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\_BASE\_MATRIX\_DATA\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_BASE\_MATRIX\_DATA\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <numeric>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <tuple>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/dim.hpp>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/math.hpp>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/range.hpp>}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/range\_accessors.hpp>}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/utils.hpp>}}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \textcolor{keyword}{namespace\ }detail\ \{}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{comment}{//\ internal\ structure\ used\ to\ get\ around\ explicit\ constructors\ in\ std::tuple}}
\DoxyCodeLine{00029\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00030\ \textcolor{keyword}{struct\ }input\_triple\ \{}
\DoxyCodeLine{00031\ \ \ \ \ IndexType\ row;}
\DoxyCodeLine{00032\ \ \ \ \ IndexType\ col;}
\DoxyCodeLine{00033\ \ \ \ \ ValueType\ val;}
\DoxyCodeLine{00034\ \};}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ Distribution,\ \textcolor{keyword}{typename}\ Generator>}
\DoxyCodeLine{00038\ \textcolor{keyword}{typename}\ std::enable\_if<!is\_complex\_s<ValueType>::value,\ ValueType>::type}
\DoxyCodeLine{00039\ get\_rand\_value(Distribution\&\&\ dist,\ Generator\&\&\ gen)}
\DoxyCodeLine{00040\ \{}
\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordflow}{return}\ dist(gen);}
\DoxyCodeLine{00042\ \}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ }
\DoxyCodeLine{00045\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ Distribution,\ \textcolor{keyword}{typename}\ Generator>}
\DoxyCodeLine{00046\ \textcolor{keyword}{typename}\ std::enable\_if<is\_complex\_s<ValueType>::value,\ ValueType>::type}
\DoxyCodeLine{00047\ get\_rand\_value(Distribution\&\&\ dist,\ Generator\&\&\ gen)}
\DoxyCodeLine{00048\ \{}
\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordflow}{return}\ ValueType(dist(gen),\ dist(gen));}
\DoxyCodeLine{00050\ \}}
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00053\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00059\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00060\ \textcolor{keyword}{struct\ }matrix\_data\_entry\ \{}
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00063\ \ \ \ \ matrix\_data\_entry()\ =\ \textcolor{keywordflow}{default};}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \ \ \ \ GKO\_ATTRIBUTES\ matrix\_data\_entry(index\_type\ r,\ index\_type\ c,\ value\_type\ v)}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ :\ row(r),\ column(c),\ value(v)}
\DoxyCodeLine{00067\ \ \ \ \ \{\}}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordtype}{bool}\ operator==(\textcolor{keyword}{const}\ matrix\_data\_entry\&\ other)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00070\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::tie(this-\/>row,\ this-\/>column,\ this-\/>value)\ ==}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::tie(other.row,\ other.column,\ other.value);}
\DoxyCodeLine{00073\ \ \ \ \ \};}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordtype}{bool}\ operator!=(\textcolor{keyword}{const}\ matrix\_data\_entry\&\ other)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00075\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::tie(this-\/>row,\ this-\/>column,\ this-\/>value)\ !=}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::tie(other.row,\ other.column,\ other.value);}
\DoxyCodeLine{00078\ \ \ \ \ \};}
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00080\ \textcolor{preprocessor}{\#define\ GKO\_DEFINE\_DEFAULT\_COMPARE\_OPERATOR(\_op)\ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00081\ \textcolor{preprocessor}{\ \ \ \ bool\ operator\ \_op(const\ matrix\_data\_entry\&\ other)\ const\ \(\backslash\)}}
\DoxyCodeLine{00082\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ return\ std::tie(this-\/>row,\ this-\/>column)\ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00084\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \_op\ std::tie(other.row,\ other.column);\ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00085\ \textcolor{preprocessor}{\ \ \ \ \}}}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ GKO\_DEFINE\_DEFAULT\_COMPARE\_OPERATOR(<);}
\DoxyCodeLine{00088\ \ \ \ \ GKO\_DEFINE\_DEFAULT\_COMPARE\_OPERATOR(>);}
\DoxyCodeLine{00089\ \ \ \ \ GKO\_DEFINE\_DEFAULT\_COMPARE\_OPERATOR(<=);}
\DoxyCodeLine{00090\ \ \ \ \ GKO\_DEFINE\_DEFAULT\_COMPARE\_OPERATOR(>=);}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \textcolor{preprocessor}{\#undef\ GKO\_DEFINE\_DEFAULT\_COMPARE\_OPERATOR}}
\DoxyCodeLine{00093\ }
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keyword}{friend}\ std::ostream\&\ operator<<(std::ostream\&\ os,}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ matrix\_data\_entry\&\ x)}
\DoxyCodeLine{00096\ \ \ \ \ \{}
\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{charliteral}{'('}\ <<\ x.row\ <<\ \textcolor{charliteral}{','}\ <<\ x.column\ <<\ \textcolor{charliteral}{','}\ <<\ x.value\ <<\ \textcolor{charliteral}{')'};}
\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ os;}
\DoxyCodeLine{00099\ \ \ \ \ \}}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \ \ \ \ index\_type\ row;}
\DoxyCodeLine{00102\ \ \ \ \ index\_type\ column;}
\DoxyCodeLine{00103\ \ \ \ \ value\_type\ value;}
\DoxyCodeLine{00104\ \};}
\DoxyCodeLine{00105\ }
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00125\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision,\ \textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00126\ \textcolor{keyword}{struct\ }\doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \{}
\DoxyCodeLine{00127\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_AND\_INDEX\_TYPE;}
\DoxyCodeLine{00128\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00129\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keyword}{using\ }nonzero\_type\ =\ \doxymbox{\hyperlink{structgko_1_1matrix__data__entry}{matrix\_data\_entry<value\_type,\ index\_type>}};}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00138\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_\ =\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{\},\ ValueType\ value\ =\ \doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero<ValueType>}}())}
\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\{size\_\}}
\DoxyCodeLine{00140\ \ \ \ \ \{}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{namespacegko_a785976e6dbc9d8511325617ca46040bf}{is\_zero}}(value))\ \{}
\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0]\ *\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1]);}
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row\ =\ 0;\ row\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0];\ ++row)\ \{}
\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col\ =\ 0;\ col\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1];\ ++col)\ \{}
\DoxyCodeLine{00147\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(row,\ col,\ value);}
\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00150\ \ \ \ \ \}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00162\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ RandomDistribution,\ \textcolor{keyword}{typename}\ RandomEngine>}
\DoxyCodeLine{00163\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_aea89944190aba3ace872bf31fd98fd3d}{matrix\_data}}(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_,\ RandomDistribution\&\&\ dist,\ RandomEngine\&\&\ engine)}
\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\{size\_\}}
\DoxyCodeLine{00165\ \ \ \ \ \{}
\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0]\ *\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1]);}
\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row\ =\ 0;\ row\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0];\ ++row)\ \{}
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col\ =\ 0;\ col\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1];\ ++col)\ \{}
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ value\ =}
\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ detail::get\_rand\_value<ValueType>(dist,\ engine);}
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{namespacegko_aef9b29733e6eb45475a2b84f79a6d012}{is\_nonzero}}(value))\ \{}
\DoxyCodeLine{00172\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(row,\ col,\ value);}
\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00176\ \ \ \ \ \}}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00183\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_ac78cdd3da5bed7779109ba2569ce93fe}{matrix\_data}}(std::initializer\_list<std::initializer\_list<ValueType>>\ values)}
\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\{values.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}(),\ 0\}}
\DoxyCodeLine{00185\ \ \ \ \ \{}
\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row\ =\ 0;\ row\ <\ values.size();\ ++row)\ \{}
\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ row\_data\ =\ begin(values)[row];}
\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1]\ =\ std::max(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1],\ row\_data.size());}
\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col\ =\ 0;\ col\ <\ row\_data.size();\ ++col)\ \{}
\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ val\ =\ begin(row\_data)[col];}
\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{namespacegko_aef9b29733e6eb45475a2b84f79a6d012}{is\_nonzero}}(val))\ \{}
\DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(row,\ col,\ val);}
\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00196\ \ \ \ \ \}}
\DoxyCodeLine{00197\ }
\DoxyCodeLine{00204\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_afe0e4e15f03548f48b99649375cf64ba}{matrix\_data}}(}
\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_,}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ std::initializer\_list<detail::input\_triple<ValueType,\ IndexType>>}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \ \ \ \ nonzeros\_)}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\{size\_\},\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}()}
\DoxyCodeLine{00209\ \ \ \ \ \{}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(nonzeros\_.size());}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ for\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ elem\ :\ nonzeros\_)\ \{}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(elem.row,\ elem.col,\ elem.val);}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ }
\DoxyCodeLine{00222\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_aa8398ce720b3db2ebde137419d032352}{matrix\_data}}(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\&\ block)}
\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\{size\_\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\}}
\DoxyCodeLine{00224\ \ \ \ \ \{}
\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(size\_[0]\ *\ size\_[1]\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.size());}
\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row\ =\ 0;\ row\ <\ size\_[0];\ ++row)\ \{}
\DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col\ =\ 0;\ col\ <\ size\_[1];\ ++col)\ \{}
\DoxyCodeLine{00228\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ elem\ :\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}})\ \{}
\DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(row\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0]\ +\ elem.row,}
\DoxyCodeLine{00230\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ col\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1]\ +\ elem.column,}
\DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ elem.value);}
\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{structgko_1_1matrix__data_ab2094160087e0d7fcbb85120f2138b52}{sort\_row\_major}}();}
\DoxyCodeLine{00236\ \ \ \ \ \}}
\DoxyCodeLine{00237\ }
\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Accessor>}
\DoxyCodeLine{00246\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a380d2b8207621f3c997804afa6d729af}{matrix\_data}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1range}{range<Accessor>}}\&\ data)}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\{data.length(0),\ data.length(1)\}}
\DoxyCodeLine{00248\ \ \ \ \ \{}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{gko::size\_type}}\ row\ =\ 0;\ row\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0];\ ++row)\ \{}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{gko::size\_type}}\ col\ =\ 0;\ col\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1];\ ++col)\ \{}
\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{namespacegko_aef9b29733e6eb45475a2b84f79a6d012}{is\_nonzero}}(data(row,\ col)))\ \{}
\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(row,\ col,\ data(row,\ col));}
\DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00254\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00255\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00256\ \ \ \ \ \}}
\DoxyCodeLine{00257\ }
\DoxyCodeLine{00266\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a307091117617a342b9e576bcc9dd3c80}{diag}}(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_,\ ValueType\ value)}
\DoxyCodeLine{00267\ \ \ \ \ \{}
\DoxyCodeLine{00268\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ res(size\_);}
\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\doxymbox{\hyperlink{namespacegko_aef9b29733e6eb45475a2b84f79a6d012}{is\_nonzero}}(value))\ \{}
\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ num\_nnz\ =\ std::min(size\_[0],\ size\_[1]);}
\DoxyCodeLine{00271\ \ \ \ \ \ \ \ \ \ \ \ \ res.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(num\_nnz);}
\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ i\ =\ 0;\ i\ <\ num\_nnz;\ ++i)\ \{}
\DoxyCodeLine{00273\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(i,\ i,\ value);}
\DoxyCodeLine{00274\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00276\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
\DoxyCodeLine{00277\ \ \ \ \ \}}
\DoxyCodeLine{00278\ }
\DoxyCodeLine{00287\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_aa80c7201a72ebf5b79a793b8d38db8e2}{diag}}(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_,}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::initializer\_list<ValueType>\ nonzeros\_)}
\DoxyCodeLine{00289\ \ \ \ \ \{}
\DoxyCodeLine{00290\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ res(size\_);}
\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ res.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(nonzeros\_.size());}
\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ pos\ =\ 0;}
\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\ value\ :\ nonzeros\_)\ \{}
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \ \ \ \ res.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(pos,\ pos,\ value);}
\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \ \ \ \ ++pos;}
\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
\DoxyCodeLine{00298\ \ \ \ \ \}}
\DoxyCodeLine{00299\ }
\DoxyCodeLine{00308\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a2d2fb8725ef69679a74f7bd2f627e776}{diag}}(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ size\_,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\&\ block)}
\DoxyCodeLine{00309\ \ \ \ \ \{}
\DoxyCodeLine{00310\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ res(size\_\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}});}
\DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ num\_blocks\ =\ std::min(size\_[0],\ size\_[1]);}
\DoxyCodeLine{00312\ \ \ \ \ \ \ \ \ res.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.reserve(num\_blocks\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.size());}
\DoxyCodeLine{00313\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ b\ =\ 0;\ b\ <\ num\_blocks;\ ++b)\ \{}
\DoxyCodeLine{00314\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ elem\ :\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}})\ \{}
\DoxyCodeLine{00315\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.emplace\_back(b\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[0]\ +\ elem.row,}
\DoxyCodeLine{00316\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ b\ *\ block.\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}[1]\ +\ elem.column,}
\DoxyCodeLine{00317\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ elem.value);}
\DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00320\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
\DoxyCodeLine{00321\ \ \ \ \ \}}
\DoxyCodeLine{00322\ }
\DoxyCodeLine{00334\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ForwardIterator>}
\DoxyCodeLine{00335\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a83d309b12caf3957c116ed1133da39a7}{diag}}(ForwardIterator\ begin,\ ForwardIterator\ end)}
\DoxyCodeLine{00336\ \ \ \ \ \{}
\DoxyCodeLine{00337\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ res(std::accumulate(}
\DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ \ \ \ \ begin,\ end,\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{\},\ [](\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ s,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\&\ d)\ \{}
\DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{s[0]\ +\ d.size[0],\ s[1]\ +\ d.size[1]\};}
\DoxyCodeLine{00340\ \ \ \ \ \ \ \ \ \ \ \ \ \}));}
\DoxyCodeLine{00341\ }
\DoxyCodeLine{00342\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row\_offset\{\};}
\DoxyCodeLine{00343\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col\_offset\{\};}
\DoxyCodeLine{00344\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\ it\ =\ begin;\ it\ !=\ end;\ ++it)\ \{}
\DoxyCodeLine{00345\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ elem\ :\ it-\/>nonzeros)\ \{}
\DoxyCodeLine{00346\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.nonzeros.emplace\_back(row\_offset\ +\ elem.row,}
\DoxyCodeLine{00347\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ col\_offset\ +\ elem.column,\ elem.value);}
\DoxyCodeLine{00348\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00349\ \ \ \ \ \ \ \ \ \ \ \ \ row\_offset\ +=\ it-\/>size[0];}
\DoxyCodeLine{00350\ \ \ \ \ \ \ \ \ \ \ \ \ col\_offset\ +=\ it-\/>size[1];}
\DoxyCodeLine{00351\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00352\ }
\DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
\DoxyCodeLine{00354\ \ \ \ \ \}}
\DoxyCodeLine{00355\ }
\DoxyCodeLine{00364\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_aa809c5fbd147b72b18efeca595338398}{diag}}(std::initializer\_list<matrix\_data>\ blocks)}
\DoxyCodeLine{00365\ \ \ \ \ \{}
\DoxyCodeLine{00366\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a307091117617a342b9e576bcc9dd3c80}{diag}}(begin(blocks),\ end(blocks));}
\DoxyCodeLine{00367\ \ \ \ \ \}}
\DoxyCodeLine{00368\ }
\DoxyCodeLine{00388\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ RandomDistribution,\ \textcolor{keyword}{typename}\ RandomEngine>}
\DoxyCodeLine{00389\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a84056e4ef41884be328ec78554074df1}{cond}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},}
\DoxyCodeLine{00390\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<ValueType>}}\ condition\_number,}
\DoxyCodeLine{00391\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ RandomDistribution\&\&\ dist,\ RandomEngine\&\&\ engine,}
\DoxyCodeLine{00392\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_reflectors)}
\DoxyCodeLine{00393\ \ \ \ \ \{}
\DoxyCodeLine{00394\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1range}{range}}\ =\ \doxymbox{\hyperlink{classgko_1_1range}{range<accessor::row\_major<ValueType,\ 2>}}>;}
\DoxyCodeLine{00395\ \ \ \ \ \ \ \ \ std::vector<ValueType>\ mtx\_data(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\ *\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},\ \doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero<ValueType>}}());}
\DoxyCodeLine{00396\ \ \ \ \ \ \ \ \ std::vector<ValueType>\ ref\_data(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}});}
\DoxyCodeLine{00397\ \ \ \ \ \ \ \ \ std::vector<ValueType>\ work(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}});}
\DoxyCodeLine{00398\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1range}{range}}\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}(mtx\_data.data(),\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}});}
\DoxyCodeLine{00399\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1range}{range}}\ reflector(ref\_data.data(),\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},\ 1u,\ 1u);}
\DoxyCodeLine{00400\ }
\DoxyCodeLine{00401\ \ \ \ \ \ \ \ \ initialize\_diag\_with\_cond(condition\_number,\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}});}
\DoxyCodeLine{00402\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ i\ =\ 0;\ i\ <\ num\_reflectors;\ ++i)\ \{}
\DoxyCodeLine{00403\ \ \ \ \ \ \ \ \ \ \ \ \ generate\_random\_reflector(dist,\ engine,\ reflector);}
\DoxyCodeLine{00404\ \ \ \ \ \ \ \ \ \ \ \ \ reflect\_domain(reflector,\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}},\ work.data());}
\DoxyCodeLine{00405\ \ \ \ \ \ \ \ \ \ \ \ \ generate\_random\_reflector(dist,\ engine,\ reflector);}
\DoxyCodeLine{00406\ \ \ \ \ \ \ \ \ \ \ \ \ reflect\_range(reflector,\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}},\ work.data());}
\DoxyCodeLine{00407\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00408\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}};}
\DoxyCodeLine{00409\ \ \ \ \ \}}
\DoxyCodeLine{00410\ }
\DoxyCodeLine{00432\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ RandomDistribution,\ \textcolor{keyword}{typename}\ RandomEngine>}
\DoxyCodeLine{00433\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4be80a4afbd7f905aa4e73fbeb9df762}{matrix\_data}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_aff5d2293d78e83ed783b5b8e231e7ede}{cond}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},}
\DoxyCodeLine{00434\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<ValueType>}}\ condition\_number,}
\DoxyCodeLine{00435\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ RandomDistribution\&\&\ dist,\ RandomEngine\&\&\ engine)}
\DoxyCodeLine{00436\ \ \ \ \ \{}
\DoxyCodeLine{00437\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a84056e4ef41884be328ec78554074df1}{cond}}(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}},\ condition\_number,}
\DoxyCodeLine{00438\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<RandomDistribution>(dist),}
\DoxyCodeLine{00439\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::forward<RandomEngine>(engine),\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\ -\/\ 1);}
\DoxyCodeLine{00440\ \ \ \ \ \}}
\DoxyCodeLine{00441\ }
\DoxyCodeLine{00445\ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}};}
\DoxyCodeLine{00446\ }
\DoxyCodeLine{00454\ \ \ \ \ std::vector<nonzero\_type>\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}};}
\DoxyCodeLine{00455\ }
\DoxyCodeLine{00459\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_ab2094160087e0d7fcbb85120f2138b52}{sort\_row\_major}}()}
\DoxyCodeLine{00460\ \ \ \ \ \{}
\DoxyCodeLine{00461\ \ \ \ \ \ \ \ \ std::sort(}
\DoxyCodeLine{00462\ \ \ \ \ \ \ \ \ \ \ \ \ begin(\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}),\ end(\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}),\ [](nonzero\_type\ x,\ nonzero\_type\ y)\ \{}
\DoxyCodeLine{00463\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::tie(x.row,\ x.column)\ <\ std::tie(y.row,\ y.column);}
\DoxyCodeLine{00464\ \ \ \ \ \ \ \ \ \ \ \ \ \});}
\DoxyCodeLine{00465\ \ \ \ \ \}}
\DoxyCodeLine{00466\ }
\DoxyCodeLine{00470\ \ \ \ \ GKO\_DEPRECATED(\textcolor{stringliteral}{"{}Use\ sort\_row\_major()\ instead"{}})\ void\ \doxymbox{\hyperlink{structgko_1_1matrix__data_ac83a3b5d892fbd132fd9a7f50b0f83b8}{ensure\_row\_major\_order}}()}
\DoxyCodeLine{00471\ \ \ \ \ \{}
\DoxyCodeLine{00472\ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{structgko_1_1matrix__data_ab2094160087e0d7fcbb85120f2138b52}{sort\_row\_major}}();}
\DoxyCodeLine{00473\ \ \ \ \ \}}
\DoxyCodeLine{00474\ }
\DoxyCodeLine{00478\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a7b360eaf4c11e846c561f2910e2d425f}{remove\_zeros}}()}
\DoxyCodeLine{00479\ \ \ \ \ \{}
\DoxyCodeLine{00480\ \ \ \ \ \ \ \ \ nonzeros.erase(}
\DoxyCodeLine{00481\ \ \ \ \ \ \ \ \ \ \ \ \ std::remove\_if(begin(\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}),\ end(\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}),}
\DoxyCodeLine{00482\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](nonzero\_type\ nz)\ \{\ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{namespacegko_a785976e6dbc9d8511325617ca46040bf}{is\_zero}}(nz.value);\ \}),}
\DoxyCodeLine{00483\ \ \ \ \ \ \ \ \ \ \ \ \ end(\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}));}
\DoxyCodeLine{00484\ \ \ \ \ \}}
\DoxyCodeLine{00485\ }
\DoxyCodeLine{00490\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_aafdce2b510afe4e0aa0645a734f240a3}{sum\_duplicates}}()}
\DoxyCodeLine{00491\ \ \ \ \ \{}
\DoxyCodeLine{00492\ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{structgko_1_1matrix__data_ab2094160087e0d7fcbb85120f2138b52}{sort\_row\_major}}();}
\DoxyCodeLine{00493\ \ \ \ \ \ \ \ \ std::vector<nonzero\_type>\ new\_nonzeros;}
\DoxyCodeLine{00494\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.empty())\ \{}
\DoxyCodeLine{00495\ \ \ \ \ \ \ \ \ \ \ \ \ new\_nonzeros.emplace\_back(\doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.front().row,}
\DoxyCodeLine{00496\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}.front().column,}
\DoxyCodeLine{00497\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero<ValueType>}}());}
\DoxyCodeLine{00498\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\ entry\ :\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}})\ \{}
\DoxyCodeLine{00499\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (entry.row\ !=\ new\_nonzeros.back().row\ ||}
\DoxyCodeLine{00500\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ entry.column\ !=\ new\_nonzeros.back().column)\ \{}
\DoxyCodeLine{00501\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ new\_nonzeros.emplace\_back(entry.row,\ entry.column,}
\DoxyCodeLine{00502\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero<ValueType>}}());}
\DoxyCodeLine{00503\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00504\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ new\_nonzeros.back().value\ +=\ entry.value;}
\DoxyCodeLine{00505\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00506\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1matrix__data_a4f6be92270fa96bccdc502c83d248dc0}{nonzeros}}\ =\ std::move(new\_nonzeros);}
\DoxyCodeLine{00507\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00508\ \ \ \ \ \}}
\DoxyCodeLine{00509\ }
\DoxyCodeLine{00510\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00511\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Accessor>}
\DoxyCodeLine{00512\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ initialize\_diag\_with\_cond(}
\DoxyCodeLine{00513\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<ValueType>}}\ condition\_number,}
\DoxyCodeLine{00514\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1range}{range<Accessor>}}\&\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}})}
\DoxyCodeLine{00515\ \ \ \ \ \{}
\DoxyCodeLine{00516\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }sigma\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<ValueType>}};}
\DoxyCodeLine{00517\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\ =\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}.length(0);}
\DoxyCodeLine{00518\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ min\_sigma\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one}}(condition\_number)\ /\ sqrt(condition\_number);}
\DoxyCodeLine{00519\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ max\_sigma\ =\ sqrt(condition\_number);}
\DoxyCodeLine{00520\ }
\DoxyCodeLine{00521\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}\ =\ \doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero}}(\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}});}
\DoxyCodeLine{00522\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{gko::size\_type}}\ i\ =\ 0;\ i\ <\ \doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}};\ ++i)\ \{}
\DoxyCodeLine{00523\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}(i,\ i)\ =\ max\_sigma\ *\ \textcolor{keyword}{static\_cast<}sigma\_type\textcolor{keyword}{>}(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\ -\/\ i\ -\/\ 1)\ /}
\DoxyCodeLine{00524\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}sigma\_type\textcolor{keyword}{>}(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\ -\/\ 1)\ +}
\DoxyCodeLine{00525\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ min\_sigma\ *\ \textcolor{keyword}{static\_cast<}sigma\_type\textcolor{keyword}{>}(i)\ /}
\DoxyCodeLine{00526\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}sigma\_type\textcolor{keyword}{>}(\doxymbox{\hyperlink{structgko_1_1matrix__data_a30716bd9e39a7beed52fc56d737fc07b}{size}}\ -\/\ 1);}
\DoxyCodeLine{00527\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00528\ \ \ \ \ \}}
\DoxyCodeLine{00529\ }
\DoxyCodeLine{00530\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ RandomDistribution,\ \textcolor{keyword}{typename}\ RandomEngine,}
\DoxyCodeLine{00531\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ Accessor>}
\DoxyCodeLine{00532\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ generate\_random\_reflector(RandomDistribution\&\&\ dist,}
\DoxyCodeLine{00533\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ RandomEngine\&\&\ engine,}
\DoxyCodeLine{00534\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ range<Accessor>\&\ reflector)}
\DoxyCodeLine{00535\ \ \ \ \ \{}
\DoxyCodeLine{00536\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{gko::size\_type}}\ i\ =\ 0;\ i\ <\ reflector.length(0);\ ++i)\ \{}
\DoxyCodeLine{00537\ \ \ \ \ \ \ \ \ \ \ \ \ reflector(i,\ 0)\ =\ detail::get\_rand\_value<ValueType>(dist,\ engine);}
\DoxyCodeLine{00538\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00539\ \ \ \ \ \}}
\DoxyCodeLine{00540\ }
\DoxyCodeLine{00541\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Accessor>}
\DoxyCodeLine{00542\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ reflect\_domain(\textcolor{keyword}{const}\ range<Accessor>\&\ reflector,}
\DoxyCodeLine{00543\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ range<Accessor>\&\ matrix,}
\DoxyCodeLine{00544\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ValueType*\ work\_data)}
\DoxyCodeLine{00545\ \ \ \ \ \{}
\DoxyCodeLine{00546\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ two\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}()\ +\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}();}
\DoxyCodeLine{00547\ \ \ \ \ \ \ \ \ range<accessor::row\_major<ValueType,\ 2>>\ work(work\_data,}
\DoxyCodeLine{00548\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ matrix.length(0),\ 1u,\ 1u);}
\DoxyCodeLine{00549\ \ \ \ \ \ \ \ \ work\ =\ mmul(matrix,\ reflector);}
\DoxyCodeLine{00550\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ ct\_reflector\ =\ \doxymbox{\hyperlink{namespacegko_ad79fd5c1fb85403796c40c0a916a15f2}{conj}}(\doxymbox{\hyperlink{namespacegko_aacad7f87b38d3f26674ed034d442a1a0}{transpose}}(reflector));}
\DoxyCodeLine{00551\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ scale\ =\ two\ /\ mmul(ct\_reflector,\ reflector)(0,\ 0);}
\DoxyCodeLine{00552\ \ \ \ \ \ \ \ \ matrix\ =\ matrix\ -\/\ scale\ *\ mmul(work,\ ct\_reflector);}
\DoxyCodeLine{00553\ \ \ \ \ \}}
\DoxyCodeLine{00554\ }
\DoxyCodeLine{00555\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Accessor>}
\DoxyCodeLine{00556\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ reflect\_range(\textcolor{keyword}{const}\ range<Accessor>\&\ reflector,}
\DoxyCodeLine{00557\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ range<Accessor>\&\ matrix,}
\DoxyCodeLine{00558\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ValueType*\ work\_data)}
\DoxyCodeLine{00559\ \ \ \ \ \{}
\DoxyCodeLine{00560\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ two\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}()\ +\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}();}
\DoxyCodeLine{00561\ \ \ \ \ \ \ \ \ range<accessor::row\_major<ValueType,\ 2>>\ work(}
\DoxyCodeLine{00562\ \ \ \ \ \ \ \ \ \ \ \ \ work\_data,\ 1u,\ matrix.length(0),\ matrix.length(0));}
\DoxyCodeLine{00563\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ ct\_reflector\ =\ \doxymbox{\hyperlink{namespacegko_ad79fd5c1fb85403796c40c0a916a15f2}{conj}}(\doxymbox{\hyperlink{namespacegko_aacad7f87b38d3f26674ed034d442a1a0}{transpose}}(reflector));}
\DoxyCodeLine{00564\ \ \ \ \ \ \ \ \ work\ =\ mmul(ct\_reflector,\ matrix);}
\DoxyCodeLine{00565\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ scale\ =\ two\ /\ mmul(ct\_reflector,\ reflector)(0,\ 0);}
\DoxyCodeLine{00566\ \ \ \ \ \ \ \ \ matrix\ =\ matrix\ -\/\ scale\ *\ mmul(reflector,\ work);}
\DoxyCodeLine{00567\ \ \ \ \ \}}
\DoxyCodeLine{00568\ \};}
\DoxyCodeLine{00569\ }
\DoxyCodeLine{00570\ }
\DoxyCodeLine{00571\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00572\ }
\DoxyCodeLine{00573\ }
\DoxyCodeLine{00574\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_BASE\_MATRIX\_DATA\_HPP\_}}

\end{DoxyCode}
