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

Partial specialization of DefaultHostSparseOps for Scalar=void. More...

#include <Kokkos_DefaultSparseOps.hpp>

Inheritance diagram for Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >:
Inheritance graph
[legend]

List of all members.

Classes

struct  bind_ordinal
 Sparse operations type for a different ordinal type. More...
struct  bind_scalar
 Sparse operations type for a different scalar type. More...
struct  graph
 Typedef for local graph class. More...
struct  matrix
 Typedef for local matrix class. More...

Public Types

Typedefs and structs
typedef void scalar_type
 The type of the individual entries of the sparse matrix.
typedef Ordinal ordinal_type
 The type of the (local) indices describing the structure of the sparse matrix.
typedef Node node_type
 The Kokkos Node type.
typedef DefaultHostSparseOps
< void, Ordinal, Node,
Allocator > 
sparse_ops_type
 The type of this object, the sparse operator object.

Public Member Functions

Constructors/Destructor
 DefaultHostSparseOps (const RCP< Node > &node)
 Constructor that takes a Kokkos Node: DO NOT CALL (Scalar=void specialization).
 DefaultHostSparseOps (const RCP< Node > &node, Teuchos::ParameterList &params)
 Constructor that takes a Kokkos Node and parameters: DO NOT CALL (Scalar=void specialization).
 ~DefaultHostSparseOps ()
 Destructor.
Implementation of Teuchos::Describable
std::string description () const
 One-line description of this instance.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Write a possibly more verbose description of this instance to out.
Accessor routines.
RCP< Node > getNode () const
 The Kokkos Node with which this object was instantiated.

Static Public Member Functions

Initialization of graph and matrix
static ArrayRCP< size_t > allocRowPtrs (const RCP< Node > &node, const ArrayView< const size_t > &numEntriesPerRow)
 Allocate and initialize the storage for the row offsets.
template<class T >
static ArrayRCP< T > allocStorage (const RCP< Node > &node, const ArrayView< const size_t > &rowPtrs)
 Allocate and initialize the storage for graph or matrix storage.
static void finalizeGraph (Teuchos::EUplo uplo, Teuchos::EDiag diag, DefaultCrsGraph< Ordinal, Node > &graph, const RCP< ParameterList > &params)
 Finalize a graph.

Detailed Description

template<class Ordinal, class Node, class Allocator>
class Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >

Partial specialization of DefaultHostSparseOps for Scalar=void.

Template Parameters:
OrdinalThe type of (local) indices of the sparse matrix.
NodeThe Kokkos Node type.
AllocatorThe allocator type.
Warning:
This partial specialization is _not_ for users. Kokkos developers should see the discussion below explaining why we need this partial specialization.

Developer documentation =======================

We include a partial specialization as a work-around for a Windows MSVC compilation problem reported on 08 Aug 2012 by Brent Perschbacher. The issue is that MSVC is attempting to compile the generic methods for Scalar=void, since we do refer to the type for Scalar=void in e.g., Tpetra::CrsGraph. However, whenever we refer to the Scalar=void case, we only reference the typedefs and inner classes inside, not the methods. Other compilers do not attempt to compile methods of a template class that aren't called; MSVC apparently does.

Kokkos developers must imitate DefaultHostSparseOps by providing their own partial specializations of their local sparse kernels classes for the Scalar=void case.

gcc 4.5.1 says that "default template arguments may not be used in partial specializations," so we aren't allowed to specify a default Allocator.

Definition at line 1208 of file Kokkos_DefaultSparseOps.hpp.


Member Typedef Documentation

template<class Ordinal , class Node , class Allocator >
typedef void Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::scalar_type

The type of the individual entries of the sparse matrix.

Definition at line 1214 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
typedef Ordinal Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::ordinal_type

The type of the (local) indices describing the structure of the sparse matrix.

Definition at line 1216 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
typedef Node Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::node_type

The Kokkos Node type.

Definition at line 1218 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
typedef DefaultHostSparseOps<void, Ordinal, Node, Allocator> Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::sparse_ops_type

The type of this object, the sparse operator object.

Definition at line 1220 of file Kokkos_DefaultSparseOps.hpp.


Constructor & Destructor Documentation

template<class Ordinal , class Node , class Allocator >
Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::DefaultHostSparseOps ( const RCP< Node > &  node) [inline]

Constructor that takes a Kokkos Node: DO NOT CALL (Scalar=void specialization).

Definition at line 1272 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::DefaultHostSparseOps ( const RCP< Node > &  node,
Teuchos::ParameterList params 
) [inline]

Constructor that takes a Kokkos Node and parameters: DO NOT CALL (Scalar=void specialization).

Definition at line 1281 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::~DefaultHostSparseOps ( ) [inline]

Destructor.

Definition at line 1290 of file Kokkos_DefaultSparseOps.hpp.


Member Function Documentation

template<class Ordinal , class Node , class Allocator >
std::string Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::description ( ) const [inline, virtual]

One-line description of this instance.

Reimplemented from Teuchos::Describable.

Definition at line 1304 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
void Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [inline, virtual]

Write a possibly more verbose description of this instance to out.

Reimplemented from Teuchos::Describable.

Definition at line 1317 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
RCP<Node> Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::getNode ( ) const [inline]

The Kokkos Node with which this object was instantiated.

Definition at line 1345 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
static ArrayRCP<size_t> Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::allocRowPtrs ( const RCP< Node > &  node,
const ArrayView< const size_t > &  numEntriesPerRow 
) [inline, static]

Allocate and initialize the storage for the row offsets.

Note:
This is still implemented in the Scalar=void specialization, since Tpetra::CrsGraph may use it for allocating its row offsets. Since it's a class method, we may call it without needing to instantiate a DefaultHostSparseOps instance.

Definition at line 1362 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
template<class T >
static ArrayRCP<T> Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::allocStorage ( const RCP< Node > &  node,
const ArrayView< const size_t > &  rowPtrs 
) [inline, static]

Allocate and initialize the storage for graph or matrix storage.

Note:
This is still implemented in the Scalar=void specialization, since Tpetra::CrsGraph may use it for allocating the column indices (T=Ordinal). Since it's a class method, we may call it without needing to instantiate a DefaultHostSparseOps instance.

Definition at line 1375 of file Kokkos_DefaultSparseOps.hpp.

template<class Ordinal , class Node , class Allocator >
static void Kokkos::DefaultHostSparseOps< void, Ordinal, Node, Allocator >::finalizeGraph ( Teuchos::EUplo  uplo,
Teuchos::EDiag  diag,
DefaultCrsGraph< Ordinal, Node > &  graph,
const RCP< ParameterList > &  params 
) [inline, static]

Finalize a graph.

Note:
This is still implemented in the Scalar=void specialization, since Tpetra::CrsGraph may use it for finalizing the graph structure. Since it's a class method, we may call it without needing to instantiate a DefaultHostSparseOps instance.

Definition at line 1387 of file Kokkos_DefaultSparseOps.hpp.


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