\doxysection{gko::\+batch::\+matrix::\+Csr\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1batch_1_1matrix_1_1Csr}{}\label{classgko_1_1batch_1_1matrix_1_1Csr}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}


\doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{Csr} is a general sparse matrix format that stores the column indices for each nonzero entry and a cumulative sum of the number of nonzeros in each row.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+matrix/\+batch\+\_\+csr.\+hpp$>$}



Inheritance diagram for gko::\+batch::\+matrix::\+Csr\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1batch_1_1matrix_1_1Csr__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+batch::\+matrix::\+Csr\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1batch_1_1matrix_1_1Csr__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a6ccf3e89c4642e4101c3b1324016cb7e}\label{classgko_1_1batch_1_1matrix_1_1Csr_a6ccf3e89c4642e4101c3b1324016cb7e} 
using {\bfseries value\+\_\+type} = Value\+Type
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a008e00b1a1fbfb4b3d5c97c793b4b080}\label{classgko_1_1batch_1_1matrix_1_1Csr_a008e00b1a1fbfb4b3d5c97c793b4b080} 
using {\bfseries index\+\_\+type} = Index\+Type
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_af50d537217dd358f08ef27ca62a62141}\label{classgko_1_1batch_1_1matrix_1_1Csr_af50d537217dd358f08ef27ca62a62141} 
using {\bfseries unbatch\+\_\+type} = \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{gko::\+matrix::\+\+Csr}}$<$value\+\_\+type, index\+\_\+type$>$
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a2e4eef3231a147d1fce83a87504e95dc}\label{classgko_1_1batch_1_1matrix_1_1Csr_a2e4eef3231a147d1fce83a87504e95dc} 
using {\bfseries absolute\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\+\_\+complex}}$<$Csr$>$
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a5bc6688a25c66978b598341e018b7115}\label{classgko_1_1batch_1_1matrix_1_1Csr_a5bc6688a25c66978b598341e018b7115} 
using {\bfseries complex\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\+\_\+complex}}$<$Csr$>$
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Csr$<$ default\+\_\+precision, int32 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a679aa9271419fc690698eb89b59426e3}\label{classgko_1_1batch_1_1matrix_1_1Csr_a679aa9271419fc690698eb89b59426e3} 
void {\bfseries convert\+\_\+to} (Csr$<$ \doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\+\_\+precision}}$<$ Value\+Type $>$, Index\+Type $>$ \texorpdfstring{$\ast$}{*}result) const override
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a501e1adce9f0f111f3dd5dd366386fde}\label{classgko_1_1batch_1_1matrix_1_1Csr_a501e1adce9f0f111f3dd5dd366386fde} 
void {\bfseries move\+\_\+to} (Csr$<$ \doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\+\_\+precision}}$<$ Value\+Type $>$, Index\+Type $>$ \texorpdfstring{$\ast$}{*}result) override
\item 
std::\+unique\+\_\+ptr$<$ unbatch\+\_\+type $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_afded6329a86f2eb4f1d2b7d6d7719359}{create\+\_\+view\+\_\+for\+\_\+item}} (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} item\+\_\+id)
\begin{DoxyCompactList}\small\item\em Creates a mutable view (of \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{matrix::\+\+Csr} type) of one item of the \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{batch::\+matrix::\+\+Csr$<$value\+\_\+type$>$} object. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ const unbatch\+\_\+type $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a241bc10f81962c7e0b35c517dd6e8222}{create\+\_\+const\+\_\+view\+\_\+for\+\_\+item}} (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} item\+\_\+id) const
\begin{DoxyCompactList}\small\item\em Creates a mutable view (of \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{matrix::\+\+Csr} type) of one item of the \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{batch::\+matrix::\+\+Csr$<$value\+\_\+type$>$} object.    \end{DoxyCompactList}\item 
value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a57cdd4d42f14917d47c5d7b96474e802}{get\+\_\+values}} () noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of values of the matrix. \end{DoxyCompactList}\item 
const value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_ae0aee55cbf7f9eb061472b18b5e1281d}{get\+\_\+const\+\_\+values}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of values of the matrix.    \end{DoxyCompactList}\item 
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a6d8a7b96be2834082768e8098c1a424d}{get\+\_\+col\+\_\+idxs}} () noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of column indices of the matrix. \end{DoxyCompactList}\item 
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a83e45d1dfa784a4f09e57f8b51d1f607}{get\+\_\+const\+\_\+col\+\_\+idxs}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of column indices of the matrix.    \end{DoxyCompactList}\item 
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_aee69116cc418c128d984a634d701e8eb}{get\+\_\+row\+\_\+ptrs}} () noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of row pointers of the matrix. \end{DoxyCompactList}\item 
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a6029a4db301094784d3f13dadf40bdd9}{get\+\_\+const\+\_\+row\+\_\+ptrs}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of row pointers of the matrix.    \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a32c35e5a01191c37d46a44b2eca3551b}{get\+\_\+num\+\_\+stored\+\_\+elements}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns the number of elements explicitly stored in the batch matrix, cumulative across all the batch items. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a8a83dc917e64e56912e89e1b09be117e}{get\+\_\+num\+\_\+elements\+\_\+per\+\_\+item}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns the number of stored elements in each batch item. \end{DoxyCompactList}\item 
value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a178585a6ece8f57313998389e7404b92}{get\+\_\+values\+\_\+for\+\_\+item}} (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} batch\+\_\+id) noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of values of the matrix for a specific batch item. \end{DoxyCompactList}\item 
const value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_aa3075e9893d383dc4fad852201cec317}{get\+\_\+const\+\_\+values\+\_\+for\+\_\+item}} (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} batch\+\_\+id) const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of values of the matrix for a specific batch item.    \end{DoxyCompactList}\item 
Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a3bb8d9cdcf97bcfb87c9870208242905}{apply}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ x)
\begin{DoxyCompactList}\small\item\em Apply the matrix to a multi-\/vector. \end{DoxyCompactList}\item 
Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a67b5b1ac586ea53ec0fca9f6117ea75f}{apply}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ alpha, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ beta, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ x)
\begin{DoxyCompactList}\small\item\em Apply the matrix to a multi-\/vector with a linear combination of the given input vector. \end{DoxyCompactList}\item 
const Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a128ab19ac40af0320078b185628ab162}{apply}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ x) const
\item 
const Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a5a732a033e9092f116a5347cae88d551}{apply}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ alpha, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ beta, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ x) const
\item 
void \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a077d6da7d3572f0813da946555b6a64d}{scale}} (const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$ \&row\+\_\+scale, const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$ \&col\+\_\+scale)
\begin{DoxyCompactList}\small\item\em Performs in-\/place row and column scaling for this matrix. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_ae878dfc049b3eebbeb1ae6f196aa7017}{add\+\_\+scaled\+\_\+identity}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ alpha, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$ beta)
\begin{DoxyCompactList}\small\item\em Performs the operation this = alpha\texorpdfstring{$\ast$}{*}I + beta\texorpdfstring{$\ast$}{*}this. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Csr$<$ default\+\_\+precision, int32 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
void {\bfseries convert\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) const override
\item 
void {\bfseries move\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) override
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std::\+unique\+\_\+ptr$<$ Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_aa6fdee51616719f9fe09de182d556177}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&size=\doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$\{\}, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} num\+\_\+nonzeros\+\_\+per\+\_\+item=\{\})
\begin{DoxyCompactList}\small\item\em Creates an uninitialized \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{Csr} matrix of the specified size. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a5ed96cd3395e135d827f23928cab82d6}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&size, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$ values, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ col\+\_\+idxs, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ row\+\_\+ptrs)
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{Csr} matrix from an already allocated (and initialized) array. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Input\+Value\+Type, typename Col\+Index\+Type, typename Row\+Ptr\+Type$>$ }\\static std::\+unique\+\_\+ptr$<$ Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_aabc49db09041da875930987d6a3c3b7e}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&size, std::\+initializer\+\_\+list$<$ Input\+Value\+Type $>$ values, std::\+initializer\+\_\+list$<$ Col\+Index\+Type $>$ col\+\_\+idxs, std::\+initializer\+\_\+list$<$ Row\+Ptr\+Type $>$ row\+\_\+ptrs)
\begin{DoxyCompactList}\small\item\em \doxylink{classgko_1_1batch_1_1matrix_1_1Csr_a5ed96cd3395e135d827f23928cab82d6}{create(std::\+shared\+\_\+ptr$<$const Executor$>$,const batch\+\_\+dim$<$2$>$\&, array$<$value\+\_\+type$>$, array$<$index\+\_\+type$>$,array$<$index\+\_\+type$>$)} \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ const Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a64e928475313e3fa3185a7ab8517ac42}{create\+\_\+const}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&sizes, gko::\+detail::\+const\+\_\+array\+\_\+view$<$ value\+\_\+type $>$ \&\&values, gko::\+detail::\+const\+\_\+array\+\_\+view$<$ index\+\_\+type $>$ \&\&col\+\_\+idxs, gko::\+detail::\+const\+\_\+array\+\_\+view$<$ index\+\_\+type $>$ \&\&row\+\_\+ptrs)
\begin{DoxyCompactList}\small\item\em Creates a constant (immutable) batch csr matrix from a constant array. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_adc67771e66f7db3eef337ca846c55591}\label{classgko_1_1batch_1_1matrix_1_1Csr_adc67771e66f7db3eef337ca846c55591} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Csr, Batch\+Lin\+Op $>$}
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_aac51cfd57c6d3d565c558531f39f3943}\label{classgko_1_1batch_1_1matrix_1_1Csr_aac51cfd57c6d3d565c558531f39f3943} 
class {\bfseries Csr$<$ to\+\_\+complex$<$ Value\+Type $>$, Index\+Type $>$}
\item 
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a4b1942447c3f2e07a76e2f5614d6f5f1}\label{classgko_1_1batch_1_1matrix_1_1Csr_a4b1942447c3f2e07a76e2f5614d6f5f1} 
class {\bfseries Csr$<$ previous\+\_\+precision$<$ Value\+Type $>$, Index\+Type $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$\newline
class gko::\+batch::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$}
\doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{Csr} is a general sparse matrix format that stores the column indices for each nonzero entry and a cumulative sum of the number of nonzeros in each row. 

