Kokkos Core Kernels Package
Version of the Day
|
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... | |
Compressed row storage array.
DataType | The 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. |
Arg1Type | The 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). |
Arg2Type | The third template parameter, which if provided corresponds to the Device type. |
SizeType | The 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:
row_map[i0] <= entry < row_map[i0+1]
0 <= i1 < row_map[i0+1] - row_map[i0]
entries( entry , i2 , i3 , ... );
entries( row_map[i0] + i1 , i2 , i3 , ... );
Definition at line 63 of file Kokkos_Crs.hpp.
|
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.
|
inline |
Return number of rows in the graph.
Definition at line 106 of file Kokkos_Crs.hpp.