Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Kokkos::PackedSparseMultiply< OrdinalType, ScalarType > Class Template Reference

PackedSparseMultiply: A reference class for computing sparse matrix multiplication operations. More...

#include <Kokkos_PackedSparseMultiply.hpp>

List of all members.

Public Member Functions

Constructors/Destructor
 PackedSparseMultiply ()
 PackedSparseMultiply constuctor with variable number of indices per row.
 PackedSparseMultiply (const PackedSparseMultiply &source)
 Copy constructor.
virtual ~PackedSparseMultiply ()
 PackedSparseMultiply Destructor.
Abstract CisMatrix Interface Initialization Methods
virtual int initializeStructure (const CisMatrix< OrdinalType, ScalarType > &A, bool willKeepStructure=false)
 Initialize structure of matrix.
virtual int initializeValues (const CisMatrix< OrdinalType, ScalarType > &A, bool willKeepValues=false, bool checkStructure=false)
 Initialize values of matrix.
Computational methods
virtual int apply (const MultiVector< OrdinalType, ScalarType > &x, MultiVector< OrdinalType, ScalarType > &y, bool transA=false, bool conjA=false) const
 Returns the result of a Kokkos_PackedSparseMultiply multiplied by multiple vectors in x, results in y.
Operator attribute access methods
virtual bool getCanUseStructure () const
 Returns false for this implementation.
virtual bool getCanUseValues () const
 Returns false for this implementation.
virtual const CisMatrix
< OrdinalType, ScalarType > & 
getMatrix () const
 Returns a reference to the most recent CisMatrix that was passed into the this object.

Detailed Description

template<typename OrdinalType, typename ScalarType>
class Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >

PackedSparseMultiply: A reference class for computing sparse matrix multiplication operations.

The PackedSparseMultiply provide basic functionality for computing sparse matrix times vector, or sparse matrix times multivector operations. This class is templated on the ordinal (integer) and scalar (floating point) types, so it can compute using any reasonable data type.

Constructing PackedSparseMultiply objects

Constructing PackedSparseMultiply objects is a multi-step process. The basic steps are as follows:

  1. Create PackedSparseMultiply instance: The constructor takes no arguments.
  2. Register the structure of a CisMatrix object using initializeStructure(): We provide this method so that derived implementations can take advantage of multiple problems that have the same structure. In this situation, initializeStructure() would be called once and then initializeValues() would be called repeatedly, amortizing the cost of setting up the structure. This method may be called only once.
  3. Register the values of a CisMatrix object using initializeValues(): This method is used to pass values to the multiply class. It can be called repeatedly if multiple matrices have the same structure.

Counting Floating Point Operations

Each PackedSparseMultiply object keeps track of the number of floating point operations performed using the specified object as the this argument to the function. The getFlops() function returns this number as a double precision number. Using this information, in conjunction with the Time class, one can get accurate performance numbers. The resetFlops() function resets the floating point counter.

Definition at line 70 of file Kokkos_PackedSparseMultiply.hpp.


Constructor & Destructor Documentation

template<typename OrdinalType , typename ScalarType >
Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::PackedSparseMultiply ( )

PackedSparseMultiply constuctor with variable number of indices per row.

Definition at line 188 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType , typename ScalarType >
Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::PackedSparseMultiply ( const PackedSparseMultiply< OrdinalType, ScalarType > &  source)

Copy constructor.

Definition at line 206 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType , typename ScalarType >
Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::~PackedSparseMultiply ( ) [virtual]

PackedSparseMultiply Destructor.

Definition at line 260 of file Kokkos_PackedSparseMultiply.hpp.


Member Function Documentation

template<typename OrdinalType , typename ScalarType >
int Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::initializeStructure ( const CisMatrix< OrdinalType, ScalarType > &  A,
bool  willKeepStructure = false 
) [virtual]

Initialize structure of matrix.

This interface supports matrices that implement the CisMatrix matrix interface.

Parameters:
A(In) An instance of a class that implements the CisMatrix. All necessary information about the matrix can be obtained via this interface.
willKeepStructure(In) This argument is unused by this implementation of the BaseSparseMultiply class since structure and values will be copied.
Returns:
Integer error code, set to 0 if successful.

Definition at line 268 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType , typename ScalarType >
int Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::initializeValues ( const CisMatrix< OrdinalType, ScalarType > &  A,
bool  willKeepValues = false,
bool  checkStructure = false 
) [virtual]

Initialize values of matrix.

This interface supports matrices that implement the CisMatrix matrix interface.

Parameters:
A(In) An instance of a class that implements the CisMatrix. All necessary information about the matrix can be obtained via this interface.
willKeepValues(In) This argument is unused by this implementation of the BaseSparseMultiply class since structure and values will be copied.
checkStructure(In) If set to true, the structure of A will be checked against the structure of the matrix passed in to the initializeStructure() methods. This parameter is false by default.
Returns:
Integer error code, set to 0 if successful, returns - 1 if checkStructure is true and structure is changed.

Definition at line 310 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType , typename ScalarType >
int Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::apply ( const MultiVector< OrdinalType, ScalarType > &  x,
MultiVector< OrdinalType, ScalarType > &  y,
bool  transA = false,
bool  conjA = false 
) const [virtual]

Returns the result of a Kokkos_PackedSparseMultiply multiplied by multiple vectors in x, results in y.

Parameters:
x(In) A MultiVector to multiply by.
y(Out) A MultiVector containing results.
transA(In) If true, multiply by the transpose of matrix, otherwise just use matrix.
conjA(In) If true, multiply by the conjugate of matrix values, otherwise just use matrix values.
Returns:
Integer error code, set to 0 if successful.

Definition at line 336 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType, typename ScalarType>
virtual bool Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::getCanUseStructure ( ) const [inline, virtual]

Returns false for this implementation.

This implementation will not use the user's copy of the matrix structure.

Definition at line 142 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType, typename ScalarType>
virtual bool Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::getCanUseValues ( ) const [inline, virtual]

Returns false for this implementation.

This implementation will not use the user's copy of the matrix values.

Definition at line 147 of file Kokkos_PackedSparseMultiply.hpp.

template<typename OrdinalType, typename ScalarType>
virtual const CisMatrix<OrdinalType, ScalarType>& Kokkos::PackedSparseMultiply< OrdinalType, ScalarType >::getMatrix ( ) const [inline, virtual]

Returns a reference to the most recent CisMatrix that was passed into the this object.

Definition at line 150 of file Kokkos_PackedSparseMultiply.hpp.


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