It is one of the most popular sparse matrix formats due to its versatility and ability to store a wide range of sparsity patterns in an efficient fashion.

\begin{DoxyNote}{Note}
It is assumed that the sparsity pattern of all the items in the batch is the same and therefore only a single copy of the sparsity pattern is stored.

Currently only Index\+Type of \doxylink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32} is supported.
\end{DoxyNote}

\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & value precision of matrix elements \\
\hline
{\em Index\+Type} & index precision of matrix elements \\
\hline
\end{DoxyTemplParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_ae878dfc049b3eebbeb1ae6f196aa7017}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!add\_scaled\_identity@{add\_scaled\_identity}}
\index{add\_scaled\_identity@{add\_scaled\_identity}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{add\_scaled\_identity()}{add\_scaled\_identity()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_ae878dfc049b3eebbeb1ae6f196aa7017} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
void \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+add\+\_\+scaled\+\_\+identity (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{alpha}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{beta}{}\end{DoxyParamCaption})}



Performs the operation this = alpha\texorpdfstring{$\ast$}{*}I + beta\texorpdfstring{$\ast$}{*}this. 


\begin{DoxyParams}{Parameters}
{\em alpha} & the scalar for identity \\
\hline
{\em beta} & the scalar to multiply this matrix\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
Performs the operation in-\/place for this batch matrix 

This operation fails in case this matrix does not have all its diagonal entries. 
\end{DoxyNote}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a67b5b1ac586ea53ec0fca9f6117ea75f}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!apply@{apply}}
\index{apply@{apply}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{apply()}{apply()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a67b5b1ac586ea53ec0fca9f6117ea75f} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+apply (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{alpha}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{b}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{beta}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{x}{}\end{DoxyParamCaption})}



Apply the matrix to a multi-\/vector with a linear combination of the given input vector. 

Represents the matrix vector multiplication, x = alpha \texorpdfstring{$\ast$}{*} A
\begin{DoxyItemize}
\item b + beta \texorpdfstring{$\ast$}{*} x, where x and b are both multi-\/vectors.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em alpha} & the scalar to scale the matrix-\/vector product with \\
\hline
{\em b} & the multi-\/vector to be applied to \\
\hline
{\em beta} & the scalar to scale the x vector with \\
\hline
{\em x} & the output multi-\/vector \\
\hline
\end{DoxyParams}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a5a732a033e9092f116a5347cae88d551}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!apply@{apply}}
\index{apply@{apply}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{apply()}{apply()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a5a732a033e9092f116a5347cae88d551} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
const Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+apply (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{alpha}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{b}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{beta}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{x}{}\end{DoxyParamCaption}) const}





\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a3bb8d9cdcf97bcfb87c9870208242905}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!apply@{apply}}
\index{apply@{apply}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{apply()}{apply()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a3bb8d9cdcf97bcfb87c9870208242905} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+apply (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{b}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{x}{}\end{DoxyParamCaption})}



Apply the matrix to a multi-\/vector. 

Represents the matrix vector multiplication, x = A \texorpdfstring{$\ast$}{*} b, where x and b are both multi-\/vectors.


\begin{DoxyParams}{Parameters}
{\em b} & the multi-\/vector to be applied to \\
\hline
{\em x} & the output multi-\/vector \\
\hline
\end{DoxyParams}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a128ab19ac40af0320078b185628ab162}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!apply@{apply}}
\index{apply@{apply}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{apply()}{apply()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a128ab19ac40af0320078b185628ab162} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
const Csr \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+apply (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{b}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ value\+\_\+type $>$ $>$}]{x}{}\end{DoxyParamCaption}) const}





\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a5ed96cd3395e135d827f23928cab82d6}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!create@{create}}
\index{create@{create}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a5ed96cd3395e135d827f23928cab82d6} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&}]{size}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$}]{values}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$}]{col\+\_\+idxs}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$}]{row\+\_\+ptrs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{Csr} matrix from an already allocated (and initialized) array. 

The column indices array needs to be the same for all batch items.


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the matrix \\
\hline
{\em values} & array of matrix values \\
\hline
{\em col\+\_\+idxs} & the col\+\_\+idxs array of a single batch item of the matrix. \\
\hline
{\em row\+\_\+ptrs} & the row\+\_\+ptrs array of a single batch item of the matrix.\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
If {\ttfamily values} is not an rvalue, not an array of Value\+Type, or is on the wrong executor, an internal copy will be created, and the original array data will not be used in the matrix.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_aabc49db09041da875930987d6a3c3b7e}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!create@{create}}
\index{create@{create}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_aabc49db09041da875930987d6a3c3b7e} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
template$<$typename Input\+Value\+Type, typename Col\+Index\+Type, typename Row\+Ptr\+Type$>$ \\
std::\+unique\+\_\+ptr$<$ Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&}]{size}{, }\item[{std::\+initializer\+\_\+list$<$ Input\+Value\+Type $>$}]{values}{, }\item[{std::\+initializer\+\_\+list$<$ Col\+Index\+Type $>$}]{col\+\_\+idxs}{, }\item[{std::\+initializer\+\_\+list$<$ Row\+Ptr\+Type $>$}]{row\+\_\+ptrs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



\doxylink{classgko_1_1batch_1_1matrix_1_1Csr_a5ed96cd3395e135d827f23928cab82d6}{create(std::\+shared\+\_\+ptr$<$const Executor$>$,const batch\+\_\+dim$<$2$>$\&, array$<$value\+\_\+type$>$, array$<$index\+\_\+type$>$,array$<$index\+\_\+type$>$)} 

\doxylink{classgko_1_1batch_1_1matrix_1_1Csr_a5ed96cd3395e135d827f23928cab82d6}{create(std::\+shared\+\_\+ptr$<$const Executor$>$,const batch\+\_\+dim$<$2$>$\&, array$<$value\+\_\+type$>$, array$<$index\+\_\+type$>$,array$<$index\+\_\+type$>$)} \Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_aa6fdee51616719f9fe09de182d556177}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!create@{create}}
\index{create@{create}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_aa6fdee51616719f9fe09de182d556177} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&}]{size}{ = {\ttfamily \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$~2~$>$\{\}}, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{num\+\_\+nonzeros\+\_\+per\+\_\+item}{ = {\ttfamily \{\}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates an uninitialized \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{Csr} matrix of the specified size. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the matrix \\
\hline
{\em num\+\_\+nonzeros\+\_\+per\+\_\+item} & number of nonzeros in each item of the batch matrix \\
\hline
\end{DoxyParams}


Referenced by \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_aabc49db09041da875930987d6a3c3b7e}{create()}}.

\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a64e928475313e3fa3185a7ab8517ac42}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!create\_const@{create\_const}}
\index{create\_const@{create\_const}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create\_const()}{create\_const()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a64e928475313e3fa3185a7ab8517ac42} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ const Csr $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+create\+\_\+const (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\+\_\+dim}}$<$ 2 $>$ \&}]{sizes}{, }\item[{gko::\+detail::\+const\+\_\+array\+\_\+view$<$ value\+\_\+type $>$ \&\&}]{values}{, }\item[{gko::\+detail::\+const\+\_\+array\+\_\+view$<$ index\+\_\+type $>$ \&\&}]{col\+\_\+idxs}{, }\item[{gko::\+detail::\+const\+\_\+array\+\_\+view$<$ index\+\_\+type $>$ \&\&}]{row\+\_\+ptrs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a constant (immutable) batch csr matrix from a constant array. 

Only a single sparsity pattern (column indices and row pointers) is stored and hence the user needs to ensure that each batch item has the same sparsity pattern.


\begin{DoxyParams}{Parameters}
{\em exec} & the executor to create the matrix on \\
\hline
{\em size} & the dimensions of the matrix \\
\hline
{\em values} & the value array of the matrix \\
\hline
{\em col\+\_\+idxs} & the col\+\_\+idxs array of a single batch item of the matrix. \\
\hline
{\em row\+\_\+ptrs} & the row\+\_\+ptrs array of a single batch item of the matrix.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the constant matrix wrapping the input array (if it resides on the same executor as the matrix) or a copy of the array on the correct executor.

A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a241bc10f81962c7e0b35c517dd6e8222}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!create\_const\_view\_for\_item@{create\_const\_view\_for\_item}}
\index{create\_const\_view\_for\_item@{create\_const\_view\_for\_item}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create\_const\_view\_for\_item()}{create\_const\_view\_for\_item()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a241bc10f81962c7e0b35c517dd6e8222} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ const unbatch\+\_\+type $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+create\+\_\+const\+\_\+view\+\_\+for\+\_\+item (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{item\+\_\+id}{}\end{DoxyParamCaption}) const}



