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::CrsArray< DataType, Arg1Type, Arg2Type, SizeType > Class Template Reference

Compressed row storage array. More...

#include <Kokkos_CrsArray.hpp>

Public Member Functions

 CrsArray ()
 Construct an empty view. More...
 
 CrsArray (const CrsArray &rhs)
 Copy constructor (shallow copy). More...
 
CrsArrayoperator= (const CrsArray &rhs)
 Assign to a view of the rhs array. If the old view is the last view then allocated memory is deallocated. More...
 
 ~CrsArray ()
 Destroy this view of the array. If the last view then allocated memory is deallocated. More...
 

Detailed Description

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

Compressed row storage array.

Template Parameters
DataTypeThe type of stored entries. If a CrsArray 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 Space 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 Space 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 90 of file Kokkos_CrsArray.hpp.

Constructor & Destructor Documentation

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

Construct an empty view.

Definition at line 110 of file Kokkos_CrsArray.hpp.

template<class DataType, class Arg1Type, class Arg2Type = void, typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void >::size_type>
Kokkos::CrsArray< DataType, Arg1Type, Arg2Type, SizeType >::CrsArray ( const CrsArray< DataType, Arg1Type, Arg2Type, SizeType > &  rhs)
inline

Copy constructor (shallow copy).

Definition at line 113 of file Kokkos_CrsArray.hpp.

template<class DataType, class Arg1Type, class Arg2Type = void, typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void >::size_type>
Kokkos::CrsArray< DataType, Arg1Type, Arg2Type, SizeType >::~CrsArray ( )
inline

Destroy this view of the array. If the last view then allocated memory is deallocated.

Definition at line 129 of file Kokkos_CrsArray.hpp.

Member Function Documentation

template<class DataType, class Arg1Type, class Arg2Type = void, typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void >::size_type>
CrsArray& Kokkos::CrsArray< DataType, Arg1Type, Arg2Type, SizeType >::operator= ( const CrsArray< DataType, Arg1Type, Arg2Type, SizeType > &  rhs)
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 120 of file Kokkos_CrsArray.hpp.


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