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

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

#include <Kokkos_CrsGraph.hpp>

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

List of all members.

Public Member Functions

Constructors/Destructor
 CrsGraphDeviceCompute (size_t numRows, const RCP< Node > &node)
 Default CrsGraphDeviceCompute constuctor.
 ~CrsGraphDeviceCompute ()
 CrsGraphDeviceCompute Destructor.
Methods over-riding CrsGraphDeviceCompute.
void finalize (bool OptimizeStorage)
 Instruct the graph to perform any necessary manipulation, including (optionally) optimizing the storage of the graph data.
template<class Scalar >
void finalize (bool OptimizeStorage, ArrayRCP< ArrayRCP< Scalar > > &values2D, ArrayRCP< Scalar > &values1D, ArrayRCP< Scalar > &d_values1D)
 Instruct the graph to perform any necessary manipulation, including (optionally) optimizing the storage of the graph data, performing identical transformation on matrix values as well.
void getDeviceBuffers (ArrayRCP< Ordinal > &d_inds, ArrayRCP< size_t > &d_offs) const
 Return the device-bound buffers.
virtual void clear ()
 Release data associated with this graph.
Accessor routines.
RCP< Node > getNode () const
 Node accessor.
Data entry and accessor methods.
size_t getNumRows () const
 Return the number of rows in the graph.
size_t getNumEntries () const
 Return the number of entries in the graph.
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 set1DStructure (ArrayRCP< Ordinal > inds, ArrayRCP< size_t > rowBegs, ArrayRCP< size_t > rowEnds)
 Submit the indices and offset for 1D storage.
void set2DStructure (ArrayRCP< ArrayRCP< Ordinal > > inds, ArrayRCP< size_t > numEntriesPerRow)
 Submit the indices for 2D storage.
void get1DStructure (ArrayRCP< Ordinal > &inds, ArrayRCP< size_t > &rowBegs, ArrayRCP< size_t > &rowEnds)
 Retrieve the structure for 1D storage.
void get2DStructure (ArrayRCP< ArrayRCP< Ordinal > > &inds, ArrayRCP< size_t > &numEntriesPerRow)
 Retrieve the structure for 2D storage.
template<class Scalar >
void finalize (bool OptimizeStorage, ArrayRCP< ArrayRCP< Scalar > > &values2D, ArrayRCP< Scalar > &values1D)

Protected Member Functions

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

Detailed Description

template<class Ordinal, class Node, class LocalMatOps>
class Kokkos::CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps >

A default device-compute compressed-row sparse graph.

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

Definition at line 475 of file Kokkos_CrsGraph.hpp.


Constructor & Destructor Documentation

template<class Ordinal , class Node, class LocalMatOps >
Kokkos::CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps >::CrsGraphDeviceCompute ( size_t  numRows,
const RCP< Node > &  node 
)

Default CrsGraphDeviceCompute constuctor.

Definition at line 529 of file Kokkos_CrsGraph.hpp.

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

CrsGraphDeviceCompute Destructor.

Definition at line 535 of file Kokkos_CrsGraph.hpp.

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

Copy constructor (protected and not implemented)


Member Function Documentation

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

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

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 from Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >.

Definition at line 548 of file Kokkos_CrsGraph.hpp.

template<class Ordinal , class Node , class LocalMatOps >
template<class Scalar >
void Kokkos::CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps >::finalize ( bool  OptimizeStorage,
ArrayRCP< ArrayRCP< Scalar > > &  values2D,
ArrayRCP< Scalar > &  values1D,
ArrayRCP< Scalar > &  d_values1D 
)

Instruct the graph to perform any necessary manipulation, including (optionally) optimizing the storage of the graph data, performing identical transformation on matrix values as well.

Parameters:
[in]OptimizeStoragePermit the graph to reallocate storage on the host in order to provide optimal storage and/or performance.
in/out]values2D 2D-structured matrix values. Required to be non-null if is2DStructure() is true. Set to null if OptimizeStorage is true.
in/out]values1D 1D-structured matrix values. Required to be non-null if is1DStructure() is true. Allocated if OptimizeStorage is true.
[out]d_values1D1D-structured matrix values, resident on the device. Allocated and filled, regardless of OptimizeStorage.
Postcondition:
if OptimizeStorage == true or already is2DStructure(), then is2DStructure() == true.

Definition at line 609 of file Kokkos_CrsGraph.hpp.