Creates a mutable view (of \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{matrix::\+\+Csr} type) of one item of the \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{batch::\+matrix::\+\+Csr$<$value\+\_\+type$>$} object.    

Does not perform any deep copies, but only returns a view of the data.


\begin{DoxyParams}{Parameters}
{\em item\+\_\+id} & The index of the batch item\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{batch::\+matrix::\+\+Csr} object with the data from the batch item at the given index.    
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_afded6329a86f2eb4f1d2b7d6d7719359}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!create\_view\_for\_item@{create\_view\_for\_item}}
\index{create\_view\_for\_item@{create\_view\_for\_item}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create\_view\_for\_item()}{create\_view\_for\_item()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_afded6329a86f2eb4f1d2b7d6d7719359} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ unbatch\+\_\+type $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+create\+\_\+view\+\_\+for\+\_\+item (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{item\+\_\+id}{}\end{DoxyParamCaption})}



Creates a mutable view (of \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{matrix::\+\+Csr} type) of one item of the \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{batch::\+matrix::\+\+Csr$<$value\+\_\+type$>$} object. 

Does not perform any deep copies, but only returns a view of the data.


\begin{DoxyParams}{Parameters}
{\em item\+\_\+id} & The index of the batch item\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \doxylink{classgko_1_1batch_1_1matrix_1_1Csr}{batch::\+matrix::\+\+Csr} object with the data from the batch item at the given index. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a6d8a7b96be2834082768e8098c1a424d}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_col\_idxs@{get\_col\_idxs}}
\index{get\_col\_idxs@{get\_col\_idxs}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_col\_idxs()}{get\_col\_idxs()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a6d8a7b96be2834082768e8098c1a424d} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+col\+\_\+idxs (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of column indices of the matrix. 

\begin{DoxyReturn}{Returns}
the pointer to the array of column indices 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a83e45d1dfa784a4f09e57f8b51d1f607}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_const\_col\_idxs@{get\_const\_col\_idxs}}
\index{get\_const\_col\_idxs@{get\_const\_col\_idxs}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_col\_idxs()}{get\_const\_col\_idxs()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a83e45d1dfa784a4f09e57f8b51d1f607} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+const\+\_\+col\+\_\+idxs (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of column indices of the matrix.    

\begin{DoxyReturn}{Returns}
the pointer to the array of column indices   
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This is the constant version of the function, which can be significantly more memory efficient than the non-\/constant version, so always prefer this version. 
\end{DoxyNote}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a6029a4db301094784d3f13dadf40bdd9}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_const\_row\_ptrs@{get\_const\_row\_ptrs}}
\index{get\_const\_row\_ptrs@{get\_const\_row\_ptrs}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_row\_ptrs()}{get\_const\_row\_ptrs()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a6029a4db301094784d3f13dadf40bdd9} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+const\+\_\+row\+\_\+ptrs (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of row pointers of the matrix.    

\begin{DoxyReturn}{Returns}
the pointer to the array of row pointers   
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This is the constant version of the function, which can be significantly more memory efficient than the non-\/constant version, so always prefer this version. 
\end{DoxyNote}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_ae0aee55cbf7f9eb061472b18b5e1281d}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_const\_values@{get\_const\_values}}
\index{get\_const\_values@{get\_const\_values}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_values()}{get\_const\_values()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_ae0aee55cbf7f9eb061472b18b5e1281d} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
const value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+const\+\_\+values (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of values of the matrix.    

\begin{DoxyReturn}{Returns}
the pointer to the array of values   
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This is the constant version of the function, which can be significantly more memory efficient than the non-\/constant version, so always prefer this version. 
\end{DoxyNote}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_aa3075e9893d383dc4fad852201cec317}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_const\_values\_for\_item@{get\_const\_values\_for\_item}}
\index{get\_const\_values\_for\_item@{get\_const\_values\_for\_item}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_values\_for\_item()}{get\_const\_values\_for\_item()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_aa3075e9893d383dc4fad852201cec317} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
const value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+const\+\_\+values\+\_\+for\+\_\+item (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{batch\+\_\+id}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of values of the matrix for a specific batch item.    


\begin{DoxyParams}{Parameters}
{\em batch\+\_\+id} & the id of the batch item.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the pointer to the array of values   
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This is the constant version of the function, which can be significantly more memory efficient than the non-\/constant version, so always prefer this version. 
\end{DoxyNote}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a8a83dc917e64e56912e89e1b09be117e}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_num\_elements\_per\_item@{get\_num\_elements\_per\_item}}
\index{get\_num\_elements\_per\_item@{get\_num\_elements\_per\_item}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_num\_elements\_per\_item()}{get\_num\_elements\_per\_item()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a8a83dc917e64e56912e89e1b09be117e} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+num\+\_\+elements\+\_\+per\+\_\+item (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns the number of stored elements in each batch item. 

\begin{DoxyReturn}{Returns}
the number of stored elements per batch item. 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_aa3075e9893d383dc4fad852201cec317}{get\+\_\+const\+\_\+values\+\_\+for\+\_\+item()}}, and \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a178585a6ece8f57313998389e7404b92}{get\+\_\+values\+\_\+for\+\_\+item()}}.

\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a32c35e5a01191c37d46a44b2eca3551b}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_num\_stored\_elements@{get\_num\_stored\_elements}}
\index{get\_num\_stored\_elements@{get\_num\_stored\_elements}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_num\_stored\_elements()}{get\_num\_stored\_elements()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a32c35e5a01191c37d46a44b2eca3551b} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+num\+\_\+stored\+\_\+elements (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns the number of elements explicitly stored in the batch matrix, cumulative across all the batch items. 

\begin{DoxyReturn}{Returns}
the number of elements explicitly stored in the vector, cumulative across all the batch items 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr_a8a83dc917e64e56912e89e1b09be117e}{get\+\_\+num\+\_\+elements\+\_\+per\+\_\+item()}}.

\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_aee69116cc418c128d984a634d701e8eb}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_row\_ptrs@{get\_row\_ptrs}}
\index{get\_row\_ptrs@{get\_row\_ptrs}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_row\_ptrs()}{get\_row\_ptrs()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_aee69116cc418c128d984a634d701e8eb} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+row\+\_\+ptrs (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of row pointers of the matrix. 

\begin{DoxyReturn}{Returns}
the pointer to the array of row pointers 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a57cdd4d42f14917d47c5d7b96474e802}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_values@{get\_values}}
\index{get\_values@{get\_values}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_values()}{get\_values()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a57cdd4d42f14917d47c5d7b96474e802} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+values (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of values of the matrix. 

\begin{DoxyReturn}{Returns}
the pointer to the array of values 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a178585a6ece8f57313998389e7404b92}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!get\_values\_for\_item@{get\_values\_for\_item}}
\index{get\_values\_for\_item@{get\_values\_for\_item}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_values\_for\_item()}{get\_values\_for\_item()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a178585a6ece8f57313998389e7404b92} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+get\+\_\+values\+\_\+for\+\_\+item (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{batch\+\_\+id}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of values of the matrix for a specific batch item. 


\begin{DoxyParams}{Parameters}
{\em batch\+\_\+id} & the id of the batch item.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the pointer to the array of values 
\end{DoxyReturn}
\Hypertarget{classgko_1_1batch_1_1matrix_1_1Csr_a077d6da7d3572f0813da946555b6a64d}\index{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}!scale@{scale}}
\index{scale@{scale}!gko::batch::matrix::Csr$<$ ValueType, IndexType $>$@{gko::batch::matrix::Csr$<$ ValueType, IndexType $>$}}
\doxysubsubsection{\texorpdfstring{scale()}{scale()}}
{\footnotesize\ttfamily \label{classgko_1_1batch_1_1matrix_1_1Csr_a077d6da7d3572f0813da946555b6a64d} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
void \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Csr}{gko::\+batch::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+scale (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$ \&}]{row\+\_\+scale}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$ \&}]{col\+\_\+scale}{}\end{DoxyParamCaption})}



Performs in-\/place row and column scaling for this matrix. 


\begin{DoxyParams}{Parameters}
{\em row\+\_\+scale} & the row scalars \\
\hline
{\em col\+\_\+scale} & the column scalars \\
\hline
\end{DoxyParams}


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