Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Kokkos::MultiVector< Scalar, Node > Class Template Reference

Data structure for vector and multivector data. More...

#include <Kokkos_MultiVector.hpp>

List of all members.

Public Member Functions

Constructors/Destructor
 MultiVector (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 ArrayRCP< Scalar > &values, size_t stride)
 Initialize using a two-dimensional array.
Multivector entry access methods
ArrayRCP< Scalar > getValuesNonConst ()
 Returns a copy of the ArrayRCP passed to initializeValues().
ArrayRCP< const Scalar > getValues () const
 Returns a copy of the ArrayRCP passed to initializeValues().
ArrayRCP< Scalar > getValuesNonConst (size_t i)
 Returns a pointer to an array of values for the ith column of the multivector.
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
RCP< Node > getNode () const
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 >

Data structure for vector and multivector data.

The primary functions provided by MultiVector is wrapping of a set of dense vectors and providing access to multivector entries.

MultiVector is a regular strided two-dimensional array of values. The increment between elements in the row and column dimensions is specified by getStride().

Examples:

DummySparseKernelDriver.cpp.

Definition at line 52 of file Kokkos_MultiVector.hpp.


Constructor & Destructor Documentation

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
Kokkos::MultiVector< Scalar, Node >::MultiVector ( RCP< Node >  node) [inline]

Default constructor.

Definition at line 62 of file Kokkos_MultiVector.hpp.

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
Kokkos::MultiVector< Scalar, Node >::MultiVector ( const MultiVector< Scalar, Node > &  source) [inline]

Copy constructor.

Definition at line 70 of file Kokkos_MultiVector.hpp.

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
Kokkos::MultiVector< Scalar, Node >::~MultiVector ( ) [inline]

MultiVector Destructor.

Definition at line 79 of file Kokkos_MultiVector.hpp.


Member Function Documentation

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
void Kokkos::MultiVector< Scalar, Node >::initializeValues ( size_t  numRows,
size_t  numCols,
const 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.

Definition at line 103 of file Kokkos_MultiVector.hpp.

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

Returns a copy of the ArrayRCP passed to initializeValues().

Definition at line 120 of file Kokkos_MultiVector.hpp.

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

Returns a copy of the ArrayRCP passed to initializeValues().

Definition at line 126 of file Kokkos_MultiVector.hpp.

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
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.

Definition at line 140 of file Kokkos_MultiVector.hpp.

template<class Scalar, class Node = DefaultNode::DefaultNodeType>
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.

Definition at line 160 of file Kokkos_MultiVector.hpp.

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

Number of rows.

Definition at line 179 of file Kokkos_MultiVector.hpp.

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

Number of columns.

Definition at line 182 of file Kokkos_MultiVector.hpp.

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

Increment between entries in a row of the multivector, normally = numRows().

Definition at line 185 of file Kokkos_MultiVector.hpp.


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