Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
Kokkos::SparseRowViewConst< MatrixType > Class Template Reference

Const view of a row of a sparse matrix. More...

#include <Kokkos_CrsMatrix.hpp>

Public Types

typedef const
MatrixType::non_const_value_type 
value_type
 The type of the values in the row. More...
 
typedef const
MatrixType::non_const_ordinal_type 
ordinal_type
 The type of the column indices in the row. More...
 

Public Member Functions

KOKKOS_INLINE_FUNCTION SparseRowViewConst (value_type *const values, ordinal_type *const colidx__, const int stride, const int count)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION SparseRowViewConst (const typename MatrixType::values_type &values, const typename MatrixType::index_type &colidx__, const int &stride, const int &count, const int &idx)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION value_typevalue (const int &i) const
 (Const) reference to the value of entry i in this row of the sparse matrix. More...
 
KOKKOS_INLINE_FUNCTION
ordinal_type
colidx (const int &i) const
 (Const) reference to the column index of entry i in this row of the sparse matrix. More...
 

Public Attributes

const int length
 Number of entries in the row. More...
 

Detailed Description

template<class MatrixType>
class Kokkos::SparseRowViewConst< MatrixType >

Const view of a row of a sparse matrix.

Template Parameters
MatrixTypeSparse matrix type, such as (but not limited to) CrsMatrix.

This class is like SparseRowView, except that it provides a const view. This class exists in order to let users get a const view of a row of a nonconst matrix.

Definition at line 194 of file Kokkos_CrsMatrix.hpp.

Member Typedef Documentation

template<class MatrixType>
typedef const MatrixType::non_const_value_type Kokkos::SparseRowViewConst< MatrixType >::value_type

The type of the values in the row.

Definition at line 196 of file Kokkos_CrsMatrix.hpp.

template<class MatrixType>
typedef const MatrixType::non_const_ordinal_type Kokkos::SparseRowViewConst< MatrixType >::ordinal_type

The type of the column indices in the row.

Definition at line 198 of file Kokkos_CrsMatrix.hpp.

Constructor & Destructor Documentation

template<class MatrixType>
KOKKOS_INLINE_FUNCTION Kokkos::SparseRowViewConst< MatrixType >::SparseRowViewConst ( value_type *const  values,
ordinal_type *const  colidx__,
const int  stride,
const int  count 
)
inline

Constructor.

Parameters
values[in] Array of the row's values.
colidx[in] Array of the row's column indices.
stride[in] (Constant) stride between matrix entries in each of the above arrays.
count[in] Number of entries in the row.

Definition at line 217 of file Kokkos_CrsMatrix.hpp.

template<class MatrixType>
KOKKOS_INLINE_FUNCTION Kokkos::SparseRowViewConst< MatrixType >::SparseRowViewConst ( const typename MatrixType::values_type &  values,
const typename MatrixType::index_type &  colidx__,
const int &  stride,
const int &  count,
const int &  idx 
)
inline

Constructor.

Parameters
values[in] Array of the row's values.
colidx[in] Array of the row's column indices.
stride[in] (Constant) stride between matrix entries in each of the above arrays.
count[in] Number of entries in the row.

Definition at line 231 of file Kokkos_CrsMatrix.hpp.

Member Function Documentation

template<class MatrixType>
KOKKOS_INLINE_FUNCTION value_type& Kokkos::SparseRowViewConst< MatrixType >::value ( const int &  i) const
inline

(Const) reference to the value of entry i in this row of the sparse matrix.

"Entry i" is not necessarily the entry with column index i, nor does i necessarily correspond to the (local) row index.

Definition at line 251 of file Kokkos_CrsMatrix.hpp.

template<class MatrixType>
KOKKOS_INLINE_FUNCTION ordinal_type& Kokkos::SparseRowViewConst< MatrixType >::colidx ( const int &  i) const
inline

(Const) reference to the column index of entry i in this row of the sparse matrix.

"Entry i" is not necessarily the entry with column index i, nor does i necessarily correspond to the (local) row index.

Definition at line 260 of file Kokkos_CrsMatrix.hpp.

Member Data Documentation

template<class MatrixType>
const int Kokkos::SparseRowViewConst< MatrixType >::length

Number of entries in the row.

This is a public const field rather than a public const method, in order to avoid possible overhead of a method call if the compiler is unable to inline that method call.

Definition at line 244 of file Kokkos_CrsMatrix.hpp.


The documentation for this class was generated from the following file: