Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
Kokkos::Crs< DataType, Arg1Type, Arg2Type, SizeType > Class Template Reference

Compressed row storage array. More...

#include <Kokkos_Crs.hpp>

Public Member Functions

template<class EntriesType , class RowMapType >
KOKKOS_INLINE_FUNCTION Crs (const RowMapType &row_map_, const EntriesType &entries_)
 Assign to a view of the rhs array. If the old view is the last view then allocated memory is deallocated. More...
 
KOKKOS_INLINE_FUNCTION size_type numRows () const
 Return number of rows in the graph. More...
 

Detailed Description

template<class DataType, class Arg1Type, class Arg2Type = void, typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void>::size_type>
class Kokkos::Crs< DataType, Arg1Type, Arg2Type, SizeType >

Compressed row storage array.

Template Parameters
DataTypeThe type of stored entries. If a Crs is used as the graph of a sparse matrix, then this is usually an integer type, the type of the column indices in the sparse matrix.
Arg1TypeThe second template parameter, corresponding either to the Device type (if there are no more template parameters) or to the Layout type (if there is at least one more template parameter).
Arg2TypeThe third template parameter, which if provided corresponds to the Device type.
SizeTypeThe type of row offsets. Usually the default parameter suffices. However, setting a nondefault value is necessary in some cases, for example, if you want to have a sparse matrices with dimensions (and therefore column indices) that fit in int, but want to store more than INT_MAX entries in the sparse matrix.

A row has a range of entries:

Definition at line 63 of file Kokkos_Crs.hpp.

Constructor & Destructor Documentation

template<class DataType , class Arg1Type , class Arg2Type = void, typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void>::size_type>
template<class EntriesType , class RowMapType >
KOKKOS_INLINE_FUNCTION Kokkos::Crs< DataType, Arg1Type, Arg2Type, SizeType >::Crs ( const RowMapType &  row_map_,
const EntriesType &  entries_ 
)
inline

Assign to a view of the rhs array. If the old view is the last view then allocated memory is deallocated.

Definition at line 99 of file Kokkos_Crs.hpp.

Member Function Documentation

template<class DataType , class Arg1Type , class Arg2Type = void, typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void>::size_type>
KOKKOS_INLINE_FUNCTION size_type Kokkos::Crs< DataType, Arg1Type, Arg2Type, SizeType >::numRows ( ) const
inline

Return number of rows in the graph.

Definition at line 106 of file Kokkos_Crs.hpp.


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