template<class Ordinal, class Node , class LocalMatOps >
void Kokkos::CrsGraphDeviceCompute< Ordinal, Node, LocalMatOps >::getDeviceBuffers ( ArrayRCP< Ordinal > &  d_inds,
ArrayRCP< size_t > &  d_offs 
) const

Return the device-bound buffers.

Definition at line 599 of file Kokkos_CrsGraph.hpp.

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

Release data associated with this graph.

Reimplemented from Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >.

Definition at line 540 of file Kokkos_CrsGraph.hpp.

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

Node accessor.

Definition at line 213 of file Kokkos_CrsGraph.hpp.

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

Return the number of rows in the graph.

Definition at line 219 of file Kokkos_CrsGraph.hpp.

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

Return the number of entries in the graph.

Definition at line 225 of file Kokkos_CrsGraph.hpp.

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

Indicates that the graph is filled, but empty.

Definition at line 231 of file Kokkos_CrsGraph.hpp.

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

Indicatest that the graph has been finalized.

Definition at line 237 of file Kokkos_CrsGraph.hpp.

template<class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsGraphHostCompute< 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 243 of file Kokkos_CrsGraph.hpp.

template<class Ordinal , class Node , class LocalMatOps >
bool Kokkos::CrsGraphHostCompute< 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 249 of file Kokkos_CrsGraph.hpp.

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

Indicate that the stucture is optimized.

Definition at line 255 of file Kokkos_CrsGraph.hpp.

template<class Ordinal, class Node , class LocalMatOps >
void Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >::set1DStructure ( ArrayRCP< Ordinal >  inds,
ArrayRCP< size_t >  rowBegs,
ArrayRCP< size_t >  rowEnds 
) [inherited]

Submit the indices and offset for 1D storage.

Postcondition:
is1DStructure() == true

Definition at line 281 of file Kokkos_CrsGraph.hpp.

template<class Ordinal, class Node , class LocalMatOps >
void Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >::set2DStructure ( ArrayRCP< ArrayRCP< Ordinal > >  inds,
ArrayRCP< size_t >  numEntriesPerRow 
) [inherited]

Submit the indices for 2D storage.

Postcondition:
is2DStructure() == true

Definition at line 312 of file Kokkos_CrsGraph.hpp.

template<class Ordinal, class Node , class LocalMatOps >
void Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >::get1DStructure ( ArrayRCP< Ordinal > &  inds,
ArrayRCP< size_t > &  rowBegs,
ArrayRCP< size_t > &  rowEnds 
) [inherited]

Retrieve the structure for 1D storage.

If is1DStructure() == false, then

Postcondition:
inds == rowBegs == rowEnds == null

Otherwise,

Postcondition:
indices for row r are inds[r], where $r \in [b,e)$, where $b = rowBegs[r]$ and $e = rowEnds[r]$
rowBegs has getNumRows()+1 entries; the last entry is inds.size()
rowEnds has getNumRows() entries

Definition at line 261 of file Kokkos_CrsGraph.hpp.

template<class Ordinal, class Node , class LocalMatOps >
void Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >::get2DStructure ( ArrayRCP< ArrayRCP< Ordinal > > &  inds,
ArrayRCP< size_t > &  numEntriesPerRow 
) [inherited]

Retrieve the structure for 2D storage.

If is2DStructure() == false, then

Postcondition:
inds == numEntriesPerRow == null

Definition at line 272 of file Kokkos_CrsGraph.hpp.

template<class Ordinal , class Node , class LocalMatOps >
template<class Scalar >
void Kokkos::CrsGraphHostCompute< Ordinal, Node, LocalMatOps >::finalize ( bool  OptimizeStorage,
ArrayRCP< ArrayRCP< Scalar > > &  values2D,
ArrayRCP< Scalar > &  values1D 
) [inherited]
Parameters:
[in]OptimizeStoragePermit the graph to reallocate storage on the host in order to provide optimal storage and/or performance.
in/out]values2D 2D-structured matrix values. Required to be non-null if is2DStructure() is true. Set to null if OptimizeStorage is true.
in/out]values1D 1D-structured matrix values. Required to be non-null if is1DStructure() is true. Allocated if OptimizeStorage is true.
Postcondition:
if OptimizeStorage == true or already is2DStructure(), then is2DStructure() == true.

Definition at line 397 of file Kokkos_CrsGraph.hpp.


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