Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Protected Member Functions
Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps > Class Template Reference

A default device-compute compressed-row sparse matrix.This is externally identical to the host-based matrix; in fact, it derives from CrsMatrixHostCompute. The difference is that that it contains additional storage and logic for device-bound compute buffers. More...

#include <Kokkos_CrsMatrix.hpp>

Inheritance diagram for Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Constructors/Destructor
 CrsMatrixDeviceCompute ()
 Default constructor with a no graph (must be set later).
 CrsMatrixDeviceCompute (CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &graph)
 Constructor with a matrix-owned non-const graph.
 CrsMatrixDeviceCompute (const CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &graph)
 Constructor with a non-owned const graph.
 ~CrsMatrixDeviceCompute ()
 CrsMatrixDeviceCompute Destructor.
Methods over-riding CrsGraphDeviceCompute.
void setOwnedGraph (CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &graph)
 Set matrix-owned graph.
void setStaticGraph (const CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &graph)
 Set static graph.
void finalize (bool OptimizeStorage)
 Instruct the matrix to perform any necessary manipulation, including (optionally) optimizing the storage of the matrix data.
void getDeviceBuffer (ArrayRCP< Scalar > &d_vals) const
 Return the device-bound buffers.
virtual void clear ()
 Release data associated with this graph.
Graph set routines.
void setOwnedGraph (CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &graph)
 Set matrix-owned graph.
void setStaticGraph (const CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &graph)
 Set static graph.
Data entry and accessor methods.
RCP< Node > getNode () const
 Node accessor.
size_t getNumRows () const
 Return the number of rows in the matrix.
size_t getNumEntries () const
 Return the number of entries in the matrix.
bool isEmpty () const
 Indicates that the graph is filled, but empty.
bool isFinalized () const
 Indicatest that the graph has been finalized.
bool is1DStructure () const
 Indicate that the structure is 1D. It will never be the case that both is1DStructure() and is2DStructure() return true.
bool is2DStructure () const
 Indicate that the structure is 2D. It will never be the case that both is1DStructure() and is2DStructure() return true.
bool isOptimized () const
 Indicate that the stucture is optimized.
void set1DValues (ArrayRCP< Scalar > vals)
 Submit the values for 1D storage.
void set2DValues (ArrayRCP< ArrayRCP< Scalar > > vals)
 Submit the values for 2D storage.
void get1DValues (ArrayRCP< Scalar > &vals)
 Retrieve the values for 1D storage.
void get2DValues (ArrayRCP< ArrayRCP< Scalar > > &inds)
 Retrieve the structure for 2D storage.

Protected Member Functions

 CrsMatrixDeviceCompute (const CrsMatrixDeviceCompute &sources)
 Copy constructor (protected and not implemented)

Detailed Description

template<class Scalar, class Ordinal, class Node, class LocalMatOps>
class Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >

A default device-compute compressed-row sparse matrix.

This is externally identical to the host-based matrix; in fact, it derives from CrsMatrixHostCompute. The difference is that that it contains additional storage and logic for device-bound compute buffers.

Definition at line 369 of file Kokkos_CrsMatrix.hpp.


Constructor & Destructor Documentation

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::CrsMatrixDeviceCompute ( )

Default constructor with a no graph (must be set later).

Definition at line 426 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::CrsMatrixDeviceCompute ( CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &  graph)

Constructor with a matrix-owned non-const graph.

Definition at line 442 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::CrsMatrixDeviceCompute ( const CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &  graph)

Constructor with a non-owned const graph.

Definition at line 434 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::~CrsMatrixDeviceCompute ( )

CrsMatrixDeviceCompute Destructor.

Definition at line 450 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal, class Node, class LocalMatOps>
Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::CrsMatrixDeviceCompute ( const CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps > &  sources) [protected]

Copy constructor (protected and not implemented)


Member Function Documentation

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
void Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::setOwnedGraph ( CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &  graph)

Set matrix-owned graph.

Definition at line 478 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
void Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::setStaticGraph ( const CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps > &  graph)

Set static graph.

Definition at line 469 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::finalize ( bool  OptimizeStorage)

Instruct the matrix to perform any necessary manipulation, including (optionally) optimizing the storage of the matrix data.

Parameters:
[in]OptimizeStoragePermit the matrix to reallocate storage on the host in order to provide optimal storage and/or performance.
Postcondition:
if OptimizeStorage == true, then is2DStructure() == true

Reimplemented from Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >.

Definition at line 487 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::getDeviceBuffer ( ArrayRCP< Scalar > &  d_vals) const

Return the device-bound buffers.

Definition at line 462 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >::clear ( ) [virtual]

Release data associated with this graph.

Reimplemented from Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >.

Definition at line 455 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
void Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::setOwnedGraph ( CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &  graph) [inherited]

Set matrix-owned graph.

Definition at line 226 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
void Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::setStaticGraph ( const CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &  graph) [inherited]

Set static graph.

Definition at line 216 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
RCP< Node > Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::getNode ( ) const [inherited]

Node accessor.

Definition at line 249 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
size_t Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::getNumRows ( ) const [inherited]

Return the number of rows in the matrix.

Definition at line 255 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
size_t Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::getNumEntries ( ) const [inherited]

Return the number of entries in the matrix.

Definition at line 261 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::isEmpty ( ) const [inherited]

Indicates that the graph is filled, but empty.

Definition at line 267 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::isFinalized ( ) const [inherited]

Indicatest that the graph has been finalized.

Definition at line 273 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::is1DStructure ( ) const [inherited]

Indicate that the structure is 1D. It will never be the case that both is1DStructure() and is2DStructure() return true.

Definition at line 279 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::is2DStructure ( ) const [inherited]

Indicate that the structure is 2D. It will never be the case that both is1DStructure() and is2DStructure() return true.

Definition at line 285 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::isOptimized ( ) const [inherited]

Indicate that the stucture is optimized.

Definition at line 291 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::set1DValues ( ArrayRCP< Scalar >  vals) [inherited]

Submit the values for 1D storage.

Postcondition:
is1DStructure() == true

Definition at line 311 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::set2DValues ( ArrayRCP< ArrayRCP< Scalar > >  vals) [inherited]

Submit the values for 2D storage.

Postcondition:
is2DStructure() == true

Definition at line 323 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::get1DValues ( ArrayRCP< Scalar > &  vals) [inherited]

Retrieve the values for 1D storage.

If is1DStructure() == false, then

Postcondition:
vals == null

Definition at line 297 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal , class Node , class LocalMatOps >
void Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::get2DValues ( ArrayRCP< ArrayRCP< Scalar > > &  inds) [inherited]

Retrieve the structure for 2D storage.

If is2DStructure() == false, then

Postcondition:
vals == null

Definition at line 304 of file Kokkos_CrsMatrix.hpp.


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