Kokkos::MultiVector< Scalar, Node > Class Template Reference

Kokkos::MultiVector: Kokkos default implementation of the abstract Kokkos::MultiVector. More...

#include <Kokkos_MultiVector.hpp>

List of all members.

Public Member Functions

Constructors/Destructor
 MultiVector (Teuchos::RCP< Node > node)
 Default constructor.
 MultiVector (const MultiVector &source)
 Copy constructor.
 ~MultiVector ()
 MultiVector Destructor.
Initialization methods
void initializeValues (size_t numRows, size_t numCols, const Teuchos::ArrayRCP< Scalar > &values, size_t stride)
 Initialize using a two-dimensional array.
Multivector entry access methods
Teuchos::ArrayRCP< Scalar > getValuesNonConst ()
 Returns a copy of the ArrayRCP passed to initializeValues().
Teuchos::ArrayRCP< const Scalar > getValues () const
 Returns a copy of the ArrayRCP passed to initializeValues().
Teuchos::ArrayRCP< Scalar > getValuesNonConst (size_t i)
 Returns a pointer to an array of values for the ith column of the multivector.
Teuchos::ArrayRCP< const Scalar > getValues (size_t i) const
 Returns a pointer to an array of values for the ith column of the multivector.
MultiVector Attribute access methods
size_t getNumRows () const
 Number of rows.
size_t getNumCols () const
 Number of columns.
size_t getStride () const
 Increment between entries in a row of the multivector, normally = numRows().


Detailed Description

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
class Kokkos::MultiVector< Scalar, Node >

Kokkos::MultiVector: Kokkos default implementation of the abstract Kokkos::MultiVector.

The Kokkos::MultiVector provides a default implementation of Kokkos::MultiVector interface.

At this time, the primary functions provided by Kokkos::MultiVector is wrapping of a set of dense vector and providing access to multivector entries. Two basic categories of data structures are supported:

  1. MultiVector is described by an array of pointers: In this situation, the ith entry of this array of pointers is the starting address of a contiguous array of values for the ith vector in the multivector. The storage mode will be assumed if the getIsStrided() method returns false.
  2. MultiVector is a regular strided two-dimensional array of values: In this situation, the increment between elements in the row and column dimensions is specified by the getRowInc() and getColInc() methods. This is a very general mechanism for describing strided access. Typical situations include: However, this mechanism also allows extraction of array subsections, real or imaginary parts from complex-valued arrays.

    This storage mode will be assumed if getIsStrided() returns true. The base address for the 2D array will be obtain by call getValues() with the argument equal to 0.


Member Function Documentation

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
void Kokkos::MultiVector< Scalar, Node >::initializeValues ( size_t  numRows,
size_t  numCols,
const Teuchos::ArrayRCP< Scalar > &  values,
size_t  stride 
) [inline]

Initialize using a two-dimensional array.

This interface supports multivectors that are stored as 2D arrays, or subsections of one.

Parameters:
numRows (In) Number of rows in multivector (length of each vector).
numCols (In) Number of columns in multivector (number of vectors).
values (In) Pointer to the first entry in the multivector. Subsequent column entries are spaced a distance of getColInc(). Subsequent row entries are spaced by getRowInc() increments.
rowInc (In) The increment between two elements in a row of the multivector. Typically this value should be set to numRows.
colInc (In) The increment between two elements in a column of the multivector. Typically this value should be set to 1, which is the default value.
Returns:
Integer error code, set to 0 if successful.

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
Teuchos::ArrayRCP<Scalar> Kokkos::MultiVector< Scalar, Node >::getValuesNonConst ( size_t  i  )  [inline]

Returns a pointer to an array of values for the ith column of the multivector.

Extract a pointer to the values in the ith column of the multivector. Note that the values are not copied by this method. Memory allocation is handled by the multivector object itself. Also, if the getIsStrided() method returns true, then the getColInc() should be used to access values in the ith column of the multivector, especially if getColInc() != 1.

Parameters:
i (In) The column that should be returned.

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
Teuchos::ArrayRCP<const Scalar> Kokkos::MultiVector< Scalar, Node >::getValues ( size_t  i  )  const [inline]

Returns a pointer to an array of values for the ith column of the multivector.

Extract a pointer to the values in the ith column of the multivector. Note that the values are not copied by this method. Memory allocation is handled by the multivector object itself. Also, if the getIsStrided() method returns true, then the getColInc() should be used to access values in the ith column of the multivector, especially if getColInc() != 1.

Parameters:
i (In) The column that should be returned.


The documentation for this class was generated from the following file: