Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Kokkos::CrsGraphBase< Ordinal, Node > Class Template Reference

An abstract base class providing a template for Kokkos-level sparse graph objects.The Tpetra classes do not utilize this base class for interacting with Kokkos-level objects, and the local sparse graph objects are there not required to inherit from this interface. However, this class illustrates the methods that are required by Tpetra objects, and therefore provides a potential starting point for extending Tpetra via new local graph and matrix types. More...

#include <Kokkos_CrsGraphBase.hpp>

Inheritance diagram for Kokkos::CrsGraphBase< Ordinal, Node >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Constructors/Destructor
 CrsGraphBase (size_t numRows, const RCP< Node > &node, const RCP< ParameterList > &params)
 Default constuctor.
virtual ~CrsGraphBase ()
 Destructor.
Data entry and accessor methods.
RCP< Node > getNode () const
size_t getNumRows () const
 Return the number of rows in the graph.
virtual void setStructure (const ArrayRCP< const size_t > &ptrs, const ArrayRCP< const Ordinal > &inds)=0
 Submit the indices and offset for the graph.

Detailed Description

template<class Ordinal, class Node>
class Kokkos::CrsGraphBase< Ordinal, Node >

An abstract base class providing a template for Kokkos-level sparse graph objects.

The Tpetra classes do not utilize this base class for interacting with Kokkos-level objects, and the local sparse graph objects are there not required to inherit from this interface. However, this class illustrates the methods that are required by Tpetra objects, and therefore provides a potential starting point for extending Tpetra via new local graph and matrix types.

Template Parameters:
OrdinalDefines the type of the column indices; same as the LocalOrdinal template parameter of the encapsulating Tpetra::CrsGraph object.
NodeKokkos Node type; same as the Node template parameter of the encapsulating Tpetra::CrsGraph object.

Definition at line 69 of file Kokkos_CrsGraphBase.hpp.


Constructor & Destructor Documentation

template<class Ordinal , class Node>
Kokkos::CrsGraphBase< Ordinal, Node >::CrsGraphBase ( size_t  numRows,
const RCP< Node > &  node,
const RCP< ParameterList > &  params 
)

Default constuctor.

Definition at line 114 of file Kokkos_CrsGraphBase.hpp.

template<class Ordinal , class Node >
Kokkos::CrsGraphBase< Ordinal, Node >::~CrsGraphBase ( ) [virtual]

Destructor.

Definition at line 122 of file Kokkos_CrsGraphBase.hpp.


Member Function Documentation

template<class Ordinal , class Node >
size_t Kokkos::CrsGraphBase< Ordinal, Node >::getNumRows ( ) const

Return the number of rows in the graph.

Definition at line 127 of file Kokkos_CrsGraphBase.hpp.

template<class Ordinal, class Node>
virtual void Kokkos::CrsGraphBase< Ordinal, Node >::setStructure ( const ArrayRCP< const size_t > &  ptrs,
const ArrayRCP< const Ordinal > &  inds 
) [pure virtual]

Submit the indices and offset for the graph.

Precondition:
indices for row r are inds[r], where $r \in [b,e)$, where $b = ptrs[r]$ and $e = ptrs[r-1]$
ptrs has getNumRows()+1 entries
ptrs[0] == 0
ptrs[getNumRows()] == inds.size()

Implemented in Kokkos::CUSPARSECrsGraph< Node >, Kokkos::DefaultCrsGraph< Ordinal, Node >, and KokkosExamples::EmptyCrsGraph< Node >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends