Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Classes | Protected Member Functions
KokkosExamples::DummySparseKernel< Node > Class Template Reference

A dummy-class illustrating the components necessary for a Kokkos sparse operations provider. More...

#include <Kokkos_DummySparseKernelClass.hpp>

List of all members.

Classes

struct  rebind
 Rebind struct, for specifying type information for a different scalar. More...

Public Types

Typedefs and structs
typedef void ScalarType
typedef void OrdinalType
typedef Node NodeType
typedef DummySparseKernel< Node > ThisType

Public Member Functions

Constructors/Destructor
 DummySparseKernel (const Teuchos::RCP< Node > &node)
 Constructor accepting and retaining a node object.
 ~DummySparseKernel ()
 Destructor.
Accessor routines.
Teuchos::RCP< Node > getNode () const
 Node accessor.
Initialization of structure
template<class Ordinal >
void initializeStructure (const Kokkos::CrsGraph< Ordinal, Node, DummySparseKernel< Node > > &)
 Initialize the structure of the sparse matrix.
template<class Scalar , class Ordinal >
void initializeValues (const Kokkos::CrsMatrix< Scalar, Ordinal, Node, DummySparseKernel< Node > > &)
 Initialize the values of the sparse matrix.
void clear ()
 Clear the graph and matrix data.
Computational methods
template<class DomainScalar , class RangeScalar >
void multiply (Teuchos::ETransp trans, RangeScalar alpha, const Kokkos::MultiVector< DomainScalar, Node > &X, Kokkos::MultiVector< RangeScalar, Node > &Y) const
 Applies the matrix to a MultiVector, overwriting Y.
template<class DomainScalar , class RangeScalar >
void multiply (Teuchos::ETransp trans, RangeScalar alpha, const Kokkos::MultiVector< DomainScalar, Node > &X, RangeScalar beta, Kokkos::MultiVector< RangeScalar, Node > &Y) const
 Applies the matrix to a MultiVector, accumulating into Y.
template<class DomainScalar , class RangeScalar >
void solve (Teuchos::ETransp trans, Teuchos::EUplo uplo, Teuchos::EDiag diag, const Kokkos::MultiVector< DomainScalar, Node > &Y, Kokkos::MultiVector< RangeScalar, Node > &X) const
 Solves the matrix for a given set of right-hand-sides.

Protected Member Functions

 DummySparseKernel (const DummySparseKernel &source)
 Copy constructor (protected and unimplemented)

Detailed Description

template<class Node>
class KokkosExamples::DummySparseKernel< Node >

A dummy-class illustrating the components necessary for a Kokkos sparse operations provider.

Examples:

DummySparseKernelDriver.cpp.

Definition at line 21 of file Kokkos_DummySparseKernelClass.hpp.


Constructor & Destructor Documentation

template<class Node >
KokkosExamples::DummySparseKernel< Node >::DummySparseKernel ( const Teuchos::RCP< Node > &  node) [inline]

Constructor accepting and retaining a node object.

Definition at line 50 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
KokkosExamples::DummySparseKernel< Node >::~DummySparseKernel ( ) [inline]

Destructor.

Definition at line 53 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
KokkosExamples::DummySparseKernel< Node >::DummySparseKernel ( const DummySparseKernel< Node > &  source) [protected]

Copy constructor (protected and unimplemented)


Member Function Documentation

template<class Node >
Teuchos::RCP<Node> KokkosExamples::DummySparseKernel< Node >::getNode ( ) const [inline]

Node accessor.

This returns the node type of type this::NodeType that was passed at object construction.

Definition at line 63 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
template<class Ordinal >
void KokkosExamples::DummySparseKernel< Node >::initializeStructure ( const Kokkos::CrsGraph< Ordinal, Node, DummySparseKernel< Node > > &  ) [inline]

Initialize the structure of the sparse matrix.

This is the mechanism by which the user specifies the structure for the sparse matrix. It always comes via a Kokkos::CrsGraph<O,N,SO>, where

  • O is the ordinal type this::OrdinalType,
  • N is the node type this::NodeType, and
  • SO is the sparse op type this::ThisType.

The graph structure must be provided via initializeStructure() before the matrix values are specified to initializeValues(). After calling initializeStructure(), the clear() method must be called before calling initializeStructure() again.

In general, both initializeStructure() and initializeValues() must be called before calling multiply() or solve().

Definition at line 84 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
template<class Scalar , class Ordinal >
void CUSPSparseOps::initializeValues ( const Kokkos::CrsMatrix< Scalar, Ordinal, Node, DummySparseKernel< Node > > &  ) [inline]

Initialize the values of the sparse matrix.

This is the mechanism by which the user specifies the values for the sparse matrix. It always comes via a Kokkos::CrsMatrix<S,O,N,SO>, where

  • S is the scalar type this::ScalarType
  • O is the ordinal type this::OrdinalType,
  • N is the node type this::NodeType, and
  • SO is the sparse op type this::ThisType.

The graph structure must be provided via initializeStructure() before the matrix values are specified to initializeValues(). The matrix values can be provided repeatadly via initializeValues() without the need to call clear().

In general, both initializeStructure() and initializeValues() must be called before calling multiply() or solve().

Definition at line 102 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
void KokkosExamples::DummySparseKernel< Node >::clear ( ) [inline]

Clear the graph and matrix data.

clear() must be called between successive calls to initializeStructure().

In general, after calling clear(), no significant data (including persisting references) will be preserved, save for the pointer to the node.

In general, after calling clear(), multiply() and solve() cannot be called.

Definition at line 112 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
template<class DomainScalar , class RangeScalar >
void KokkosExamples::DummySparseKernel< Node >::multiply ( Teuchos::ETransp  trans,
RangeScalar  alpha,
const Kokkos::MultiVector< DomainScalar, Node > &  X,
Kokkos::MultiVector< RangeScalar, Node > &  Y 
) const [inline]

Applies the matrix to a MultiVector, overwriting Y.

Definition at line 120 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
template<class DomainScalar , class RangeScalar >
void KokkosExamples::DummySparseKernel< Node >::multiply ( Teuchos::ETransp  trans,
RangeScalar  alpha,
const Kokkos::MultiVector< DomainScalar, Node > &  X,
RangeScalar  beta,
Kokkos::MultiVector< RangeScalar, Node > &  Y 
) const [inline]

Applies the matrix to a MultiVector, accumulating into Y.

Definition at line 124 of file Kokkos_DummySparseKernelClass.hpp.

template<class Node >
template<class DomainScalar , class RangeScalar >
void KokkosExamples::DummySparseKernel< Node >::solve ( Teuchos::ETransp  trans,
Teuchos::EUplo  uplo,
Teuchos::EDiag  diag,
const Kokkos::MultiVector< DomainScalar, Node > &  Y,
Kokkos::MultiVector< RangeScalar, Node > &  X 
) const [inline]

Solves the matrix for a given set of right-hand-sides.

Definition at line 129 of file Kokkos_DummySparseKernelClass.hpp.


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