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

A default host-compute compressed-row sparse matrix. More...

#include <Kokkos_CrsMatrix.hpp>

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

List of all members.

Public Member Functions

Constructors/Destructor
 CrsMatrixHostCompute ()
 Default constructor with no graph. (Must be set later.)
 CrsMatrixHostCompute (CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &graph)
 Constructor with a matrix-owned non-const graph.
 CrsMatrixHostCompute (const CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &graph)
 Constructor with a non-owned const graph.
virtual ~CrsMatrixHostCompute ()
 CrsMatrixHostCompute Destructor.
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.
void finalize (bool OptimizeStorage)
 Instruct the matrix to perform any necessary manipulation, including (optionally) optimizing the storage of the matrix data.
virtual void clear ()
 Release data associated with this graph.

Protected Member Functions

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

Detailed Description

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

A default host-compute compressed-row sparse matrix.

Definition at line 56 of file Kokkos_CrsMatrix.hpp.


Constructor & Destructor Documentation

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

Default constructor with no graph. (Must be set later.)

Definition at line 178 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal, class Node, class LocalMatOps>
Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::CrsMatrixHostCompute ( CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &  graph)

Constructor with a matrix-owned non-const graph.

Definition at line 195 of file Kokkos_CrsMatrix.hpp.

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

Constructor with a non-owned const graph.

Definition at line 187 of file Kokkos_CrsMatrix.hpp.

template<class Scalar , class Ordinal , class Node , class LocalMatOps >
Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::~CrsMatrixHostCompute ( ) [virtual]

CrsMatrixHostCompute Destructor.

Definition at line 223 of file Kokkos_CrsMatrix.hpp.

template<class Scalar, class Ordinal, class Node, class LocalMatOps>
Kokkos::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::CrsMatrixHostCompute ( const CrsMatrixHostCompute< 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::CrsMatrixHostCompute< Scalar, Ordinal, Node, LocalMatOps >::setOwnedGraph ( CrsGraphHostCompute< Ordinal, Node, LocalMatOps > &  graph)

Set matrix-owned graph.

Definition at line 213 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)

Set static graph.

Definition at line 203 of file Kokkos_CrsMatrix.hpp.

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

Node accessor.

Definition at line 236 of file Kokkos_CrsMatrix.hpp.

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

Return the number of rows in the matrix.

Definition at line 242 of file Kokkos_CrsMatrix.hpp.

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

Return the number of entries in the matrix.

Definition at line 248 of file Kokkos_CrsMatrix.hpp.

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

Indicates that the graph is filled, but empty.

Definition at line 254 of file Kokkos_CrsMatrix.hpp.

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

Indicatest that the graph has been finalized.

Definition at line 260 of file Kokkos_CrsMatrix.hpp.

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

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

Definition at line 266 of file Kokkos_CrsMatrix.hpp.

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

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

Definition at line 272 of file Kokkos_CrsMatrix.hpp.

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

Indicate that the stucture is optimized.

Definition at line 278 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)

Submit the values for 1D storage.

Postcondition:
is1DStructure() == true

Definition at line 298 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)

Submit the values for 2D storage.

Postcondition:
is2DStructure() == true

Definition at line 310 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)

Retrieve the values for 1D storage.

If is1DStructure() == false, then

Postcondition:
vals == null

Definition at line 284 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)

Retrieve the structure for 2D storage.

If is2DStructure() == false, then

Postcondition:
vals == null

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 >::finalize ( bool  OptimizeStorage)

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

If the matrix is associated with a matrix-owned graph, then it will be finalized as well. A static graph will not be modified.

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

Reimplemented in Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, LocalMatOps >, Kokkos::FirstTouchHostCrsMatrix< Scalar, Ordinal, Node, LocalMatOps >, and Kokkos::CrsMatrixDeviceCompute< Scalar, Ordinal, Node, DefaultDeviceSparseOps< void, Ordinal, Node > >.

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 >::clear ( ) [virtual]

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