Kokkos::DenseMultiVector< OrdinalType, ScalarType > Class Template Reference

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

#include <Kokkos_DenseMultiVector.hpp>

Inheritance diagram for Kokkos::DenseMultiVector< OrdinalType, ScalarType >:

Inheritance graph
[legend]
Collaboration diagram for Kokkos::DenseMultiVector< OrdinalType, ScalarType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Constructors/Destructor
 DenseMultiVector (void)
 Default constructor.
 DenseMultiVector (const DenseMultiVector &source)
 Copy constructor.
virtual ~DenseMultiVector ()
 DenseMultiVector Destructor.
Initialization methods
int initializeValues (OrdinalType numRows, OrdinalType numCols, ScalarType **values)
 Initialize using an array of pointers.
int initializeValues (OrdinalType numRows, OrdinalType numCols, ScalarType *values, OrdinalType rowInc, OrdinalType colInc=1)
 Initialize using a two-dimensional array.
Multivector entry access methods
virtual ScalarType ** getValues () const
 Returns an array of pointers such that the ith pointer points to an array of values in the ith column of the multivector.
virtual ScalarType * getValues (OrdinalType i) const
 Returns a pointer to an array of values for the ith column of the multivector.
DenseMultiVector Attribute access methods
virtual OrdinalType getNumRows () const
 Number of rows.
virtual OrdinalType getNumCols () const
 Number of columns.
virtual bool getIsStrided () const
 Indicates whether or not array is strided.
virtual OrdinalType getRowInc () const
 Increment between entries in a row of the multivector, normally = numRows().
virtual OrdinalType getColInc () const
 Increment between entries in a column of the multivector, normally = 1.

Protected Attributes

bool dataInitialized_
OrdinalType numRows_
OrdinalType numCols_
OrdinalType rowInc_
OrdinalType colInc_
ScalarType ** values_
ScalarType * allValues_
bool isStrided_

Detailed Description

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

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

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

At this time, the primary functions provided by Kokkos::DenseMultiVector 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<typename OrdinalType, typename ScalarType>
virtual ScalarType* Kokkos::DenseMultiVector< OrdinalType, ScalarType >::getValues OrdinalType  i  )  const [inline, virtual]
 

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.

Implements Kokkos::MultiVector< OrdinalType, ScalarType >.

template<typename OrdinalType, typename ScalarType>
virtual ScalarType** Kokkos::DenseMultiVector< OrdinalType, ScalarType >::getValues  )  const [inline, virtual]
 

Returns an array of pointers such that the ith pointer points to an array of values in the ith column of the multivector.

Extract an array of pointers such that the ith pointer points 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.

Implements Kokkos::MultiVector< OrdinalType, ScalarType >.

template<typename OrdinalType, typename ScalarType>
int Kokkos::DenseMultiVector< OrdinalType, ScalarType >::initializeValues OrdinalType  numRows,
OrdinalType  numCols,
ScalarType *  values,
OrdinalType  rowInc,
OrdinalType  colInc = 1
[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<typename OrdinalType, typename ScalarType>
int Kokkos::DenseMultiVector< OrdinalType, ScalarType >::initializeValues OrdinalType  numRows,
OrdinalType  numCols,
ScalarType **  values
[inline]
 

Initialize using an array of pointers.

This interface supports multivectors that are stored as an array of pointers.

Parameters:
numRows (In) Number of rows in multivector (length of each vector).
numCols (In) Number of columns in multivector (number of vectors).
values (In) Array of pointers of length getNumCols(). values[i] is a vector of length numRows.
Returns:
Integer error code, set to 0 if successful.


The documentation for this class was generated from the following file:
Generated on Sat Mar 14 12:17:56 2009 for Kokkos by  doxygen 1.3.9.1